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:
Execute the backup using:
The replace command will create it from scratch.
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
Post a Comment