IT Community - Software Programming, Web Development and Technical Support

SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

This is a discussion on SQL Server 2000 migration to SQL Server 2005 Collation Change - Method? within the Database Support forums, part of the Web Development category; SQL Server 2000 migration to SQL Server 2005 Collation Change - Method? Hi All, Scenario Recently migrated a SQL 2000 database ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 04-03-2009, 01:43 AM
arjkhanna arjkhanna is online now
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

Hi All,

Scenario
Recently migrated a SQL 2000 database to a SQL 2005 server.
SQL 2000 Database server collation was SQL_Latin1_General_CP1_CI_AS
SQL 2005 Database server collation was Latin1_General_CI_AS (and this is the collation we want to maintain going forward)



After restoring the SQL 2000 database on SQL 2005 we observed that the database collation was SQL_Latin1_General_CP1_CI_AS. We changed the restored database collation to Latin1_General_CI_AS. We understand that this collation change will apply to newly created tables etc on the database, but that existing tables will continue to have the old 'SQL_Latin1_General_CP1_CI_AS' collation.



What is the best method to update the collation of the existing table fields?



1) Run ALTER TABLE <table name> ALTER COLUMN <colname> <datatype> COLLATE Latin1_General_CI_AS <nullability>
on each table and column.



OR



2) BCP
BCP out data
DROP TABLE
RECREATE TABLE (with new collation>
BCP in data



OR



3) Other methods?
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 04-03-2009, 01:44 AM
bluesky bluesky is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 667
bluesky is on a distinguished road
Default Re: SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

Hi,

I guess you can make use of the 1st option. You can make use of the below link, Setting and Changing the Column Collation for more info.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 04-03-2009, 01:45 AM
arjkhanna arjkhanna is online now
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Re: SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

Hi ,

Recently moved a SQL2000 database to SQL2005.

Collation on SQL 2000 database server was SQL_Latin1_General_CP1_CI_AS
Colaltion on SQL 2005 database server is Latin1_General_CI_AS


After restoring the SQL 2000 database on SQL 2005 we observed that the database collation was SQL_Latin1_General_CP1_CI_AS. We have altered the database collation to Latin1_General_CI_AS. We understand this will work for all new objects created on the database but existing objects (prior to the collation change) will continue to have the 'SQL_Latin1_General_CP1_CI_AS' collation.



What is the best method to change the collation of the older columns to 'Latin1_General_CI_AS' -

1) Run ALTER TABLE ALTER COLUMN <colname> <datatype> COLLATE Latin1_General_CI_AS <nullability>

on each varchar/char column



or



2) For each table

BCP out data

DROP TABLE
RECREATE TABLE (taking the new collation Latin1_General_CI_AS)

BCP in data



3) Other methods?
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-03-2009, 01:47 AM
bluesky bluesky is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 667
bluesky is on a distinguished road
Default Re: SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

Hi

You can use the reliable code that a friend (Alex Baker) published at CodeProject:

SQL Server 2000 Collation Changer. (Free source code)

CodeProject: SQL Server 2000 Collation Changer. Free source code and programming help



Note: Always keep a backup of your database when you make major changes.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-02-2009, 05:42 PM
Somhairle Attilio Somhairle Attilio is offline
D-Web Trainee
 
Join Date: Jul 2009
Posts: 14
Somhairle Attilio is on a distinguished road
Default Re: SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

The database can be used when the backup is in process. If users perform INSERT, UPDATE, or DELETE statements on the database after the backup is complete, the backup will not contain these changes.

Last edited by arjkhanna : 08-02-2009 at 06:12 PM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 10-02-2009, 09:58 PM
Sumit Kumar Sumit Kumar is offline
D-Web Trainee
 
Join Date: Sep 2009
Posts: 2
Sumit Kumar is on a distinguished road
Default Re: SQL Server 2000 migration to SQL Server 2005 Collation Change - Method?

Thanks for the more information, and for more detail please log on to this site

Database Design – Sagar Information Technologies
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Assessment for Sql server 2005? arjkhanna Server Management 3 10-30-2007 10:09 AM
SQL Server 2000 to 2005 S.Vinothkumar Database Support 3 09-27-2007 03:22 AM
What is a Linked Server in sql server 2005? Archer Database Support 2 08-14-2007 03:24 AM
What are different type of Collation Sensitivity in sql server 2005? Archer Database Support 2 07-25-2007 05:01 AM
How Can we change the logon password in SQL Server 2005 ? mobilegeek Database Support 1 07-16-2007 01:39 AM


All times are GMT -7. The time now is 10:12 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0