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

D365FO Data management change tracking enable/disable not working

Displaying a value from a array field in EP

Table array field iteration