Showing posts with label means. Show all posts
Showing posts with label means. Show all posts

Friday, March 23, 2012

Problem with SP3

Hi,
Couple of users got this error after installing (MSDE) SP3.
Does anybody know what this means and what to do?
Invalid column name 'published_in_tran_pub'.
(Source: xxxxxxxxxxxxx (Data source); Error number: 207)
-----The
process could not deliver the snapshot to the Subscriber.
(Source: Merge Replication Provider (Agent); Error number: -2147201001)
-----
In use: Merge replication and static filtered publications.
-Katja
This column is related to a new merge agent parameter added with sp3. Can
you check that sp3 has been fully (successfully) installed on distributor,
publisher and subscriber.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Problem with sp_xml_preparedocument and ntext

Hi
I am trying to read by means of sp_xml_preparedocument a document XML stored
in a variable ntext, but this gives me the following error:
XML parsing error: Switch from current encoding to specified encoding not
supported.
Example XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
It is possible to do compatible unicode with xml with encoding:
sp_xml_preparedocument + ntext + encoding
Thank
Cristiánntext requires the encoding to be UCS-2 or UTF-16. You need to do the
conversion on the mid-tier before sending it to sp_xml_preparedocument.
Alternatively, ISO-8859-1 is a 1-byte encoding. Use text instead and a
server code page that implies ISO-8859-1 encoding.
Best regards
Michael
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:646CCD6A-2B00-437A-B01A-EC245AE42A47@.microsoft.com...
> Hi
> I am trying to read by means of sp_xml_preparedocument a document XML
> stored
> in a variable ntext, but this gives me the following error:
> XML parsing error: Switch from current encoding to specified encoding not
> supported.
> Example XML:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
> It is possible to do compatible unicode with xml with encoding:
> sp_xml_preparedocument + ntext + encoding
> Thank
> Cristin
>|||Thanks Michael,
Ok, test with UTF-16 and good, but testing XML in SQL Server 2005, does not
accept UTF-16 but yes UTF-8, ?You Know Why?
XML --> UTF-16 '
Cristián
"Michael Rys [MSFT]" wrote:

> ntext requires the encoding to be UCS-2 or UTF-16. You need to do the
> conversion on the mid-tier before sending it to sp_xml_preparedocument.
> Alternatively, ISO-8859-1 is a 1-byte encoding. Use text instead and a
> server code page that implies ISO-8859-1 encoding.
> Best regards
> Michael
> "sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
> news:646CCD6A-2B00-437A-B01A-EC245AE42A47@.microsoft.com...
>
>|||For example:
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
Error...
but
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
OK
?
> Thanks Michael,
> Ok, test with UTF-16 and good, but testing XML in SQL Server 2005, does no
t
> accept UTF-16 but yes UTF-8, ?You Know Why?
> XML --> UTF-16 '
> Cristián
> "Michael Rys [MSFT]" wrote:
>|||Try:
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:7D87F14A-47F8-4D95-BF91-8D52B121CD75@.microsoft.com...
> For example:
> declare @.XmlInfo xml
> set @.XmlInfo= '<?xml version="1.0" encoding="UTF-16"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> Error...
> but
> declare @.XmlInfo xml
> set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> OK
> ?
>
>|||Hi Roger.
that work, but not thist:
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
why? N-> unicode and UTF-8 idem or not?
"Roger Wolter[MSFT]" wrote:

> Try:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
> news:7D87F14A-47F8-4D95-BF91-8D52B121CD75@.microsoft.com...
>|||other example that work:
declare @.XmlInfo xml,
@.Xml nvarchar(max)
set @.Xml= '<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
set @.XmlInfo = @.Xml
select @.XmlInfo
--nvarchar --> XML
"sqlextreme" wrote:

