views:

8704

answers:

4

Is there any way to import a database backup from 2005 into 2008 express edition. What I've had to resort to is doing a script the database, then import all the data through DTS. Whenever I tried to import straight from a backup file it says something about not being to import into a new version of sql server or I'll get the below error.

title: Microsoft SQL Server Management Studio

Specified cast is not valid. (SqlManagerUI)

+1  A: 

SQL 2005 backups should be restored on 2008 without problem (have done that myself many times). What exact error message did you got about versions? The other error (Specified cast is not valid) seems to be Management Studio error, not server error. Have you full rights on 2008 server?

Look at this question - any-reason-to-have-sql-server-2005-and-2008-installed-on-same-machine - there are talked both about restoring SQL2005 backups and about attaching SQL2005 data files.

(Of course you cannot attach production databases. To attach non-production databases just detach them, make file level copy of these and attach copies to new server. Orginal files need to attach to original server too :))

Arvo
A: 

I imagine that you are in a development process where your data will have to be regularly copied to you SQL 2008 server.

You can then think of configuring a replication between the SQL 2005 server (publisher) and SQL Server Express 2008 (suscriber). Depending on your requirements, you have the choice between snapshot or merge replication. If no update is done on the suscriber side, go for snapshot.

Once you want to have your 2008 server running independantely from the publisher, just delete the replication.

Philippe Grondier
A: 

But what if the bkp used different windows principle user name of different server? what do u suggest? plz explain in brief

A: 

A valid SQL Server 2005 Express backup file should be able to be restored to SQL Server 2008 Express. If the SQL Server 2005 backup is from the Standard or Enterprise versions, you might hit problems restoring it to Express. The user context that the backup was created from should not affect the ability to restore that backup.

One thing you can do is to try running the restore operation as a verification, without actually trying to run the restore. That will tell you if the backup file is valid or not. You can use this syntax:

RESTORE VERIFYONLY
FROM yourbackupfile.bak
ScaryDBA