If you are reading this, then you might have already restored database in local server instance. There are scenario's where we need to restore database from a network path. So the question is how to do this? let's find it out .
Scenario:
Consider we have 2 servers "ServerA" and "ServerB". We have to restore database from ServerA to ServerB without copying the .bak file over the network (probably copying is waste of time).
Solution:
Follow the below steps,
Scenario:
Consider we have 2 servers "ServerA" and "ServerB". We have to restore database from ServerA to ServerB without copying the .bak file over the network (probably copying is waste of time).
Solution:
Follow the below steps,
- Create a folder in ServerA (let's name it as Backups). Share the folder and grant "Everyone" full control permission on the folder. So now the network path of this folder will be "\\ServerA\Backups".
- Take the backup of database you want to restore, into the folder created above (i.e. Backups).
- Log into ServerB -> Open MyComputer -> click on Map network drive as show below
- Once clicked you will find the below screen
- Select drive name of your choice and mention the network path. In our case Drive = S: and network path ="\\ServerA\Backups", click finish, Once this is done you should be able to see this drive in My Computer explorer.
- Now that we have mapped the network drive in explorer, we also need to register the same in SSMS.
- Open SSMS in ServerB(preferably as administrator), connect to db local instance and run the below scripts. (Make changes based on your scenario for drive and network path).
- Once this is done, right click on databases-> restore database->Source as Device-> Browse -> Backup media type as File -> Add-> Now you should be able to see the network drive. Select the database you want to restore.
Hope this helps :-)
No comments:
Post a Comment