Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore Database Procedure

Status
Not open for further replies.

jfcox

Programmer
Jul 11, 2001
44
US
I have been unsucessful in trying to restore a database. First I was getting errors about 'users' logged on. I found out how to put the database in single user mode but that is as far as I can get. If I try to connect with the enterprise manager, I can't with essentially the same reason.

I also tried to restore the database to a whole new database. It looked like it was restoring just fine but then I got the error 'database not published'

Can anyone give me a step by step on how to restore a database?

Thanks
 
EXECUTE THESE 2 STEPS FROM Query Analyzer (1 at a time)

Step 1 -- identify Logical DB data & Log names

> restore filelistonly from disk='C:\Your_DBBackup.bak'

Step 2 -- add in logical DB data & Log names

> restore database DW_QA
from disk='f:\Your_DBbackup.bak'
with replace,
move 'Your_DB_Data' to 'C:\Your_DB_Data.mdf', -- (<--- this is LogicalName returned in FileListOnly result)
move 'Your_DB_Log' to 'C:\Your_DB_Log.ldf' -- (<--- this is LogicalName returned in FileListOnly result)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top