2

I need help connecting Azure database using SymmetricDS 3.5.1. I can't seem to the configuration correct. I get an error saying "Cannot create PoolableConnectionFactory" with the message either "socket closed" (when I don't specify ssl parameter) or "login timeout" (when I specify the ssl parameter). I have specified a timeout amount in the connection string, however, it does not seem to work and defaults to 30 seconds. Is there any documentation on how to connect to an Azure database using SymmetricDS? Anyway, take a look and tell me what I need to change in my engine.properties file? I have the following:

db.url=jdbc:jtds:sqlserver://MyServer.database.windows.net:1433;database=MyDatabase;user=MyUser@MyServer;password=MyPassowrd;encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=300;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880;ssl=require

db.user=MyUser@MyServer
db.database=MyDatabase
db.password=MyPassword
db.driver=net.sourceforge.jtds.jdbc.Driver
Johan Dahlin
  • 25,300
  • 6
  • 40
  • 55
hewstone
  • 4,425
  • 2
  • 23
  • 24

1 Answers1

6

It turns out you have to use the Microsoft JDBC driver. I didn't see any documentation on how to set it up so for the sake of others this is what I did after reading http://www.symmetricds.org/docs/how-to/connect-to-database

  1. Download the Microsoft jdbc driver
  2. Put the sqljdbc4.jar file in the lib folder of your symmetric folder
  3. Change the *.properties file to be the following connection information...

    db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

    db.url=jdbc:sqlserver://{your_server_name}.database.windows.net:1433;database={database_name};user={user}@{your_server_name};password={password};encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=300;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880;

hewstone
  • 4,425
  • 2
  • 23
  • 24
  • I am trying to connect to a local sql 2012 instance, and get a message that I need to use a sqljdbc4.jar , I put it in lib dir, but cannot figure out what else needs to be done. – Jonesome Reinstate Monica Jan 05 '14 at 19:03