RE: Collation --- please help!

From: jb (jb_at_discussions.microsoft.com)
Date: 06/18/04


Date: Fri, 18 Jun 2004 08:51:02 -0700

Well, if I understand right, in this case "COLLATE database_default" comes to the same thing as not putting in any "COLLATE" at all.

But that's by-the-by. What I'm asking the community is: all the scripts that EM etc. etc. generate include explicit COLLATE <my-SQL-Server-Default-collation> against every column (and database as a whole) I script, so till now I've shipped like that. Would I be advised to (manually) remove all of these, if I don't know what collation my db might get end up used in?? Do you guys do this?

"Konstantinos Michas" wrote:

>
> Hello jb, If understand you right, what you need is to
> specify to your scripts the default_database clause:
>
> ex.
> CREATE TABLE SOMETABLE(Col1 nvarchar(1) COLLATE
> database_default)
>
> Hope this helps!
>
> >-----Original Message-----
> >I need to understand how to supply database creation
> scripts to customers wrt collation issues.
> >
> >I am getting a collation conflict when my SQL code is
> used in USA (developed in UK). It is connected to
> querying the msdb database to do with scheduled jobs.
> >
> >I (think I) understand that this is because:
> >* my database scripts create my db with collation
> Latin1_General_CI_AS , which is the default for UK SQL
> >* customer's database default collation is
> SQL_Latin1_General_CP1_CI_AS, which appears to be the
> (legacy) default for US SQL
> >* so for customer, msdb & my db have different collations
> >
> >I only (intend to) work with UniCode nvarchar()s etc.,
> and I put in N'...' for my literals, so I didn't think
> this was much of an issue. I will look at my code ---
> perhaps I have a problem there.
> >
> >BUT WHAT I REALLY WANTED TO ASK IS THIS:
> >===============================
> >
> >I supply a SQL application to customers. I don't really
> know where it will be used in long run. Maybe I will
> need to support French etc.; certainly for now I need to
> at least support UK & US, with the likelihood that they
> will have different default collations, and obviously I
> don't want customers to have to change their default
> collation.
> >
> >Should my scripts which create dbs at customer sites be
> specifying collations at all? I have read all about it,
> and am not sure. The only reason they do specify
> collations is that, whether I generate scripts from
> EM/QA/VS.NET, they *all* put in explicit collation
> statements (and I don't see a way to suppress this), both
> for the db as a whole, and for every nvarchar() column in
> every table. I am beginning to wonder whether this is a
> (very) bad idea? Should I go through all the generated
> scripts and remove the collation clauses?
> >
> >Please help!
> >
> >.
> >
>



Relevant Pages

  • RE: Collation --- please help!
    ... Microsoft SQL Server Support ... Thread-Topic: Collation --- please help! ... What I'm asking the community is: all the scripts ...
    (microsoft.public.sqlserver.programming)
  • Collation --- please help!
    ... scripts to customers wrt collation issues. ... which is the default for UK SQL ... The only reason they do specify ...
    (microsoft.public.sqlserver.programming)
  • Re: Collation
    ... depending on the collation. ... Rather than having to script the database you should think about storing the ... "COLLATE" clauses that scripts from EM etc. seem to generate in their ... as it seems to me forcing in collation clauses just ...
    (microsoft.public.sqlserver.programming)
  • RE: Install SQL Server 2000 with different COLLATION
    ... When you upgrade an existing SQL 7.0 instance, ... always inherits the 7.0 instance's collation. ... If you want to install SQL ... Microsoft SQL Server Support ...
    (microsoft.public.sqlserver.server)
  • Re: To unicode or not?
    ... Then again, since SQL Server stores Unicode data in the UCS-2 encoding, ... use them with varchar, you simply work with a subset of the characers, ... an SQL collation is just a Windows collation ...
    (comp.databases.ms-sqlserver)