Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC is not connectinf when SQL instance name contains "\"

Status
Not open for further replies.

thelordoftherings

Programmer
May 16, 2004
616
IL
Hello,

I am using Datadirect driver in order to connect to our SQL Server. When connecting to standard addresses everything is working OK. SQL Server enables to create an instance on this address as well: <server1>\<INSTANCE> (In my case <INSTANCE> = SAP).
The problem is that when I open a connection with this connection String:
jdbc:datadirect:sqlserver://<server1>\SAP:7660

I receive an error:
java.sql.SQLException: [DataDirect][SQLServer JDBC Driver][DataDirect][SQLServer JDBC Driver]The requested instance is either invalid or not running.

But the instance is up an running. Any idea why?

 
Have you tried :

jdbc:datadirect:sqlserver://<server1>/SAP:7660

or :

jdbc:datadirect:sqlserver://<server1>\\SAP:7660

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
No I haven't but now that you brought it up I tried:

On jdbc:datadirect:sqlserver://<server1>/SAP:7660 I receive the same error as before.

On jdbc:datadirect:sqlserver://<server1>\\SAP:7660 I receive: Error establishing socket. Unknown host...
 
Sorry the other way around:
On "\\" I receive the same error as before and on "/" I receive an Unknown host.
 
I see that the driver you are using is "paid for" software.

I would contact your vendor and ask for support ...

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Found the solution: The server name need not be in it's fully qualified name, e.g. this won't work: servername.companyname.com and this is how I configured it.
While it is wotrking when "\" doesn't exist it is not working when "\" exists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top