> I assume that you have not standardised on a given collation and the new
> instance has been set up wrong?
No this is not the case. The person(s) who had installed the SQL 2005 boxes
had chosen SQL 2005's default collation but probably having checked the
"Accent Sensitive" check box as I believe that check box is not a default
check box (I might be wrong). And I am getting rid of a SQL 2000 server
by migrating the databases over, so I do want to keep the "new" SQL 2005
Latinxxx collation rather than use the old SQL_Latin...
> What you could do is create a SQL 2000 instance with the new collation and
> move over to that before upgrading to SQL 2005. To actually change the
[quoted text clipped - 4 lines]
> constraints... as you may want to rebuild indexes anyhow. What may be an
> issue is the space needed to do this and the growth you may see.
I had already taken a script from somewhere online that was building me the
script to alter the collations. And I was writing the DROP INDEX statements
for the ones I was getting errors for, altering the collation and then
re-creating
the indexes. Space is not an issue in this case as there's ample room. A
couple of
days ago I was searching again and I read someone saying to change the db's
collation, so I thought about that, I ran the script and I got an error
about
object dependency. I dropped the function that I had previously seen as
giving collation conversion issue, alter the database's collation without
any error
and then re-created the dropped object.
So I had some concerns to reduce SQL 2005 migration issues, whether
I only alter the collations on the columns affected (where I was getting
conversion
errors) or I'd simply do alter all the columns of the whole database, and
most importantly
wasn't sure if I could without any fears simply alter to a different
collation and
not break something in terms of data having changed. I guess other than the
accent sorting matter, everything else should be Ok. So I will change the
collation
of all the columns and also the database.
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q305704&
> At this point in time you should be considering moving to SQL 2008 to
> avoid another migration in the not too distant future.
I have to convince others that it's safe to move these databases to
compatibility
levels of 90 so imagine that there are people who still want to wait for SP1
before
using SQL 2008. My plan is to push SQL 2008 after I finish the migration.
Thanks again
John Bell - 30 Nov 2008 20:47 GMT
>> I assume that you have not standardised on a given collation and the new
>> instance has been set up wrong?
[quoted text clipped - 58 lines]
>
> Thanks again
Hi
Both your collations Latin1_General_CI_AS and as
SQL_Latin1_General_CP1_CI_AS
are accent sensitive. You'll get Latin1_General_CI_AS on a system if you go
through the installation on a new installation on Windows if you just keep
pressing next.
Another option would be to use the COLLATE clause in all statements that
will conflict use character columns in their where or join clauses and/or
when you create the temporary tables.
John
John
Eric Isaacs - 30 Nov 2008 21:09 GMT
You can mitigate the risk of changing the collation by not doing it to
your production database until you have a working script on a test
copy of the production database. If you change the collation on the
database and all the varchar/nvarchar/text/ntext/char/nchar fields in
the database, then add back in all the constraints and indexes and
primary keys that you had to drop, you should be good.
If you opt to go with adding COLLATE statements to all your SQL (which
is an option) I would suggest you collate to Database_Default instead
of a particular collation. If you do this, your database will be more
portable to other servers with other collations.
At the same time, if you're depending on another database for data,
it's a good idea to include COLLATE Database_Default, especially if
you don't have direct control of that other database's collation. If
you're interfacing with a third-party database or don't know for
certain what collation will be in use on the other database, COLLATE
Database_Default is definitely something that should be considered.
Copy that production database, work on a script to change everything,
test the changes, then backup the production database again and apply
the script, and then test in production. If you do that, your risk
should be minimized.
-Eric Isaacs
John Bell - 01 Dec 2008 07:35 GMT
>> I assume that you have not standardised on a given collation and the new
>> instance has been set up wrong?
[quoted text clipped - 58 lines]
>
> Thanks again
Hi
You may want to use something like Red Gates SQL Compare where you can
compare the structure of each database ignoring collation. The databases
should match if you set the options to ignore collation.
john