Change Collation Sql Server 2008 Database
Posted by admin on August 30th, 2011
To change the collation of Sql Server 2008 Database, you’ll first need to drop the objects in the database that are dependent of the collation (like functions for instance). Otherwise you will get an error like this
The object ‘…’ is dependent on database collation.
Once you’ve dropped these objects, you can set the collation using this t-sql
1 2 3 4 5 6 | ALTER DATABASE [dbname] SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE [dbname] COLLATE SQL_Latin1_General_CP1_CI_AS ALTER DATABASE [dbname] SET MULTI_USER |
After this, you’ll have to recreate your dropped objects.
Follow Me!