SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Server and user databases using different collations


Server and user databases using different collations

Author
Message
Fishbarnriots
Fishbarnriots
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1132 Visits: 2472
Hi,

I have managed to end up with a server and its' system databases using Latin1_General_CI_AS and the user databases using SQL_Latin1_General_CP1_CI_AS.

All other servers use SQL_Latin1_General_CP1_CI_AS for system and user databases, so this would be out "standard".

Is there anyway to change the server/system databases to use SQL_Latin1_General_CP1_CI_AS without affecting the user databases, if possible I want to avoid having to export objects and data from the user databases, drop the dbs and then recreate and reimport the objects and data.

Any help much appreciated.
jcb
jcb
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4118 Visits: 1044
I got the same problem.

A staging server is using collation_B and the Production server is using collation_A
Te staging server host a lot "unrelated with the problem" DB from other depts.

searching on web and at this very forum found 2 interesting articles:

http://www.sqlservercentral.com/articles/Collation/72182/
http://www.sqlservercentral.com/articles/Collation/70685/


As you can see it can be done but it's not simple.

If you got few DB a reinstall can be a option.
For me I considering to create a new instance with the correct collation and just move the few staging DBs to it

Hope it helps
anthony.green
anthony.green
SSC-Forever
SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)SSC-Forever (46K reputation)

Group: General Forum Members
Points: 46728 Visits: 7604
If you want to change the system collation then you can rebuild the system databases from the install media.

You will want to script out all server objects like, jobs, logins, linked servers, DDL triggers etc.

Make sure you have backups of all your user databases and system databases as you will need to re-attach / restore them as the master database will know nothing about them as it will be like its a fresh server.


http://msdn.microsoft.com/en-gb/library/dd207003(v=sql.105).aspx



How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Hardy21
Hardy21
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4400 Visits: 1399
jcb (8/11/2014)

If you got few DB a reinstall can be a option.
For me I considering to create a new instance with the correct collation and just move the few staging DBs to it

Hope it helps

I also follow the same path - create new instance (if it is feasible) with correct collation and move the DBs to it.

Thanks
John Mitchell-245523
John Mitchell-245523
SSC Guru
SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)SSC Guru (60K reputation)

Group: General Forum Members
Points: 60800 Visits: 17216
Be careful when you do this, because if someone has already compensated for the collation difference by putting COLLATE Latin1_General_CI_AS clauses throughout the code, then things may start breaking.

John
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search