Restore SQL DB from a network location

This can me done over the network. Just make sure that the account that runs the sql server can access the folder containing the .bak file.

List the files in your database backup using:

RESTORE FILELISTONLY
FROM DISK = 'C:\Projects\Data\Northwind.bak'


Execute the backup using:

RESTORE DATABASE Northwind
FROM DISK = 'C:\Projects\Data\Northwind.bak'

MOVE 'Northwind_Data' TO 'C:\Projects\Web\Data\Northwind.mdf',

MOVE 'Northwind_Data2' TO 'C:\Projects\Web\Data\Northwind.ndf',
MOVE 'Northwind_Log' TO 'C:\Projects\Web\Data\Northwind.LDF'

The replace command will create it from scratch.

Comments

Popular posts from this blog

How to disable auto enabled flight key using KillSwitch

Technical intro to Feature management in D365FO

Continuous integration and deployment Power platform FinOps tweaking