Modify the database COLLATE instance in SQLServer2000

Source: Internet
Author: User
1. make sure that no other person is connected to the current database. you can use sp_who to view the connection, and then use kill @ spid to forcibly close the connection. 2. run the SQL statement to modify the Collate attribute of the database, USE [master] GOALTERDATABASE [My_DB] COLLATEFinnish_Swedish_CS_ASGO3. obtain the original CollateUse [My_DB] selectdistinct

1. make sure that no other person is connected to the current database. you can use sp_who to view the connection, and then use kill @ spid to forcibly close the connection. 2. run the SQL statement to modify the Collate attribute of the DATABASE. USE [master] GO ALTER DATABASE [My_DB] COLLATE Finnish_Swedish_CS_AS GO 3. obtain the original Collate Use [My_DB] select distinct

1. To confirm that no other person is connected to the current database, use sp_who to view the connection, and then use kill @ spid to forcibly close the connection.

2. Run the SQL statement to modify the database's Collate attribute.

USE [master]

GO

Alter database [My_DB] COLLATE Finnish_Swedish_CS_AS

GO

3. Obtain the original Collate

Use [My_DB]

Select distinct collationid from syscolumns

4. Set to allow system table update. (Note that you cannot update the system table in SQL Server 2005 !)

EXEC sp_configure 'Allow updates', 1

RECONFIGURE WITH OVERRIDE

5. Update the collationid obtained in step 3 to the new

Update syscolumns set collationid = 49162 -- new

Where collationid in (1359003656) -- old

6. Disable system table update.

EXEC sp_configure 'Allow updates', 0

RECONFIGURE WITH OVERRIDE

OK.

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.