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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Database From .BAK 1

Status
Not open for further replies.

BKer

Programmer
Apr 17, 2001
62
US
Can anyone tell me if it is possible to create a database from scratch from a .BAK backup file? Thanks for any info.
 
.Bak files are usually a backup created by SQL backup. Restore the datbase form the file using Enterprise Manager. ________________________________________________________________________________
If you do not like change, get out of the IT business...
 
Ok, as an example I backed up the pubs database onto a network drive and then installed SQL server 2000 on another machine with MSDE. I have copied the .BAK file to my desktop and cannot get it to create a new database from the file. When you go into the restore wizard I try different configurations to call the .BAK file and it always gives me an error. Can anyone tell me how to use .BAK file to create a new database where the database does not already exist on the SQL server. Thanks again
 
what kind of error you getting just type it on so someone can help you out?
 
First thing I do is right click databases in EM and choose restore database. Then, I choose from device from the radio buttons available. Next, I choose select devices and then add the file path of the .BAK on my desktop. I have restore backup set and database complete radio buttons chosen. Then I click ok and get the error.

Microsoft SQL-DMO(ODBC SQLSTATE:42000)
Device Activation error. Physical file 'C:\MSSQL\DATA\pubs.mdf' may be incorrect. File pubs cannot be restored to 'C:\MSSQL\DATA\pubs.mdf' Use WITH MOVE to identify a valid location for the file.
Device Activation error. Physical file 'C:\MSSQL\DATA\pubs_log.ldf' may be incorrect. File pubs_log cannot be restored to 'C:\MSSQL\DATA\pubs_log.ldf'Use WITH MOVE to identify a valid location for the file.

RESTORE DATABASE is terminating abnormally


Thanks,
Brian Kelleher
 
try to do this. go to EM and then right click on the database and click the restore the database from devise and provide the same name for log file and data file in to you computer.

hope this helps.

take care,,,
 
Thanks for the help. It took me a minute to realize that the default path for the log files was wrong and that I had to point to the correct folder.

Thanks alot for the help

Brian Kelleher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top