Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 restore database
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

95 Posts

Posted - 04/27/2010 :  12:54:52  Show Profile  Reply with Quote
Hi friends,

I've a 2005 database DEVEL with default collation and need to change it to Latin1_General_CI_AS. But when I alter the database I get errors that there are dependencies and cannot change the collation.

So, I created a new database called DEV with collation Latin1_General_CI_AS and trying to restore the DEVEL backup onto this DEV database with restore options 'Overwrite the existing database and Preserve the replication settings'. So when the database is restored, it will still have Latin1_General_CI_AS collation. But after restoring DEV from DEVEL, the collation changes back to default in DEV database(restored). Is there a way to preserve this collation setting and then restore the database?

Thanks a lot

Almighty SQL Goddess

38200 Posts

Posted - 04/27/2010 :  12:57:50  Show Profile  Visit tkizer's Homepage  Reply with Quote
No, you will need to remove the dependencies that are causing the collation not to be accepted.

The overwrite option you select in the restore is not relevant to the collation setting.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server

Subscribe to my blog
Go to Top of Page

Yak Posting Veteran

95 Posts

Posted - 04/27/2010 :  13:07:22  Show Profile  Reply with Quote
Is there any way to find all those dependencies and script it may be? Currently, when I run the alter statement to change the collation it only errors out with a couple of dependencies and I get 'The query has exceeded the maximum number of error messages. Only the first 1000 messages will be displayed'.

Is it possible to disable all the check constraints in the database and change the collation?

Thanks again

Edited by - psangeetha on 04/27/2010 13:15:35
Go to Top of Page

Aged Yak Warrior

676 Posts

Posted - 04/30/2010 :  11:47:18  Show Profile  Reply with Quote
You won't be able to add all the constraints back as is which could lead to a compromise of your data. Check constraints are usually there for a reason. Can you live with that? Why the need to change the collation?


-- The problem with socialism is that you eventually run out of other people’s money. -- Margaret Thatcher
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000