Create and Restore a SQL Server Database Backup on a
Network File Share
Provided by: FMS Development Team
This tip helps SQL Server administrators and developers understand how to
configure backups that will be more useful and secure. This strategy
promotes easier recovery of a failed system by backing up and restoring a
database from a network file share.
There are very compelling reasons you don't want SQL Server backup files
on the same device that is supporting your instance of SQL Server. The most
critical of these is the risk of hardware failure. If the physical device
containing both the database and its backup fails, you have very limited
recovery options and will likely need to rely on other less timely backup
media, if they exist.
Ideally, you should create all of your database backups on a separate
device (or even a separate machine), and in a central location. While some
of you are saying "That seems pretty obvious!" to this information, you'd be
surprised to find how many SQL Server users (and some administrators) are
creating a database backup locally on the server, then manually moving it to
a different location on the network.
While only local devices are shown in Enterprise Manager’s Backup/Restore
dialogs, there is a way to create or restore a SQL Server database backup on
a network file share. Creating or restoring a database backup on a network
file share requires the following prerequisites:
1) The SQL Server services, on the Server containing the instance of SQL
Server, must be running under a domain-level account (e.g. A Domain
Administrator account). This is accomplished by changing the "Log On"
properties for the services named "MSSQLSERVER" and "SQLSERVERAGENT" on the
server running SQL Server (not your local instance). When you have completed
changing the log on information for these 2 services, you will need to
restart the "MSSQLSERVER" service on that server. Note that this will ask if
you want to restart the "SQLSERVERAGENT" as well - Answer: Yes.
2) The SQL Server service account must have FULL CONTROL rights to the
file system folder and to the share. That means you need to have a shared
location in which the logon account you specified in 1 (above) has full
control rights.
3) The file share should only be accessed via UNC name. Mapped drives may
not be consistently visible to the SQL Service.
4) You cannot specify the path by using the browse ellipses (...). You
must type the fully qualified path into the text box as:
file://ComputerName/ShareDirectoryWithRightsForDomain-levelAccountUsed/NameofFile.Extension
Additional Notes:
When creating or restoring backups on a network share, a significant
increase in network traffic may result. You should ensure that your network
can handle this without causing poor performance for other systems or end
users. It may also benefit you to establish a dedicated physical network
connection between your database server and your backup file host. Once the
SQL Server instance is configured, you can use your local Enterprise Manager
to create or restore a database backup that resides on a network device
other than the device your instance of SQL Server is running on.
Return to the tips page
|