2

我需要帮助使用 SymmetricDS 3.5.1 连接 Azure 数据库。我似乎无法正确配置。我收到一条错误消息“无法创建 PoolableConnectionFactory”,消息为“套接字已关闭”(当我未指定 ssl 参数时)或“登录超时”(当我指定 ssl 参数时)。我在连接字符串中指定了超时量,但是,它似乎不起作用,默认为 30 秒。是否有关于如何使用 SymmetricDS 连接到 Azure 数据库的文档?无论如何,看看并告诉我我需要在我的 engine.properties 文件中更改什么?我有以下内容:

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
4

1 回答 1

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;

于 2013-08-13T16:12:28.867 回答