Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Tuesday, March 20, 2012

[XML Task] Error: An error occurred with the following error message: There are multiple root el

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Kevin Rodgers wrote:

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Well of course as soon as I posted that I found an obvious bug: the xsl:stylesheet start tag should not be an empty element tag. But fixing that to:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

leads to an even more obscure error message:

[XML Task] Error: An error occurred with the following error message: "XSLT compile error.".

|||

Kevin Rodgers wrote:

Kevin Rodgers wrote:

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Well of course as soon as I posted that I found an obvious bug: the <xsl:stylesheet> start tag should not be an empty element tag. But fixing that to:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

leads to an even more obscure error message:

[XML Task] Error: An error occurred with the following error message: "XSLT compile error.".

Sorry to follow up again to my own question, but when I tried to run the transformation via Saxon (the free, open-source, fully compliant XSLT processor) it helpfully reported:

Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor

And changing the xsl:stylesheet start tag to:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

did indeed allow SSIS to execute the XML task succesfully. But(!) the stylesheet did not work correctly. With Saxon, it correctly adds ihs_cats_seq attributes to each kw element, e.g.

<keywords><kw ihs_cats_seq="1">AERODYNAMICS</kw><kw ihs_cats_seq="2">AMENDMENT</kw><kw ihs_cats_seq="3">LOCATION</kw><kw ihs_cats_seq="4">ORGANISATION</kw><kw ihs_cats_seq="5">RECORD</kw><kw ihs_cats_seq="6">SCHEDULE</kw><kw ihs_cats_seq="7">SERIES</kw></keywords>

But SSIS adds ihs_cats_seq="" to each kw start-tag. Is there a known bug with the position() XPath function?

|||

I was able to get an answer in a different forum:

http://forums.microsoft.com/msdn/showpost.aspx?postid=654370

[XML Task] Error: An error occurred with the following error message: There are multiple roo

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Kevin Rodgers wrote:

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Well of course as soon as I posted that I found an obvious bug: the xsl:stylesheet start tag should not be an empty element tag. But fixing that to:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

leads to an even more obscure error message:

[XML Task] Error: An error occurred with the following error message: "XSLT compile error.".

|||

Kevin Rodgers wrote:

Kevin Rodgers wrote:

I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables. It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags. Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right. I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@.*|node()">
<xsl:copy>
<xsl:apply-templates select="@.*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="kw">
<xsl:copy>
<xsl:apply-templates select="@.*"/>
<xsl:attribute name="ihs_cats_seq" select="position()"/>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Its 5th line is the first xsl:template element.

What is going on here? I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

Well of course as soon as I posted that I found an obvious bug: the <xsl:stylesheet> start tag should not be an empty element tag. But fixing that to:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

leads to an even more obscure error message:

[XML Task] Error: An error occurred with the following error message: "XSLT compile error.".

Sorry to follow up again to my own question, but when I tried to run the transformation via Saxon (the free, open-source, fully compliant XSLT processor) it helpfully reported:

Warning: Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor

And changing the xsl:stylesheet start tag to:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

did indeed allow SSIS to execute the XML task succesfully. But(!) the stylesheet did not work correctly. With Saxon, it correctly adds ihs_cats_seq attributes to each kw element, e.g.

<keywords><kw ihs_cats_seq="1">AERODYNAMICS</kw><kw ihs_cats_seq="2">AMENDMENT</kw><kw ihs_cats_seq="3">LOCATION</kw><kw ihs_cats_seq="4">ORGANISATION</kw><kw ihs_cats_seq="5">RECORD</kw><kw ihs_cats_seq="6">SCHEDULE</kw><kw ihs_cats_seq="7">SERIES</kw></keywords>

But SSIS adds ihs_cats_seq="" to each kw start-tag. Is there a known bug with the position() XPath function?

|||

I was able to get an answer in a different forum:

http://forums.microsoft.com/msdn/showpost.aspx?postid=654370

sql

[varchar] (100) and empty space

Hello

