SQL server 2012 driver

One Star

SQL server 2012 driver

How do I install the sql server 2012 driver into Talend 5.0.2 or 5.3.1.
Moderator

Re: SQL server 2012 driver

Hi,
Is your requirement using tMssqlxxx component for Sql server 2012?
If so, try this solution:
Go to : plugins\org.talend.designer.components.localprovider_5.3.1.r104014\components\tMSSqlInput
Then in the file tMSSqlInput_java.xml, change related parameter and set REQUIRED="true".
<IMPORTS>
<IMPORT NAME="Driver-jTDS" MODULE="jtds-1.2.5.jar" UrlPath="platform:/plugin/org.talend.libraries.jdbc.jtds/lib/jtds-1.2.5.jar" REQUIRED="true" />
<IMPORT NAME="Talend_MssqlUtil" MODULE="talend_DB_mssqlUtil.jar" UrlPath="platform:/plugin/org.talend.libraries.custom/lib/talend_DB_mssqlUtil.jar" REQUIRED="true" />
</IMPORTS>
Save the file and copy the file SQL server 2012 driver to the lib/java folder, delete 'ComponentsCache.javacache' under <TOS Installation dir>\configuration and restart studio.
Let me know if it is OK with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SQL server 2012 driver

Hi Sabrina,
It's already set up with these parameters.
My problem is that when trying to connect to the mssqlserver database it reports an error
Connection failure. You must change the Database Settings.
java.sql.SQLException: I/O Error: DB server closed connection.
I've no problem with earlier versions of sql server and can set up an odbc connection outside Talend though I haven't been able to use this with the tmssqlconnection odbc component yet.
Jan
Moderator

Re: SQL server 2012 driver

Hi,
I will consult to our component developer to see if there is a better solution for your problem.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SQL server 2012 driver

Hi Sabrina,
Did you get any info on this?
Regards
Jan
One Star

Re: SQL server 2012 driver

ODBC connection works but only in 32 bit Talend.
Moderator

Re: SQL server 2012 driver

Hi,
Sorry for delay, our component developers are working on it. I will inform you as long as there is a better solution.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SQL server 2012 driver

Hi,
Sorry for delay, our component developers are working on it. I will inform you as long as there is a better solution.
Best regards
Sabrina

Hi Sabrina,
I have one question for you please, i'm not eable to connect telend 5.5.1 to sql server 2012. I have this folowing error:
Connection failure. You must change the database settings.
Can you have any solution for that.
Thank you in advance
sanoussi
Moderator

Re: SQL server 2012 driver

Hi sanoussi,
Can you successfully connect to your sql server 2012 through client without using Talend Tool? Did you set up DB connection in metadata? If so, is there any more error message when you click "details" button?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SQL server 2012 driver

Hello Sabrina,
Thank you for your reply, yes i can connect with other tool. Please find below the error message i got:
Connection failure. You must change the Database Settings.
  java.lang.RuntimeException: java.sql.SQLException: Unknown server host name 'BICORIS\mssql2012'.
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:177)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1047)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:301)
      at org.talend.repository.ui.utils.ManagerConnection.check(ManagerConnection.java:261)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm.checkConnection(DatabaseForm.java:2096)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm.access$41(DatabaseForm.java:2021)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$24.widgetSelected(DatabaseForm.java:2349)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      at org.eclipse.jface.window.Window.open(Window.java:801)
      at org.talend.repository.ui.actions.metadata.CreateConnectionAction.doRun(CreateConnectionAction.java:207)
      at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:620)
      at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:93)
      at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:237)
      at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3212)
      at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:1979)
      at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:626)
      at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.talend.rcp.intro.Application.start(Application.java:159)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
  Caused by: java.sql.SQLException: Unknown server host name 'BICORIS\mssql2012'.
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:401)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
      at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
      at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:168)
      ... 49 more
  Caused by: java.net.UnknownHostException: BICORIS\mssql2012
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307)
      at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257)
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311)
      ... 53 more
Thank you again for your help.
Alpha
One Star

Re: SQL server 2012 driver

Hi sanoussi,
Can you successfully connect to your sql server 2012 through client without using Talend Tool? Did you set up DB connection in metadata? If so, is there any more error message when you click "details" button?
Best regards
Sabrina

Hi Sabrina,
For my question i inform that i'm working on windows 10 and 64 bit system.
Thank you
sanoussi
Moderator

Re: SQL server 2012 driver

Hi,
'BICORIS\mssql2012'.

Are you using a MSSQL named instance? Could you please show us your DB connection setting screenshot?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: SQL server 2012 driver

is there any answer when create db connection to ms sql 2012 about this error ?
Connection failure. You must change the Database Settings.
  java.lang.RuntimeException: java.sql.SQLException: Unknown server host name '.\SQLSERVER2012'.
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataUtils.connect(ExtractMetaDataUtils.java:1089)
      at org.talend.core.model.metadata.builder.database.ExtractMetaDataFromDataBase.testConnection(ExtractMetaDataFromDataBase.java:314)
      at org.talend.metadata.managment.repository.ManagerConnection.check(ManagerConnection.java:272)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:2674)
      at org.talend.repository.ui.wizards.metadata.connection.database.DatabaseForm$31.runWithCancel(DatabaseForm.java:1)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$1.runnableWithCancel(AProgressMonitorDialogWithCancel.java:77)
      at org.talend.repository.ui.dialog.AProgressMonitorDialogWithCancel$ARunnableWithProgressCancel$1.call(AProgressMonitorDialogWithCancel.java:161)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.sql.SQLException: Unknown server host name 'EMERIO-AJI\SQLSERVER2012'.
      at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:427)
      at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
      at org.talend.core.model.metadata.builder.database.DriverShim.connect(DriverShim.java:41)
      at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:186)
      ... 9 more
  Caused by: java.net.UnknownHostException: EMERIO-AJI\SQLSERVER2012
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:288)
      at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:251)
      at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:331)
      ... 12 more