Tuesday, February 21, 2012

Restore

How do you restore a database with different collation from another database that does not have the same collation?My immediate response (after a cursory check of SQL BOL) is that COLLATION is not an option in the RESTORE database command. So, I don't think that you can change the collation as part of the restore process.

However, you might be able to do something like:
1. Script the DB to a file (all objects)
2. Edit the script and change the collation for each object (find and replace)
3. Run the DB to create a new DB
4. Copy the data from the old DB to the new DB (perhaps using DTS).

This may sound cumbersome, but I think it might work.

Regards,

hmscott|||I'm doing that right now...

my solution...

Unistall SQL Server and Reinstall with the correct collation...

I know overseas (sorry it's a US thing) they might have a need, but WHY do dba's here in the US use anything but the default?

Anyone?|||Thanx for the reply:

The process that hmscott described was the only solution for it, I have implemented as a last resort, the good thing about too it defragmented the tables and gained some space back.

I think Microsoft should look into finding a standard solution for these kinds of things.

Thanx to all who replyed.

No comments:

Post a Comment