I am creating the following table

CREATE TABLE [dbo].[myT] (
[name] [varchar] (100) NULL
)

if I do

INSERT INTO myT (name) VALUES ('A')

i get in the table a column with

A ...

the 100 char place is full even if there is a data with only 1 char

how is it possible to avoid it ?
I want 100 char maximum but not full with nothing

thank you for helpingWhat do you get when you run this?:

select len([Name]), '[' + [Name] + ']' from myT

Name is a reserved word, and so it is not a good label for a column, but I don't think this would cause the problem you are seeing.|||the 100 char place is full even if there is a data with only 1 charHow do you know?

Could this be a display issue of whatever client program you use to display the data?
Only CHAR columns are padded to the full length not VARCHAR columns|||I know it when I fill a formula with datas I am getting 99 empty spaces

blindman it is an exemple i have no column named [name]

if i run select datalength(name) from myT
i am getting 200 2 times (100)|||Strange I just ran all the scripts above & everything looks good to me

I get 1 from select datalength(name) from myT

anselme

take a deep breath reboot and start running these scripts again

If this does'nt work

Reply here and

stop using the word Char as in the 100 char place is full even if there is a data with only 1 char

explain what query editor you are using

explain what database you are using

run the script exactly as blindman suggests select len([Name]), '[' + [Name] + ']' from myT and tell us exactly the output

GW|||blindman it is an exemple i have no column named [name]You have some sort of typo, and if you expect any more help on this you need to post the actual code so we don't waste more of our time.|||I know it when I fill a formula with datas I am getting 99 empty spacesSQL Server does not have "formulas" to be "filled" (whatever that should mean).
What exactly are you doing?|||i agree with Gwilliy everything looks cool for me too....
varchar will only occupy the required number of space...
however if still problems persist you can always use LTRIM and RTRIM to get rid of the remaining whitespaces

so your query will be something like
select LTRIM(RTRIM([name])) from myT

thats the most we can get you....

However the fact that the 100 varchar place is full still mystifies me|||However the fact that the 100 varchar place is full still mystifies me
I suspect this is a front end issue.
What is this "formula" thing he is filling in?

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?sql

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Canno

Anybody know what causes this?When you use SSIS, does both ends of the connection have to use SQL Server 2005 when you use a Transfer Server Objects Task?|||I also get this error. I'm trying to transfer one table between two SQL2005 servers (local and remote). Both connections test OK in the Connection Manager Editor.|||I, too, get this error. Has anyone been able to resolve this?

[TCP/IP Sockets]ConnectionCheckForData (CheckforData())

