views:

1343

answers:

4

I've been beating myself over the head with this app migration for a few days now. What I have is an old MSSQL Server 2000-backed application that is being upgraded to a Windows 2003 Server running SMSQL Server 2005. I know little about SQL Server but obviously not enough.

I tried backing up the database on the old server by going to Databases->[Database]->All Tasks->Backup Database..., selecting 'Full', and saving the file. I moved that backup file to the new server and tried to do a restore but it complained saying that it was looking for the [Database].mdf file in the location it was on the old server.

So then I tried to do an Export Data, selected the local SQL 2000 database, pointed it to the new SQL 2005 database on the other machine, and it gets all the way to the end and dies complaining about the way one of the tables is being joined.

I tried then doing a 'Generate SQL' command on the 2000 box and running that under SQL 2005. It looks like there are a lot of outer joins using the old *= syntax that SQL Server 2005 doesn't support anymore and, this being a vendor database, have no idea what their true intentions were when they set up these tables.

Is there any other way I can try migrating this database over?

+2  A: 

You could detach the database from the old server, copy the mdf and ldf (and any other related files) to the server server, and then attach the database to the new server.

When you attach it, SQL Server will upgrade this to a 2005 formatted database. If you have problems with compatibility, you can change that, too. In SQL Server Management studio, Right click your database, click properties, click Options, and change the compatibility mode to 'SQL Server 2000 (80)'.

G Mastros
+4  A: 

The backup file has the "hard" location of the data files stored in it. You just need to update them:

When you restore in 2005, before you click the final "ok" to restore (after you have selected the .bak file), go to the options tab. This will have the mdf and ldf locations that were in the backup file. Change these to legitimate directories on your new machine.

Peter
A: 

The answer is right here, from Microsoft: http://support.microsoft.com/kb/224071

Eduardo
+2  A: 
Eduardo Molteni