> Hi
> I am trying to read by means of sp_xml_preparedocument a document XML stor
ed
> in a variable ntext, but this gives me the following error:
> XML parsing error: Switch from current encoding to specified encoding not
> supported.
> Example XML:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
> It is possible to do compatible unicode with xml with encoding:
> sp_xml_preparedocument + ntext + encoding
> Thank
> Cristián
>|||This works because character data is expected to be double-byte
declare @.XmlInfo xml
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
This works because character data is expected to be single-byte.
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
In other words, if the encoding is UTF-8, the string holding it has to be
varchar ('<xml...>'); and if the encoding is UTF-16, then the string holding
it has to be nvarchar (N'<xml...>')
Peter DeBetta, MVP - SQL Server
http://sqlblog.com
--
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:9A0778C0-43D1-4C8D-B7EB-51C99F2F1437@.microsoft.com...
> Hi Roger.
> that work, but not thist:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> why? N-> unicode and UTF-8 idem or not?
> "Roger Wolter[MSFT]" wrote:
>|||The XML parser doesn't like being lied to. If you say it's utf-8 data you
need to pass it 8 bit data. If you say it's utf-16 you need to give it 16
bit data. In your example you prefix the string with an N which means the
string is Unicode so the parser parses Unicode data. When it runs into your
declaration that says it's utf-8 it is already parsing utf-16 so it errors
out because its is doing the wrong thing.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:9A0778C0-43D1-4C8D-B7EB-51C99F2F1437@.microsoft.com...
> Hi Roger.
> that work, but not thist:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> why? N-> unicode and UTF-8 idem or not?
> "Roger Wolter[MSFT]" wrote:
>

Problem with sp_xml_preparedocument and ntext

Hi
I am trying to read by means of sp_xml_preparedocument a document XML stored
in a variable ntext, but this gives me the following error:
XML parsing error: Switch from current encoding to specified encoding not
supported.
Example XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
It is possible to do compatible unicode with xml with encoding:
sp_xml_preparedocument + ntext + encoding
Thank
Cristián
ntext requires the encoding to be UCS-2 or UTF-16. You need to do the
conversion on the mid-tier before sending it to sp_xml_preparedocument.
Alternatively, ISO-8859-1 is a 1-byte encoding. Use text instead and a
server code page that implies ISO-8859-1 encoding.
Best regards
Michael
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:646CCD6A-2B00-437A-B01A-EC245AE42A47@.microsoft.com...
> Hi
> I am trying to read by means of sp_xml_preparedocument a document XML
> stored
> in a variable ntext, but this gives me the following error:
> XML parsing error: Switch from current encoding to specified encoding not
> supported.
> Example XML:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
> It is possible to do compatible unicode with xml with encoding:
> sp_xml_preparedocument + ntext + encoding
> Thank
> Cristin
>
|||Thanks Michael,
Ok, test with UTF-16 and good, but testing XML in SQL Server 2005, does not
accept UTF-16 but yes UTF-8, ?You Know Why?
XML --> UTF-16 ?
Cristián
"Michael Rys [MSFT]" wrote:

> ntext requires the encoding to be UCS-2 or UTF-16. You need to do the
> conversion on the mid-tier before sending it to sp_xml_preparedocument.
> Alternatively, ISO-8859-1 is a 1-byte encoding. Use text instead and a
> server code page that implies ISO-8859-1 encoding.
> Best regards
> Michael
> "sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
> news:646CCD6A-2B00-437A-B01A-EC245AE42A47@.microsoft.com...
>
>
|||For example:
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
Error...
but
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
OK
?
[vbcol=seagreen]
> Thanks Michael,
> Ok, test with UTF-16 and good, but testing XML in SQL Server 2005, does not
> accept UTF-16 but yes UTF-8, ?You Know Why?
> XML --> UTF-16 ?
> Cristián
> "Michael Rys [MSFT]" wrote:
|||Try:
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:7D87F14A-47F8-4D95-BF91-8D52B121CD75@.microsoft.com...[vbcol=seagreen]
> For example:
> declare @.XmlInfo xml
> set @.XmlInfo= '<?xml version="1.0" encoding="UTF-16"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> Error...
> but
> declare @.XmlInfo xml
> set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> OK
> ?
>
>
|||Hi Roger.
that work, but not thist:
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
why? N-> unicode and UTF-8 idem or not?
"Roger Wolter[MSFT]" wrote:

