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?
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?
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?
Terry
-- The problem with socialism is that you eventually run out of other people’s money. -- Margaret Thatcher