Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cannot connect to a SQL server database

Hi,

 

I'm trying to create a Db connection to a sql server database from my PC, but don't succeed when using Talend.

However, I am able to connect to the database through Toad and SQL Management Studio (from the same PC). I've tried both "Open Source JDTS" and Microsoft's JDBC driver, version 6.0. I'm using Talend 6.5.1.

The error I get is "Unknown server hostname patzorg_prd\patzorg_prd" when using "Open Source JDTS". The first part of "patzorg_prd\patzorg_prd" is indeed a valid hostname, I can ping it. The second patzorg_prd is probably a directory or something like that (I got this string from our DBA..).

This is the string of connection (Open Source JDTS):

 

jdbc:jtds:sqlserver://patzorg_prd\patzorg_prd:1433/Ultimo_prd;

 

Please note that both Toad and SQL Management Studio accept "patzorg_prd\patzorg_prd" as a hostname / servername and that I am able to connect to the database with these tools.

 

I also have to point out that I succeeded in connecting to another database with this string jdbc:sqlserver://pip:1433;DatabaseName=UltimoTest;

In this case the hostname is simply "pip".

 

So it problaby has to do with the second part. Any idea what's wrong?

 

Thanks in advance!

 

 

Labels (2)
1 Solution

Accepted Solutions
lojdr
Creator II
Creator II

Hello,

 

"patzorg_prd" is name of the named instance (there are default and named instances in SQL Server). Please use the following configuration (change the user if needed). 0683p000009Lsla.jpg

 

 

 

 

 

 

Regards

Lojdr

View solution in original post

7 Replies
Anonymous
Not applicable
Author

My suspicion is that your hostname is the cause of this because of the backslash. Talend is a Java tool and uses a backslash as an escape character. I can't test this here (so this is entirely a guess) but could you specify your hostname as "patzorg_prd\\patzorg_prd" and see if that works?

lojdr
Creator II
Creator II

Hello,

 

"patzorg_prd" is name of the named instance (there are default and named instances in SQL Server). Please use the following configuration (change the user if needed). 0683p000009Lsla.jpg

 

 

 

 

 

 

Regards

Lojdr

Anonymous
Not applicable
Author

Ah, good spot @lojdr 

Anonymous
Not applicable
Author

Ah, that's it! I was able to connect by changing the connection string into

 

jdbc:jtds:sqlserver://patzorg_prd:1433/Ultimo_prd;instance=patzorg_prd

 

Thanks for the quick reply!

lojdr
Creator II
Creator II

Thank you @rhall and @Erik0067

Anonymous
Not applicable
Author

Hello,
I created a connection to MS SQL server from Talend. The connection is ok.
But I can not create a table in my database "company" since Talend and load the data.

Thank you

 

0683p000009M2mP.png0683p000009M2mZ.png


Capture.PNG
Prakash3
Contributor
Contributor

Hello Lojdr, Wonderful i have wasted 6 hours in this and got solution. its perfectly working. Thank you.