An example of modifying database collate in SQL Server 2000

Source: Internet
Author: User

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.

Related Article

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.