Saturday, February 25, 2012

Restore Move

Okay so I am new to the SQL arena! Just wanted to get that out of the way!

I have just set up a new SBS 2000 Server and am using SQL 2000 on it. I need to move a database from the old server, using SQL 7, to the new one. I have a backup of the old server db. However, I need to use the move command when restoring because the backup was done from drive D: and the new system is on drive c:.

I can't seem to figure out the proper syntax for a batch file to use osql to restore/move the database. Any suggestion would be appreciated.

Thanks,

RANHowdy

Use Enterprise Manager ( Its easier ), unless of course you need to automate the task...

in EM, right click on the database, choose All Tasks, Restore Database.

Under the "General" tab, type the database name you want to create during the restore.

Go to the "Options " tab.
Change the "Restore As" path for each file ( MDF & LDF ) to be on the required drive & directory.

All should work fine.

Post back if problems.

Cheers

SG.

No comments:

Post a Comment