MS SQL 2000.
When I attempt a SELECT I get the following:
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData
(CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broken
The offending SELECT
select a.account
from table1 a
where a.doc = '123456A'
and (select count(1)
from table1 b
where a.account = b.account
and a.doc = b.doc
and a.oseq = b.oseq
and a.party = b.party) > 1
If I do the SELECT with out the sub select it works fine. Suggestions?Reworking the statement worked around the issue.
=?Utf-8?B?Sm9obiBCZWxs?= <jbellnewsposts@.hotmail.com> wrote:
>Hi Scott
>Having DDL and sample data with the expected results from that data would be
>nice. See http://www.aspfaq.com/etiquette.asp?id=5006
>"Scott Sheen" wrote:
>> MS SQL 2000.
>> When I attempt a SELECT I get the following:
>> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData
>> (CheckforData()).
>> Server: Msg 11, Level 16, State 1, Line 0
>> General network error. Check your network documentation.
>> Connection Broken
>>
>> The offending SELECT
>> select a.account
>> from table1 a
>> where a.doc = '123456A'
>> and (select count(1)
>> from table1 b
>> where a.account = b.account
>> and a.doc = b.doc
>> and a.oseq = b.oseq
>> and a.party = b.party) > 1
>If this worked it wouldreturn multiple rows of the same account number
>How about:
>SELECT a.account
>FROM table1 a
>JOIN table1 b ON a.account = b.account
> and a.doc = b.doc
> and a.oseq = b.oseq
> and a.party = b.party
>WHERE a.doc = '123456A'
>GROUP BY a.account
>HAVING COUNT(*) > 1
>
>> If I do the SELECT with out the sub select it works fine. Suggestions?
>>
>Johnsql

Monday, March 19, 2012

[SQLSTATE 42000] (Error 22029).

We have SQL Server 2000 installed on Windows 2003
machine. Get following error while doing database
maintenance
Executed as user: server\sqladmin. sqlmaint.exe failed.
[SQLSTATE 42000] (Error 22029). The step failed.
SQL Server log doesn't say anything either.
Any idea on what could be wrong? Thanks.
You need to look at the maintenance plan history or the report file for that
job to find the error.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"anonymous" <anonymous@.discussions.microsoft.com> wrote in message
news:885c01c48531$710fd050$a601280a@.phx.gbl...
> We have SQL Server 2000 installed on Windows 2003
> machine. Get following error while doing database
> maintenance
> Executed as user: server\sqladmin. sqlmaint.exe failed.
> [SQLSTATE 42000] (Error 22029). The step failed.
> SQL Server log doesn't say anything either.
> Any idea on what could be wrong? Thanks.

[SQLCE Mobile]Do Select during Transaction

Hi,

I need to do a Select and after a Insert during a Transaction. But when i want to commit this transaction i've the following error message :

The transaction can not be committed if there are any opened cursors in the scope of this transaction. Make sure all data readers / result sets are explicitly closed before committing the change.

I don't understand this error message. How can i close my cursors.

Before my Insert i'm closing my SqlCeDataReader and i dispose it. My SqlCeCommand are also closed and dispose.

Do you have any ID?

Thanks.

Hi Kardath,

I tried to repro this here and could not reproduce the problem. I am able to have both INSERT and SELECT in a single transaction. Can you please try to dispose the all the sqlce objects and see if the problem disappers?

Thanks,

Laxmi

Thursday, March 8, 2012

[OT] User-Defined string Functions Transact-SQL

Ladies and Gentlemen,

I am pleased to offer, free of charge, the following string functions Transact-SQL:

AT(): Returns the beginning numeric position of the nth occurrence of a character expression within another character expression, counting from the leftmost character.
RAT(): Returns the numeric position of the last (rightmost) occurrence of a character string within another character string.
OCCURS(): Returns the number of times a character expression occurs within another character expression (including overlaps).
OCCURS2(): Returns the number of times a character expression occurs within another character expression (excluding overlaps).
PADL(): Returns a string from an expression, padded with spaces or characters to a specified length on the left side.
PADR(): Returns a string from an expression, padded with spaces or characters to a specified length on the right side.
PADC(): Returns a string from an expression, padded with spaces or characters to a specified length on the both sides.
CHRTRAN(): Replaces each character in a character expression that matches a character in a second character expression with the corresponding character in a third character expression.
STRTRAN(): Searches a character expression for occurrences of a second character expression, and then replaces each occurrence with a third character expression. Unlike a built-in function Replace, STRTRAN has three additional parameters.
STRFILTER(): Removes all characters from a string except those specified.
GETWORDCOUNT(): Counts the words in a string.
GETWORDNUM(): Returns a specified word from a string.
GETALLWORDS(): Inserts the words from a string into the table.
PROPER(): Returns from a character expression a string capitalized as appropriate for proper names.
RCHARINDEX(): Similar to the Transact-SQL function Charindex, with a Right search.
ARABTOROMAN(): Returns the character Roman numeral equivalent of a specified numeric expression (from 1 to 3999).
ROMANTOARAB(): Returns the number equivalent of a specified character Roman numeral expression (from I to MMMCMXCIX).

AT, PADL, PADR, CHRTRAN, PROPER: Similar to the Oracle functions PL/SQL INSTR, LPAD, RPAD, TRANSLATE, INITCAP.

Plus, there are CHM files in English, French, Spanish, German and Russian.

More than 6000 people have already downloaded my functions. I hope you will find them useful as well.

For more information about string UDFs Transact-SQL please visit the
http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,54,33,27115

Please, download the file
http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,2,27115

With the best regards.DON'T LOOK AT THE LIGHT!

If you give me a cheesburger today, I'll gladly pay you next Thursday|||Didn't this guy post before under a different name, and get his code ripped apart?|||Same name, different forum, same ineffecient code

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54333

[ODBC SQL Server Driver]Connot generate SSPI Context Anybody ...

We get the following error: Connection Failed:
SQLState: 'HY000' SQL Server Error:
1060 [microsoft][ODBC SQL Server Driver]Connot generate
SSPI Context Anybody ...
client : windows nt4
server : Windows 2000 sql server 7.x
but on Windows XP it goes very well.
any ideas ?Check the following Knowledge Base article:
Missing Windows NT LM Security Support Provider registry key
causes "Cannot Generate SSPI Context" error message when you
connect to SQL Server
http://support.microsoft.com/?id=269541
-Sue
On Fri, 2 Apr 2004 08:36:22 -0800, "amichaud"
<anonymous@.discussions.microsoft.com> wrote:

>We get the following error: Connection Failed:
>SQLState: 'HY000' SQL Server Error:
>1060 [microsoft][ODBC SQL Server Driver]Connot generate
>SSPI Context Anybody ...
>client : windows nt4
>server : Windows 2000 sql server 7.x
>
>but on Windows XP it goes very well.
>any ideas ?

[ODBC SQL Server Driver]Connot generate SSPI Context Anybody ...

We get the following error: Connection Failed:
SQLState: 'HY000' SQL Server Error:
1060 [microsoft][ODBC SQL Server Driver]Connot generate
SSPI Context Anybody ...
client : windows nt4
server : windows 2000 sql server 7.x
but on windows xp it goes very well.
any ideas ?
Check the following Knowledge Base article:
Missing Windows NT LM Security Support Provider registry key
causes "Cannot Generate SSPI Context" error message when you
connect to SQL Server
http://support.microsoft.com/?id=269541
-Sue
On Fri, 2 Apr 2004 08:36:22 -0800, "amichaud"
<anonymous@.discussions.microsoft.com> wrote:

>We get the following error: Connection Failed:
>SQLState: 'HY000' SQL Server Error:
>1060 [microsoft][ODBC SQL Server Driver]Connot generate
>SSPI Context Anybody ...
>client : windows nt4
>server : windows 2000 sql server 7.x
>
>but on windows xp it goes very well.
>any ideas ?

Tuesday, March 6, 2012

[Named Pipes]Specified Sql server not found]

