If I am understanding your message correctly, you have Arabic data (code
page 1256) stored in a "Latin1" code page 1252 column. You want to move
the Arabic data without any code page transaction into a code page 1256
column so that the column code page matches the code page of the data.
Correct so far?
If so, you could use DTS in a way similar to what Adam described, although
you would have to explicitly disable Autotranslation for both the source
and destination connections (any code page translation will assume that the
source data is 1252 data when it is actually 1256 data).
If your schema isn't terribly complicated you could also use BCP:
A) Script out your database objects (tables/etc) using EM
B) Edit the script and change all of the collations to whatever you
want your destination collation to be
C) Apply the script to a new database using Query Analyzer
D) BCP out the source data using a "-CRAW" command line parameter for
BCP (example: bcp sourcedb.dbo.tbl1 out c:\tbl1.bcp -T -CRAW -n). A
"-CRAW" will tell BCP not to skip all code page translation.
E) BCP the data into the new database using -CRAW. Example: bcp
destdb.dbo.tbl1 in c:\tbl1.bcp -T -CRAW -n
HTH,
Bart
------------
Bart Duncan
Microsoft SQL Server Support
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Adam Machanic" <amachanic@hotmail._removetoemail_.com>
| References: <FB108477-9951-4B51-9BA2-261D590239B3@microsoft.com>
| Subject: Re: Collation Problem any help
| Date: Wed, 23 Feb 2005 10:55:58 -0500
| Lines: 34
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <eAtatAcGFHA.3376@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.datamining
| NNTP-Posting-Host: firewall.getconnected.com 207.31.238.50
| Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
4.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.datamining:6016
| X-Tomcat-NG: microsoft.public.sqlserver.datamining
|
[quoted text, click to view] | "Rani" <Rani@discussions.microsoft.com> wrote in message
| news:FB108477-9951-4B51-9BA2-261D590239B3@microsoft.com...
| >
| > look like garbage any way I've tried the bcp command line utility the
DTS
| > won't work as I'm moving data between diffrent collations the problem
with
|
| Why won't DTS work? I have used DTS to transfer data between
collations
| many times. The steps I take when I need to fix something like this are:
|
| A) Script out your database objects (tables/etc) using EM
| B) Edit the script and change all of the collations to whatever you
want
| your destination collation to be
| C) Apply the script to a new database using Query Analyzer
| D) Use DTS to transfer the data out of the old database into the new
| database
|
| This has worked quite well for me in the past; but I have never done
| this with arabic characters so I can't comment there...
|
| Another thing to try: Create a new NTEXT column in your table with
the
| arabic collation, update the new column with the value from the old
column,
| drop the old column, then use sp_rename to rename the new column to the
old
| column's name... That might be easier and quicker than the DTS option.
|
|
| --
| Adam Machanic
| SQL Server MVP
|
http://www.sqljunkies.com/weblog/amachanic | --
|
|
|
|
|
From: "=?Utf-8?B?UmFuaQ==?=" <Rani@discussions.microsoft.com>
Subject: Collation Problem any help
Date: Tue, 22 Feb 2005 13:35:14 -0800
Newsgroups: microsoft.public.sqlserver.datamining
Hello all :
My problem is like the following I have an online databse with a latin
collation, this database is using ntext and nvarchar values that was with
our
previous admin ok the problem is in the data is stored should use another
collation (the arabic collation) ok ... now I want to use the data in a
database with a corrected collation the problem that I'can't use the data
it
look like garbage any way I've tried the bcp command line utility the DTS
won't work as I'm moving data between diffrent collations the problem with
bcp that it force you to a row delimeter which is charcater 13 or crlf or
enter what ever u want to say okkkk we have a ntext field so any import way
won't work why?? because DTS will use the crlf for new record delimeter so
things are Scrambled and We have crlf in the ntext field , I know it looks
like a tough stuff but i do belive that togther we can help getting it out.
For microsoft staff can I know how bcp is getting the data so in worst case
I'll get the data in the same way (am a vb.net mcp)
thanks and best regards