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

Leave a comment