I am trying to create Sql Server 2000 remotely using and getting following e
rror on some of the machine, but on some of the machine it is working fine.
All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified S
ql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all
the machine. I only installed Sql Server SP3a, after that it is starting gi
vig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004I sort out the problem, by installing MDAC 2.8. Now it is working fine.
"Ashish Kanoongo" <ashishk@.armour.com> wrote in message news:OwSuidHSEHA.139
2@.TK2MSFTNGP09.phx.gbl...
I am trying to create Sql Server 2000 remotely using and getting following e
rror on some of the machine, but on some of the machine it is working fine.
All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified S
ql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all
the machine. I only installed Sql Server SP3a, after that it is starting gi
vig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004|||Get the actual OS Error number. Example if the Error is 53, then the error
is Network Name not Found. Usually a WINS issue.
Test with a ODBC DSN to get the entire error message and re-post it here.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

[Named Pipes]Specified Sql server not found]

I am trying to create Sql Server 2000 remotely using and getting following error on some of the machine, but on some of the machine it is working fine. All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified Sql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all the machine. I only installed Sql Server SP3a, after that it is starting givig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004
I sort out the problem, by installing MDAC 2.8. Now it is working fine.
"Ashish Kanoongo" <ashishk@.armour.com> wrote in message news:OwSuidHSEHA.1392@.TK2MSFTNGP09.phx.gbl...
I am trying to create Sql Server 2000 remotely using and getting following error on some of the machine, but on some of the machine it is working fine. All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified Sql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all the machine. I only installed Sql Server SP3a, after that it is starting givig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004
|||Get the actual OS Error number. Example if the Error is 53, then the error
is Network Name not Found. Usually a WINS issue.
Test with a ODBC DSN to get the entire error message and re-post it here.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

