Wednesday, March 28, 2012

Problems importing backup DB into Express

I am trying to import (unless there is a better way) a database (which I made a backup of) from a SQL Server 2005 v8.0 machine into my SQL Server Management Express 2005 machine so that I can have a full complete copy of the backup database in express. The purpose is so that I can treat it as a template, get rid of tables, views, columns I dont need and repopulate them with different data to compliment my other project, which involves auto tagging of .mp3's.

As an analogy: copy an Excel spreadsheet, open it in Excel, delete cells you dont need, keep the rest but fill in with different data. Kinda like that but with SQL.

I can't figure out exactly how to do this with Express 2005. How do you import or otherwise a backup database from SQL Server 2005 v8.0 and get it into Express?

My backup file is called: WebBackup_KUOW_Program_Full

I've tried renaming it using both .mdf and .bak when I Right-Click Databases and select Restore. Fill in everything then click ok. I keep getting this error message:

TITLE: Microsoft SQL Server Management Studio Express

Restore failed for Server 'INTRA\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL\Data\kuow_program.mdf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&LinkId=20476

BUTTONS:

OK

Can anyone help me with this please! Keep in mind I'm not a SQL guru. Thanks in advance for any assistance.

Thats pretty easy, the original data and log file is stored in the backup, if you want to store the file in another path than it was originally placed in (e.g. if you don′t have that drive letter on the new machine) you will have to change the path in the restore dialog. The data and logfiles will then be placed at the specified location.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

No comments:

Post a Comment