> Try:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
> news:7D87F14A-47F8-4D95-BF91-8D52B121CD75@.microsoft.com...
>
|||other example that work:
declare @.XmlInfo xml,
@.Xml nvarchar(max)
set @.Xml= '<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
set @.XmlInfo = @.Xml
select @.XmlInfo
--nvarchar --> XML
"sqlextreme" wrote:

> Hi
> I am trying to read by means of sp_xml_preparedocument a document XML stored
> in a variable ntext, but this gives me the following error:
> XML parsing error: Switch from current encoding to specified encoding not
> supported.
> Example XML:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <DA><USU tbxp1_varchar1="Sandra Damarid" /></DA>
> It is possible to do compatible unicode with xml with encoding:
> sp_xml_preparedocument + ntext + encoding
> Thank
> Cristián
>
|||This works because character data is expected to be double-byte
declare @.XmlInfo xml
set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-16"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
This works because character data is expected to be single-byte.
declare @.XmlInfo xml
set @.XmlInfo= '<?xml version="1.0" encoding="UTF-8"?>
<COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
In other words, if the encoding is UTF-8, the string holding it has to be
varchar ('<xml...>'); and if the encoding is UTF-16, then the string holding
it has to be nvarchar (N'<xml...>')
Peter DeBetta, MVP - SQL Server
http://sqlblog.com
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:9A0778C0-43D1-4C8D-B7EB-51C99F2F1437@.microsoft.com...[vbcol=seagreen]
> Hi Roger.
> that work, but not thist:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> why? N-> unicode and UTF-8 idem or not?
> "Roger Wolter[MSFT]" wrote:
|||The XML parser doesn't like being lied to. If you say it's utf-8 data you
need to pass it 8 bit data. If you say it's utf-16 you need to give it 16
bit data. In your example you prefix the string with an N which means the
string is Unicode so the parser parses Unicode data. When it runs into your
declaration that says it's utf-8 it is already parsing utf-16 so it errors
out because its is doing the wrong thing.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"sqlextreme" <sqlextreme@.discussions.microsoft.com> wrote in message
news:9A0778C0-43D1-4C8D-B7EB-51C99F2F1437@.microsoft.com...[vbcol=seagreen]
> Hi Roger.
> that work, but not thist:
> set @.XmlInfo= N'<?xml version="1.0" encoding="UTF-8"?>
> <COB><DET Estado="Sandra Damarid" Origen="Vasquez" /></COB>'
> why? N-> unicode and UTF-8 idem or not?
> "Roger Wolter[MSFT]" wrote:

Saturday, February 25, 2012

Problem with printing database diagrams

When I print a database diagram directly, I get the top left corner obsrured on the printout by what looks like an empty popup box. This means the columns names are blanked out for the first 5-6 rows. I have tried this with a variety of printers and the effectis the same on all. The problem appears to be specific to SQL2005 as one of the servers has both SQL2000 and SQL2005. The disagrams from the SQL2000 print perfectly, the ones from SQL2005 do not.

SQL2005 has been patched to SP2.

I have circumvented the problem by writing an SSRS package to print the output of a stored procedure that emulates the database diagram. Also there is an option in SQL2005 database diagrams to get an image of the diagram. I have printed this in Word and it prints flawlessly that way.

I believe this is an unique problem you are facing and I think nothing much done from SQL dev. team.

See thsi http://www.codeproject.com/dotnet/ScriptDiagram2005.asp is any help and you can report the same to MS Connect website http://connect.microsoft.com/

|||Regrettably I still have the problem with diagram on SQL2005 (but SQL2000)
|||

This is not a unique problem.

I've been encountering it for a month or two.

It's intermittent. Sometimes the diagrams are okay, sometimes these boxes obscure fields.

My only work-around is to PRINT SCREEN and then copy it into Word and print it.

|||We are having this same problem. If you copy to Word it will print. Has there been a solution found yet?|||Copying to Word is a good work-around, but is not a solution. It did happen with all the printers I could try at that site.