Restore database from network drive

Configuring Security & Sharing on the Remote Server (ServerName)

On the remote server called “ServerName” which has the “DB.bak” file on its file system, browse to the folder including the file, right-click, properties and then follow the screenshots below.

 

 

 

Creating Mapped Network Drive on the SQL Server

Log on the SQL server machine to create a mapped network drive which is mapped to the shared path you already created in the previous step. To do this, follow the screenshot below.

Registering the Mapped Network Path on SQL Server Management Studio

You, you need to register the mapped network path on the SQL Server Management Studio in order to be able to access the mapped drive from SQL Server Management Studio File Explorer. To do so, open SQL Server Management Studio and execute the query below.

1
2
3
4
5
6
7
8
9
10
11
12
EXEC sp_configure 'show advanced options', 1 
GO 
RECONFIGURE 
GO 
EXEC sp_configure 'xp_cmdshell', 1 
GO 
RECONFIGURE 
GO  
EXEC XP_CMDSHELL 'net use N: /delete'
EXEC XP_CMDSHELL 'net use N: \\ServerName\DB-Backup-ShareName'
EXEC XP_CMDSHELL 'Dir N:'

Read more: http://developmentsimplyput.blogspot.com/2012/11/restorebackup-sql-database-fromto.html#ixzz2lDfAWJeL

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s