[MSSQL] Which port

Hi all,
I have the following problem.
I know that MSSQL resides under given IP adress but I do not know under
which port. Who konows how to determine this port number?
Best wihses,
Marek Powichrowski
Hi,
Open the SQL Server Error log and see which port SQL Server is using. By
default SQL Server default instance use the port 1433.
You could also use the Server network utility from SQL Server program groups
of SQL Server machine
and click properties in TCP/IP protocol to get the port number.
Thanks
Hari
SQL Server MVP
"news.task.gda.pl" <marek@.telbank.pl> wrote in message
news:d77u99$dgu$1@.korweta.task.gda.pl...
> Hi all,
> I have the following problem.
> I know that MSSQL resides under given IP adress but I do not know under
> which port. Who konows how to determine this port number?
> Best wihses,
> Marek Powichrowski
>
|||Uytkownik "Hari Prasad" <hari_prasad_k@.hotmail.com> napisa w wiadomoci
news:eDkDhevYFHA.1148@.tk2msftngp13.phx.gbl...
> Hi,
> Open the SQL Server Error log and see which port SQL Server is using. By
> default SQL Server default instance use the port 1433.
> You could also use the Server network utility from SQL Server program
> groups of SQL Server machine
> and click properties in TCP/IP protocol to get the port number.
Hari,
I know this but I want to know how to do this without network utility and
serwer error log. What I must send to SQL serwer and what resposne from
given port give me information that under given port resides MSSQL?
Best wishes,
Marek Powichrowski

[MSSQL] Which port

Hi all,
I have the following problem.
I know that MSSQL resides under given IP adress but I do not know under
which port. Who konows how to determine this port number?
Best wihses,
Marek PowichrowskiHi,
Open the SQL Server Error log and see which port SQL Server is using. By
default SQL Server default instance use the port 1433.
You could also use the Server network utility from SQL Server program groups
of SQL Server machine
and click properties in TCP/IP protocol to get the port number.
Thanks
Hari
SQL Server MVP
"news.task.gda.pl" <marek@.telbank.pl> wrote in message
news:d77u99$dgu$1@.korweta.task.gda.pl...
> Hi all,
> I have the following problem.
> I know that MSSQL resides under given IP adress but I do not know under
> which port. Who konows how to determine this port number?
> Best wihses,
> Marek Powichrowski
>|||Uytkownik "Hari Prasad" <hari_prasad_k@.hotmail.com> napisa w wiadomoci
news:eDkDhevYFHA.1148@.tk2msftngp13.phx.gbl...
> Hi,
> Open the SQL Server Error log and see which port SQL Server is using. By
> default SQL Server default instance use the port 1433.
> You could also use the Server network utility from SQL Server program
> groups of SQL Server machine
> and click properties in TCP/IP protocol to get the port number.
Hari,
I know this but I want to know how to do this without network utility and
serwer error log. What I must send to SQL serwer and what resposne from
given port give me information that under given port resides MSSQL?
Best wishes,
Marek Powichrowski

