Changing Database Collation

290 pts.
Tags:
Collation
Database administration
Microsoft SQL Server 2000
Hi, I am trying to change the collation of a database and the table and columns, does anyone now how to do this? Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

you may use simple alter statement:

ALTER DATABASE MyDatabase COLLATE <desired collation>

Try it after taking a backup

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BrentSheets
    Moderator Note: Backup before you make any collation changes!
    6,925 pointsBadges:
    report
  • Db23
    The SQL statement specified changes the collation of the table so whenever a new table or columns is created it will use the new collation setting, but what about the current columns in the tables, I need to change those collation as well. The problem I am having is that if the columns is a primary key it won't allow me to change the collation setting on this columns, until I drop the primary key. Does anyone have a script to recreate all the primary key on the database?
    290 pointsBadges:
    report
  • Sous
    check this link http://msdn.microsoft.com/en-us/library/ms175835.aspx the alter statement changes the whole columns: This new default collation is applied to all columns, user-defined data types, variables, and parameters subsequently created in the database. It is also used when resolving the object identifiers specified in SQL statements against the objects defined in the database.
    580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following