XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Glenn MeadowsSubject: DB to XML Connection Failure
Author: Glenn Meadows
Date: 04 Oct 2006 12:55 PM
Hi folks,

My connection to a Relational DB from SS is failing to my //localhost:1433 Server URL. Would appreciate any tips on what I might be missing. Thanks in advance...

I am running SQL Server 2005 Express on Windows XP SP2 with SS 2007 Enterprise edition.

From the File Explorer window I right click on Relational Database and select New Server. I select SQL Server and the Server URL is automatically set to //localhost:1433. I enter sa for the username and then my password. I check in Configuration Manager to make sure my TCP/IP settings are enabled. I click OK and I get the following error:

java.sql.SQLException: [XQuery][SQLServer JDBC Driver]Error establishing socket to host and port: localhost:1433. Reason: Connection refused: connect

at com.ddtek.xquery.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.ddtek.xquery.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)

at com.ddtek.xquery.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.connect(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseConnection.open(Unknown Source)

at com.ddtek.xquery.jdbc.base.BaseDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at com.stylusstudio.DataDirectDDXQStub.connect(DataDirectDDXQStub.java:74)

at com.stylusstudio.DataDirectDDXQStub.getConnection(DataDirectDDXQStub.java:108)

Postnext
Ivan PedruzziSubject: DB to XML Connection Failure
Author: Ivan Pedruzzi
Date: 04 Oct 2006 03:22 PM
Hi Glann,

Here few things you should verify

- Check in the transport setting if the port number is set to 1433

- Use the following command to verify that SQLServer is in listening status

C:\>netstat -a

Active Connections

Proto Local Address Foreign Address State
...
TCP ivanuccio:ms-sql-s ivanuccio:0
LISTENING
...

- Check in the security settings to have authentication mode set to SQL Server and Window

- If you are using the sa account be sure to have the login enabled.



Ivan Pedruzzi
Stylus Studio Team

Postnext
Glenn MeadowsSubject: DB to XML Connection Failure
Author: Glenn Meadows
Date: 04 Oct 2006 05:56 PM
Ivan,

Using your suggestions, I have the following results:

1) SQL Server is listening as seen by using C:\>netstat -a
2) Security settings allow for both SQL Server and Windows authenticate
3) sa account has login enabled

4) I am unsure where to look for the transport setting. The screen images you sent are somewhat fuzzy. I went into the Security section and then opened the login dialog but did not see where the transport setting was listed. I am running SQL Server 2005 Express. Do I need to run SQL Server 2005 instead?

Thanks for your help,
Glenn

Postnext
Ivan PedruzziSubject: DB to XML Connection Failure
Author: Ivan Pedruzzi
Date: 04 Oct 2006 06:51 PM
Glenn,

The image may look fuzzy because IE scales them to fit. If you mouse over you will see a square symbol at the bottom right corner that will let you toggle to the original dimensions.

SQLServer 2005 Express works just fine with Stylus Studio

SQLServer 2005 Express ships with it's admin tool please visit
http://msdn.microsoft.com/vstudio/express/sql/download/default.aspx

To access the server configuration go to

Control Panel -> Administrative Tools -> Computer Management -> Service and Applications

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Glenn MeadowsSubject: DB to XML Connection Failure
Author: Glenn Meadows
Date: 04 Oct 2006 09:53 PM
Ivan,

Success!!!

I ran the Computer Management tool from Control Panel->Admin Tools
Under SQL Server Network Configuration, I clicked on Protocols and then double-clicked on TCP/IP (which is enabled). Next I selected the IP Address tab. For each IP Address, I entered 1433 for the TCP Port. I then started and stopped the SQL Server Services. From the SS File Explorer window, I right clicked on Relational DB and added the new server info and I got the connection.

Also, I am now able to clearly see your images with the mouse over.

Thanks so much for your help today...
- Glenn

Postnext
John LawsonSubject: DB to XML Connection Failure
Author: John Lawson
Date: 16 Oct 2007 08:39 PM
Originally Posted: 16 Oct 2007 07:57 PM
I have tried everything here and I have the connection error. I have the full version of SQL 05 and get this error. I'm aware of the TCP/IP settings as I am use to doing this same step for when I set SQL servers up for ColdFusion.

I try to connect on //localhost:1433 and //192.168.1.11:1433 (internal IP) and //127.0.0.1:1433

I tried both a SQL account and a windows auth account with and without the servername\

I have TCP/IP enabled under SQL server network config and also under SQL native client config.

tcp port set to 1433 for 192.168.1.11 port and same goes for the 127.0.0.1 port. I have dynamic tcp blank on both IP's. I have rebooted SQL service several times.

I have the latest studio version - 7 - just downloaded the trial this week.

any ideas appreciated - thanks!

Postnext
Ivan PedruzziSubject: DB to XML Connection Failure
Author: Ivan Pedruzzi
Date: 17 Oct 2007 12:15 AM

Hi John,

Could you please post a screenshot of connection dialog before try to connect and the full error message?

Thanks!
Ivan Pedruzzi
Stylus Studio Team

Postnext
John LawsonSubject: DB to XML Connection Failure
Author: John Lawson
Date: 17 Oct 2007 05:58 PM
Here you go - keep in mind I have tried several URL's on the connection setup

Screen Shot

Postnext
Ivan PedruzziSubject: DB to XML Connection Failure
Author: Ivan Pedruzzi
Date: 17 Oct 2007 06:39 PM

Some question for you

Is SQL Server running on the same machine where Stylus Studio is running?

If you type the following in a DOS shell

C:\>netstat -a

do you see at some point the following?

...
UDP <hostname>:ms-sql-m *:*
...


If you type the following command are you able to connect?

c:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd -S <host>


Could you please post a screenshot of SQL Server Configuration Manager
With "SQL Server 2005 Services" selected?

Thanks!

Postnext
John LawsonSubject: DB to XML Connection Failure
Author: John Lawson
Date: 18 Oct 2007 08:21 PM
yes sql is on same box


netstat showed what you were looking for but the 2nd thing you wanted me to try could not connect. I also attached screenshot


UDP (SERVERNAME):ms-sql-m *:*



C:\Program Files\Microsoft SQL Server\90\Tools\Bin>sqlcmd -S localhost
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

C:\Program Files\Microsoft SQL Server\90\Tools\Bin>sqlcmd -S 192.168.1.11
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

C:\Program Files\Microsoft SQL Server\90\Tools\Bin>

services

Postnext
John LawsonSubject: DB to XML Connection Failure
Author: John Lawson
Date: 18 Oct 2007 08:56 PM
Update - I was able to connect through cmd this way....

sqlcmd -S np:\\127.0.0.1\pipe\MSSQL$GREATPLAINS\sql\query

so how do I translate that into the studio url connection field?

Also - remote connections is allowed - not that it matters since this is local to local


I found some info at

http://www.developersdex.com/sql/message.asp?p=1926&r=5848747

Posttop
Ivan PedruzziSubject: DB to XML Connection Failure
Author: Ivan Pedruzzi
Date: 18 Oct 2007 11:33 PM
John,

Your SQL Server is configured as named instance, its name is GREATPLAINS therefore the server URL is

//localhost\GREATPLAINS

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.