[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi

We are currently in the middle of piloting a new application using
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
Hello,
WSAStartup is a Windows API that is called (typically once) during an
application's startup to start using Winsock calls. Since you have been
using sockets up until the failure, it had to be called prior to that. It
looks like somehow the Winsock got uninitialized or unloaded but the JVM is
unaware of that.
Can you try opening a socket directly when this happens to confirm? You
could try something like:
java.net.Socket conn = new java.net.Socket("localhost", 1433);
and if you get the same failure, I would say this is an issue in the JVM.
Thanks,
Kamil
Kamil Sykora
Microsoft Developer Support - Web Data
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/securXity.
| NNTP-Posting-Date: Wed, 13 Jul 2005 00:58:48 -0500
| Subject: [Microsoft][SQLServer 2000 Driver for JDBC]net dll not initi
| From: akraai@.hotmail-dot-com.no-spam.invalid (akraai)
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Mime-Version: 1.0
| Content-Type: text/plain; charset=ISO-8859-15
| Content-Transfer-Encoding: 8bit
| User-Agent: newsSync (SQL Server) 112669
| Message-ID: <foWdneohifEFMEnfRVn_vg@.giganews.com>
| Date: Wed, 13 Jul 2005 00:58:48 -0500
|
| We are currently in the middle of piloting a new application using
MSDE, and some of our users are getting the following SQLException
when attempting to query the database. The exception occurs
sporadically, and it only seems to happen after the application is
used for an extended duraton of time. Also, once the exception
occurs, it seems like the only way to obtain a good connection again
is to restart the JVM. Successive calls to get a connection from the
drivermanager fail otherwise.
Our calling application uses JNI to call a java function which is
responsible for creating the database connection and querying the
database.
Any help would be appreciated!
Here's the exception:
[Microsoft][SQLServer 2000 Driver for JDBC]net dll not initialized
(WSAStartup): socket write error
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]net
dll not initialized (WSAStartup): socket write error
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.sub mitRequest(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest. openCursor(Unknown
Source)
at
com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecut e(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery(Unknown
Source)
|

[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

I am using PowerDesigner to reverse engineer a SQL 2000 database. I am getting the following error. I can't find out what this error means. Does anyone know?

Unable to list the users. [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. SQLSTATE =37000

This error is caused when the client is asking the server to prepare a statement which has errors. For example if there is a syntax error in the statement that is being attempted to be executed and SQLPrepare ODBC API is called on it, you will hit this problem. Do you know if the T-SQL you are trying to execute valid or not. To find out the exact problem try using SQL Profiler to see which statement failed to execute.

Thanks

Waseem Basheer

Saturday, February 25, 2012

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

hi
i m connect to the sQL SERVER using system DSN in JREPORT
but it is not working
get the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

Quote:

Originally Posted by daxter

hi
i m connect to the sQL SERVER using system DSN in JREPORT
but it is not working
get the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name


Try using

\Control Panel\Administrative Tools\Data Sources (ODBC)

And System DNS tab up the top of that window

[Microsoft][ODBC SQL Server Driver] error

Hi All,
A strange thing has been happening for a month or so when I retrive data via
QA. Sometimes the queries fail to run and I receive the following error
messages.
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
Re-reunning the query does not help only if I re-connect to the server. I
have checked Books Online and the only info is the following.
'The TDS stream from the server is invalid. This error is typically caused
by a problem on the server. Check the SQL Server error log.'
To tell you the truth I have not found anything suspicious.
Could you help me with it? Any help is welcome.
Thanks.
Kolos
Make you have applied the latest service packs. You also
need to apply the service packs on the client where you run
Query Analyzer.
-Sue
On Wed, 28 Feb 2007 01:52:09 -0800, Kolos
<Kolos@.discussions.microsoft.com> wrote:

>Hi All,
>A strange thing has been happening for a month or so when I retrive data via
>QA. Sometimes the queries fail to run and I receive the following error
>messages.
>[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
>[Microsoft][ODBC SQL Server Driver]TDS buffer length too large
>[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
>Re-reunning the query does not help only if I re-connect to the server. I
>have checked Books Online and the only info is the following.
>'The TDS stream from the server is invalid. This error is typically caused
>by a problem on the server. Check the SQL Server error log.'
>To tell you the truth I have not found anything suspicious.
>Could you help me with it? Any help is welcome.
>Thanks.
>Kolos