[resolved] microsoft azure jdbc connection

One Star

[resolved] microsoft azure jdbc connection

I'm trying to connect to an azure database using jdbc in Talend 5.0.2 or 5.3.1.
The Microsoft web site says the connection string should be
jdbc:sqlserver://servername.database.windows.net;" +
"databaseName=School;user=username@servername;password=userpassword
the Talend mssql server connector constructs
jdbc:jtds:sqlserver://servername.database.windows.net:1433/databasename;
I can't connect through Talend jdbc. it gives an error
Connection failure. You must change the Database Settings.
java.sql.SQLException: I/O Error: DB server closed connection.

but I can connect through the Talend mssql server odbc connection.
Does anyone know how I connect using the jdbc connector? i haven't had problems with other mssql server connections.

Accepted Solutions
One Star

Re: [resolved] microsoft azure jdbc connection

Hi,
It seems like the only way to connect to Azure SQL Database through JBDC at the moment is explained in this following page: https://help.talend.com/pages/viewpage.action?pageId=13798196
Hope it helps.
However, I think there should be added support in Talend DI for MSSql components (which use jtds instead) to enable connections to SQL Database

Best regards,
Yordan

One Star

Re: [resolved] microsoft azure jdbc connection

I've suceeded in making the connection now.
JDBC URL jdbc:sqlserver://server name;databaseName=database name
Driver jar \Talend\5.3.1\studio\Talend-Studio-r104014-V5.3.1\lib\java\sqljdbc4.jar (this needs to be imported.)
Classname com.microsoft.sqlserver.jdbc.SQLServerDriver

All Replies
Employee

Re: [resolved] microsoft azure jdbc connection

Hello,
That means you can't use the MSSql components to connect to a Azure database. You could try using the tJDBC components. You will have to manually import the JDBC driver in the component and to define the JDBC classname.
HTH,
Rémy.
Seventeen Stars

Re: [resolved] microsoft azure jdbc connection

I do not think so. This error is not caused by an malformed URL (even if the URL has not correct parameters).
Probably the port of MS Azur database is different from what Talend uses as default. Please ask the Azur-admins at which port the database listen.
Is the given Talend URL the actually used URL? In this case, the database name is wrong:
jdbc:jtds:sqlserver://servername.database.windows.net:1433/School
One Star

Re: [resolved] microsoft azure jdbc connection

Hi Remy,
I'll try this.
jlolling,
The port is correct. the database name was just the example Microsoft used.
One Star

Re: [resolved] microsoft azure jdbc connection

Hi,
It seems like the only way to connect to Azure SQL Database through JBDC at the moment is explained in this following page: https://help.talend.com/pages/viewpage.action?pageId=13798196
Hope it helps.
However, I think there should be added support in Talend DI for MSSql components (which use jtds instead) to enable connections to SQL Database

Best regards,
Yordan

One Star

Re: [resolved] microsoft azure jdbc connection

I've suceeded in making the connection now.
JDBC URL jdbc:sqlserver://server name;databaseName=database name
Driver jar \Talend\5.3.1\studio\Talend-Studio-r104014-V5.3.1\lib\java\sqljdbc4.jar (this needs to be imported.)
Classname com.microsoft.sqlserver.jdbc.SQLServerDriver