Hi Everybody,
We have an application which accepts transactions in local regional languages. The SQL Database is in 7.0 and OS is NT, with all latest SPs. We are planning to move it SQL 2000. During our testing we found, that Crystal Reports 9.0 is not able extract data which is in Korean/Chinese Languages but Crystal Reports 8.0 is working fine.
So we planned to move all existing data in SQL 7.0 to Unicode data format. For New data, we can change the datatypes from varchar to nvarchar.
Existing Sort Order as follows,
Unicode data sorting -- Locale ID =3D 1033
case insensitive, kana type insensitive, width insensitive
Sort Order Description ---
---
--
Character Set =3D 1, iso_1
ISO 8859-1 (Latin-1) - Western European 8-bit character set.
Sort Order =3D 52, nocase_iso
Case-insensitive dictionary sort order for use with several We
stern-European languages including English, French, and German
. Uses the ISO 8859-1 character set.
Characters, in Order ---
---
--
! " # $ % & ' ( ) * + , - . / : ; < =3D > ? @. [ \ ] ^ _ ` { | }
~ =A1 =A2 =A3 =A4 =A5 =A6 =A7 =A8 =A9 =AA =AB =AC =AD =AE =AF =B0 = =B1 =B2 =B3 =B4 =B5 =B6 =B7 =B8 =B9 =BA =BB =BC =BD =BE
=BF =D7 =F7 0 1 2 3 4 5 6 7 8 9 A=3Da =C0=3D=E0 =C1=3D=E1 =C2=3D=E2 = =C3=3D=E3 =C4=3D=E4 =C5=3D=E5 =C6=3D=E6 B=3Db C
=3Dc =C7=3D=E7 D=3Dd E=3De =C8=3D=E8 =C9=3D=E9 =CA=3D=EA =CB=3D=EB = F=3Df G=3Dg H=3Dh I=3Di =CC=3D=EC =CD=3D=ED =CE=3D=EE =CF=3D=EF J
=3Dj K=3Dk L=3Dl M=3Dm N=3Dn =D1=3D=F1 O=3Do =D2=3D=F2 =D3=3D=F3 = =D4=3D=F4 =D5=3D=F5 =D6=3D=F6 =D8=3D=F8 P=3Dp Q=3Dq R=3Dr S
=3Ds =DF T=3Dt U=3Du =D9=3D=F9 =DA=3D=FA =DB=3D=FB =DC=3D=FC V=3Dv = W=3Dw X=3Dx Y=3Dy =DD=3D=FD =FF Z=3Dz =D0=3D=F0 =DE=3D=FE
Can anybody help me, how to convert existing data (Korean/chinese) to the Unicode format in SQL 2000.
tks in advance,
vasumVasum,
Is this the same issue that is posted with the subject "UNICODE" in the
microsoft.public.sqlserver.programming group? If so, see the replies
there.
Thanks,
Bart
--
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
Content-Class: urn:content-classes:message
From: "vasum" <vasu22_madhavan@.yahoo.com.sg>
Sender: "vasum" <vasu22_madhavan@.yahoo.com.sg>
Subject: Converting Existing Data into Unicode Format?
Date: Sat, 5 Jul 2003 21:10:21 -0700
Lines: 64
Message-ID: <034501c34374$848f5880$a501280a@.phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNDdISPYMUUigRbRNmnrEVJZrvb6Q==X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.sqlserver.server
Path: cpmsftngxa09.phx.gbl
Xref: cpmsftngxa09.phx.gbl microsoft.public.sqlserver.server:23000
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.public.sqlserver.server
Hi Everybody,
We have an application which accepts transactions in local
regional languages. The SQL Database is in 7.0 and OS is
NT, with all latest SPs. We are planning to move it SQL
2000. During our testing we found, that Crystal Reports
9.0 is not able extract data which is in Korean/Chinese
Languages but Crystal Reports 8.0 is working fine.
So we planned to move all existing data in SQL 7.0 to
Unicode data format. For New data, we can change the
datatypes from varchar to nvarchar.
Existing Sort Order as follows,
Unicode data sorting
--
Locale ID = 1033
case insensitive, kana type insensitive, width insensitive
Sort Order Description
---
---
--
Character Set = 1, iso_1
ISO 8859-1 (Latin-1) - Western European 8-bit
character set.
Sort Order = 52, nocase_iso
Case-insensitive dictionary sort order for use with
several We
stern-European languages including English, French,
and German
. Uses the ISO 8859-1 character set.
Characters, in Order
---
---
--
! " # $ % & ' ( ) * + , - . / : ; < = > ? @. [ \ ] ^ _
` { | }
~ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º »
¼ ½ ¾
¿ × ÷ 0 1 2 3 4 5 6 7 8 9 A=a À=à Á=á Â=â Ã=ã Ä=ä Å=å
Æ=æ B=b C
=c Ç=ç D=d E=e È=è É=é Ê=ê Ë=ë F=f G=g H=h I=i Ì=ì Í=í
Î=î Ï=ï J
=j K=k L=l M=m N=n Ñ=ñ O=o Ò=ò Ó=ó Ô=ô Õ=õ Ö=ö Ø=ø P=p
Q=q R=r S
=s ß T=t U=u Ù=ù Ú=ú Û=û Ü=ü V=v W=w X=x Y=y Ý=ý ÿ Z=z
Ð=ð Þ=þ
Can anybody help me, how to convert existing data
(Korean/chinese) to the Unicode format in SQL 2000.
tks in advance,
vasum
Showing posts with label unicode. Show all posts
Showing posts with label unicode. Show all posts
Thursday, March 29, 2012
Monday, March 19, 2012
convert unicode to greek
hello
i have a table like this
CREATE TABLE [dbo].[test1] (
[nom] [nchar] (10) COLLATE Greek_CI_AI NULL ,
[prenom] [nchar] (10) COLLATE Greek_BIN NULL
) ON [PRIMARY]
GO
i insert some string in greek caracter in it but when a execute a select a
have a result in latin
could you help mepierreyves,
What are you using to view the data?
Is your tool what is mapping the Greek Characters to Latin when you look at
them?
Russell Fields
"pierreyves" <pierreyves@.digitallife.be> wrote in message
news:%23G7FzVTfDHA.1764@.TK2MSFTNGP09.phx.gbl...
> hello
> i have a table like this
> CREATE TABLE [dbo].[test1] (
> [nom] [nchar] (10) COLLATE Greek_CI_AI NULL ,
> [prenom] [nchar] (10) COLLATE Greek_BIN NULL
> ) ON [PRIMARY]
> GO
> i insert some string in greek caracter in it but when a execute a select a
> have a result in latin
> could you help me
>
i have a table like this
CREATE TABLE [dbo].[test1] (
[nom] [nchar] (10) COLLATE Greek_CI_AI NULL ,
[prenom] [nchar] (10) COLLATE Greek_BIN NULL
) ON [PRIMARY]
GO
i insert some string in greek caracter in it but when a execute a select a
have a result in latin
could you help mepierreyves,
What are you using to view the data?
Is your tool what is mapping the Greek Characters to Latin when you look at
them?
Russell Fields
"pierreyves" <pierreyves@.digitallife.be> wrote in message
news:%23G7FzVTfDHA.1764@.TK2MSFTNGP09.phx.gbl...
> hello
> i have a table like this
> CREATE TABLE [dbo].[test1] (
> [nom] [nchar] (10) COLLATE Greek_CI_AI NULL ,
> [prenom] [nchar] (10) COLLATE Greek_BIN NULL
> ) ON [PRIMARY]
> GO
> i insert some string in greek caracter in it but when a execute a select a
> have a result in latin
> could you help me
>
Convert to Unicode
Hi all
I have an Sql2k database with SQL Server Sort Order 185 on Code Page 1252
for non-Unicode Data
Now customers from latvia needs to use this database concurrently , is it
possible to convert the tables to Unicode when it is already running live?
Best regards
Henrik Hasselblad
SYSteamThis is a multi-part message in MIME format
--=_NextPart_000_61137148
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
You will have to change all varchars to nvarchars. You will need to
check that no string is bigger than 4000 chars and that you don't
violate the 8060 byte max rowsize.
Changing the values via alter column may cause problems too.
You can chnage the collation via alter database.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
--=_NextPart_000_61137148
Content-Type: text/html; name="_alt.0"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="_alt.0"
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4=2E0= Transitional//EN">
&
Careful=2E Is transdate your= partitioning
column or is month? Make sure to include the partitioning= column in the
WHERE clause=2E
-- Tom
----=--Thomas
A=2E Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist,= SQL Server
ProfessionalToronto, ON Canadahref=3D"www=2Epinnaclepublishi=">http://www=2Epinnaclepublishing=2Ecom/sql">www=2Epinnaclepublishi=ng=2Ecom/sql
"George" wrote in
message ne=ws:E5C82E40-6AE6-444D-B939-FC55D20B19C4@.microsoft=2Ecom=2E=2E=2EThanks
a lot for Tom and Dan=2E I have changed the partition tables= divided by month, and
created the table with CHECK constraint=2E My script only= references V_use once
per query, and, even as simple as 'select * from v_use where= transdate between
@.d1 and @.d2' will call every base table, although most of them= only takes 1%~2%
total cost=2E Thanks again=2E
--=_NextPart_000_61137148--
I have an Sql2k database with SQL Server Sort Order 185 on Code Page 1252
for non-Unicode Data
Now customers from latvia needs to use this database concurrently , is it
possible to convert the tables to Unicode when it is already running live?
Best regards
Henrik Hasselblad
SYSteamThis is a multi-part message in MIME format
--=_NextPart_000_61137148
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
You will have to change all varchars to nvarchars. You will need to
check that no string is bigger than 4000 chars and that you don't
violate the 8060 byte max rowsize.
Changing the values via alter column may cause problems too.
You can chnage the collation via alter database.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
--=_NextPart_000_61137148
Content-Type: text/html; name="_alt.0"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="_alt.0"
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4=2E0= Transitional//EN">
&
Careful=2E Is transdate your= partitioning
column or is month? Make sure to include the partitioning= column in the
WHERE clause=2E
-- Tom
----=--Thomas
A=2E Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist,= SQL Server
ProfessionalToronto, ON Canadahref=3D"www=2Epinnaclepublishi=">http://www=2Epinnaclepublishing=2Ecom/sql">www=2Epinnaclepublishi=ng=2Ecom/sql
"George"
message ne=ws:E5C82E40-6AE6-444D-B939-FC55D20B19C4@.microsoft=2Ecom=2E=2E=2EThanks
a lot for Tom and Dan=2E I have changed the partition tables= divided by month, and
created the table with CHECK constraint=2E My script only= references V_use once
per query, and, even as simple as 'select * from v_use where= transdate between
@.d1 and @.d2' will call every base table, although most of them= only takes 1%~2%
total cost=2E Thanks again=2E
--=_NextPart_000_61137148--
Sunday, March 11, 2012
convert tables in a database to use unicode
Hi!
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malinthis is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it change
d?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time
or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to t
he
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensu
re
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malinthis is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it change
d?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time
or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to t
he
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensu
re
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
convert tables in a database to use unicode
Hi!
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malinthis is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it changed?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to the
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
--
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malinthis is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it changed?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to the
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
--
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
convert tables in a database to use unicode
Hi!
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malin
this is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it changed?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to the
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>
|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com
|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
I have to convert all nonUnicode-fields in a database to use unicode. I
tried to convert one column and realized that it will take very long time or
the memory usage will be too high.
If I create a database (a copy of the one that is used) and create tables
that use unicode in this one and then export the data from the old db to the
new db, is this a good idea? Are there any better ways ( there always are
:-), anyone who has more experience than me?)
Thanks for help!
//Malin
this is how I would do it.
script out all the objects into individual scripts.
create a vb script to search and replace varchar with nvarchar, char with
nchar and text with ntext.
build a database using the scripts.
run a comparison and synchronization on using the newly created database as
the source and the target which would be a copy of the entended database and
record the delta script.
Job done using DB Ghost.
Although the above is certainly possible it lacks any change management. If
you have all your source code in source control the changes could be
automatically made by checking out all the source and running the procedures
above. You'd then have a history of what is changing with your database code
via all the functions of your source control - such as who changed this? why
was it changed? when was it changed? how was it changed? where was it changed?
most people use source control for procedural code - why not database code?
DB Ghost gives you a fast, easy way to manage your database code using your
favorite source control.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Malin Davidsson" wrote:
> Hi!
> I have to convert all nonUnicode-fields in a database to use unicode. I
> tried to convert one column and realized that it will take very long time or
> the memory usage will be too high.
> If I create a database (a copy of the one that is used) and create tables
> that use unicode in this one and then export the data from the old db to the
> new db, is this a good idea? Are there any better ways ( there always are
> :-), anyone who has more experience than me?)
> Thanks for help!
> //Malin
>
>
|||Hmm... that's a very complex solution to a very simple problem.
Here's a much simpler way of achieving this goal:
1. Backup your DB if possible.
2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
Here, the script must take into account the size of the table row, to ensure
that you do not exceed 8060 bytes. This is quite simple to do though.
Run this script to loop over all DB tables.
Question: Do you also need to convert TEXT fields to NTEXT, or only from
VARCHAR to NVARCHAR?
I can help out with the script, if you need assistance.
Omri.
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com
|||my main point in doing it this way is to have all changes under source
control...
"Omri Bahat" wrote:
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
|||Hi!
Yes I also want to change text to ntext, how do I do that? I tried alter
table but noticed tha I'm not allowed to change text-columns... :-/
thanks for all help!
//Malin
"Omri Bahat" <OmriBahat@.discussions.microsoft.com> wrote in message
news:06EAC641-ECFD-4E77-B8FE-01E5D8A83326@.microsoft.com...
> Hmm... that's a very complex solution to a very simple problem.
> Here's a much simpler way of achieving this goal:
> 1. Backup your DB if possible.
> 2. Use a simple T-SQL script that converts all VARCHAR fields to NVARCHAR.
> Here, the script must take into account the size of the table row, to
> ensure
> that you do not exceed 8060 bytes. This is quite simple to do though.
> Run this script to loop over all DB tables.
> Question: Do you also need to convert TEXT fields to NTEXT, or only from
> VARCHAR to NVARCHAR?
> I can help out with the script, if you need assistance.
> Omri.
> --
> Omri Bahat
> SQL Farms Solutions
> www.sqlfarms.com
>
Thursday, March 8, 2012
Convert String into unicode
Hello everybody,
I want to convert string into unicode when i using the select statement, how
can i do ?
Thanks in advance .
^^
The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
I want to convert string into unicode when i using the select statement, how
can i do ?
Thanks in advance .
^^
The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
Convert String into unicode
Hello everybody,
I want to convert string into unicode when i using the select statement, how
can i do '
Thanks in advance .
^^The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
I want to convert string into unicode when i using the select statement, how
can i do '
Thanks in advance .
^^The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
Convert String into unicode
Hello everybody,
I want to convert string into unicode when i using the select statement, how
can i do '
Thanks in advance .
^^The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
I want to convert string into unicode when i using the select statement, how
can i do '
Thanks in advance .
^^The most simple is:
SELECT CAST('abc' AS NVARCHAR)
As I am not sure of the context of your issue (eg, using .NET, ODBC,
etc) much of the desired result depends on how you access your DB.
Subscribe to:
Posts (Atom)