-- Command to list database from remote drive
restore filelistonly FROM disk='\\remotemachine\DB Backup\Northwind.bak'
-- Command to recover database using this list
RESTORE Database Core FROM disk='\\remotemachine\DB Backup\Northwind.bak''
WITH
move 'Northwind_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL$INSTANCE2\Data\Northwind.mdf',
move 'Northwind_Index' TO 'C:\Program Files\Microsoft SQL Server\MSSQL$INSTANCE2\Data\Northwind_1.mdf',
move 'Northwind_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL$INSTANCE2\DataNorthwind_log.ldf',
Partial, Recovery
Blogs on .NET and LAMP Technologies
There's often more than one correct thing.
There's often more than one right thing.
There's often more than one obvious thing.
--Larry Wall
Monday, July 03, 2006
SQL 2000 Database Recovery from Network Drive using SQL commands
In my current project, we frequently need to update our QA database with our production database. We get production database backup copy by FTP. SQL Enterprise Manager donot support recovery of database from remote file. UI only support only local backup file. Following SQL commands came as rescue:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment