Wednesday, March 21, 2012

downgrade SQL2005 to SQL2k - Unicode ANSI issue

Hello,

I created a script with database publishing wizard to convert a SS2005
db into a SS2k db. The script has schema and data and looks very good.
When I try to start the created script in SS2k-Query analyzer, I get an
error like (in german)

Server: Nachr.-Nr. 105, Schweregrad 15, Status 1, Zeile 2
?ffnendes Anführungszeichen vor der Zeichenfolge '????
'.
It meens - translated from german- 'opening quote before string
<blabla>'

In the sript it stops at this line:
EXEC dbo.sp_addextendedproperty @.name=N'GUID', @.value=N'????

In the script many lines before I have many other GUIDs which QA
doesn't complain, so it's an Unicode/ANSI-issue I guess. What to do
now?

thanks
candide_sh(candide_sh@.yahoo.de) writes:

Quote:

Originally Posted by

I created a script with database publishing wizard to convert a SS2005
db into a SS2k db. The script has schema and data and looks very good.
When I try to start the created script in SS2k-Query analyzer, I get an
error like (in german)
>
Server: Nachr.-Nr. 105, Schweregrad 15, Status 1, Zeile 2
ffnendes Anfhrungszeichen vor der Zeichenfolge '??
'.
It meens - translated from german- 'opening quote before string
><blabla>'
>
In the sript it stops at this line:
EXEC dbo.sp_addextendedproperty @.name=N'GUID', @.value=N'??
>
In the script many lines before I have many other GUIDs which QA
doesn't complain, so it's an Unicode/ANSI-issue I guess. What to do
now?


"Database publishing wizard" I will have to admit that this tool is unknown
to me. Do you mean the scripting wizard in Management Studio, or do you mean
a third-party tool?

In any case, the Open File dialog in QA has a File Format combo where you
can specify Unicode format. Normally QA (as many other Windows) tools
determines whether a file is Unicode or not by looking for a byte-order
mark in the beginning of the file. But some tools do not generate a byte-
order mark.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||DB Pub Wizard comes from SS2005, from Microsoft SQLServer2005 website
(search for feature pack)
I guess it creates a script file (myscript.sql) but doesn't create this
file in UNICODE. I searched and played around in SS2005, but I think I
can't influence the behaviour of DB Pub Wizard (writing only ANSI) from
SS2005.

Remember I open QA in SS2000 to start this script. Thanks for your
hint, I found the dialog box in QA and changed the file format to
Unicode, but no success.

--
candide_sh

On 26 Jan., 14:36, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

(candide...@.yahoo.de) writes:

Quote:

Originally Posted by

I created a script with database publishing wizard to convert a SS2005
db into a SS2k db. The script has schema and data and looks very good.
When I try to start the created script in SS2k-Query analyzer, I get an
error like (in german)


>

Quote:

Originally Posted by

Server: Nachr.-Nr. 105, Schweregrad 15, Status 1, Zeile 2
ffnendes Anfhrungszeichen vor der Zeichenfolge '??
'.
It meens - translated from german- 'opening quote before string
<blabla>'


>

Quote:

Originally Posted by

In the sript it stops at this line:
EXEC dbo.sp_addextendedproperty @.name=N'GUID', @.value=N'??


>

Quote:

Originally Posted by

In the script many lines before I have many other GUIDs which QA
doesn't complain, so it's an Unicode/ANSI-issue I guess. What to do
now?"Database publishing wizard" I will have to admit that this tool isunknown


to me. Do you mean the scripting wizard in Management Studio, or do you mean
a third-party tool?
>
In any case, the Open File dialog in QA has a File Format combo where you
can specify Unicode format. Normally QA (as many other Windows) tools
determines whether a file is Unicode or not by looking for a byte-order
mark in the beginning of the file. But some tools do not generate a byte-
order mark.
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
>
Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx- Zitierten Text ausblenden -- Zitierten Text anzeigen -

|||(candide_sh@.yahoo.de) writes:

Quote:

Originally Posted by

DB Pub Wizard comes from SS2005, from Microsoft SQLServer2005 website
(search for feature pack)
I guess it creates a script file (myscript.sql) but doesn't create this
file in UNICODE. I searched and played around in SS2005, but I think I
can't influence the behaviour of DB Pub Wizard (writing only ANSI) from
SS2005.
>
Remember I open QA in SS2000 to start this script. Thanks for your
hint, I found the dialog box in QA and changed the file format to
Unicode, but no success.


I downloaded the DB Publish Wizard, and it does indeed generate a Unicode
file. I had created this table on SQL 2005:

CREATE TABLE utlndsk(a nvarchar(234) NOT NULL)
go
INSERT utlndsk(a) VALUES (nchar(8080) + nchar(324))

and I was able to insert that data successfully on SQL 2000 through
Query Analyzer.

Maybe there is some special catch with extended properties. (I never
use them myself, so I did not play with one.)

What is in that extended property on SQL 2005?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||hello Erland

the GUID-value was created by the upsizing wizard of MS-Access2003 and
I really don't know what for it is. But the conservative way is to not
touch the values created by this wizard. As the script generated by DB
Pub wizard crashed at only this one GUID-value (others worked fine) I
commented this line out and manually copy/pasted this value. Well
done...

On 26 Jan., 23:42, Erland Sommarskog <esq...@.sommarskog.sewrote:

Quote:

Originally Posted by

(candide...@.yahoo.de) writes:

Quote:

Originally Posted by

DB Pub Wizard comes from SS2005, from Microsoft SQLServer2005 website
(search for feature pack)
I guess it creates a script file (myscript.sql) but doesn't create this
file in UNICODE. I searched and played around in SS2005, but I think I
can't influence the behaviour of DB Pub Wizard (writing only ANSI) from
SS2005.


>

Quote:

Originally Posted by

Remember I open QA in SS2000 to start this script. Thanks for your
hint, I found the dialog box in QA and changed the file format to
Unicode, but no success.I downloaded the DB Publish Wizard, and it doesindeed generate a Unicode


file. I had created this table on SQL 2005:
>
CREATE TABLE utlndsk(a nvarchar(234) NOT NULL)
go
INSERT utlndsk(a) VALUES (nchar(8080) + nchar(324))
>
and I was able to insert that data successfully on SQL 2000 through
Query Analyzer.
>
Maybe there is some special catch with extended properties. (I never
use them myself, so I did not play with one.)
>
What is in that extended property on SQL 2005?
>
--
Erland Sommarskog, SQL Server MVP, esq...@.sommarskog.se
>
Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books...
Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

No comments:

Post a Comment