Reputation: 2377
How do I change the collation name of all databases in Database to SQL_Latin1_General_CP1_CI_AS in MS-SQL ?
Also I need the new databases to follow this collation name.
Upvotes: 3
Views: 536
Reputation: 4021
Changing the default collation for an instance of SQL Server can be a complex operation and involves the following steps:
Export all your data using a tool such as the bcp Utility. For more information, see Importing and Exporting Bulk Data.
Drop all the user databases.
Rebuild the master database specifying the new collation in the SQLCOLLATION property of the setup command. For example:
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts /[ SAPWD= StrongPassword ] /SQLCOLLATION=CollationName
For more information, see Rebuilding System Databases. Create all the databases and all the objects in them. Import all your data.
The original source is here
Upvotes: 3