mysql开发出来的程序到SQLserver为啥连接都连不上
Spring+Hibernate+Struts开发的程序 数据库Mysql5.0 现在要转到SQLServer2000己打sp4但c3p0提示数据库连不上
MySQL配置文件
datasource.driverClassName=org.gjt.mm.mysql.Driver
datasource.url=jdbc:mysql://localhost:3306/sy_user?useUnicode=true&characterEncoding=GBK
datasource.username=root
datasource.password=root
datasource.maxActive=10
datasource.maxIdle=2
datasource.maxWait=120000
datasource.whenExhaustedAction=1
datasource.validationQuery=select 1 from dual
datasource.testOnBorrow=true
datasource.testOnReturn=false
c3p0.acquireIncrement=3
c3p0.idleConnectionTestPeriod=3600
c3p0.minPoolSize=9
c3p0.maxPoolSize=1000
c3p0.maxStatements=100000
c3p0.numHelperThreads=10
c3p0.maxIdleTime=600
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
#hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.jdbc.batch_size=25
hibernate.jdbc.fetch_size=50
hibernate.show_sql=true
hibernate.hbm2ddl.auto=create-drop
SQLSERVer配置文件
datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
datasource.url=jdbc:microsoft:sqlserver://localhost:1433;databaseName=sy_User
datasource.username=sy_movie
datasource.password=movie
datasource.maxActive=10
datasource.maxIdle=2
datasource.maxWait=1200
datasource.whenExhaustedAction=1
datasource.validationQuery=select 1 from dual
datasource.testOnBorrow=true
datasource.testOnReturn=false
c3p0.acquireIncrement=3
c3p0.idleConnectionTestPeriod=360
c3p0.minPoolSize=5
c3p0.maxPoolSize=100
c3p0.maxStatements=0
c3p0.numHelperThreads=10
c3p0.maxIdleTime=600
#hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.jdbc.batch_size=25
hibernate.jdbc.fetch_size=50
hibernate.show_sql=true
hibernate.hbm2ddl.auto=create-drop
SQLServer连接的用户名密码保证好用,我用查询分析器试了
系统日志
2006-11-22 15:10:57,332 [resin-tcp-connection-*:81-2] [org.springframework.jdbc.datasource.JdbcTransactionObjectSupport] [INFO] - JDBC 3.0 Savepoint class is available
2006-11-22 15:11:26,348 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] [com.mchange.v2.resourcepool.BasicResourcePool] [WARN] - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@135ae7e -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).
2006-11-22 15:11:26,348 [resin-tcp-connection-*:81-2] [org.hibernate.util.JDBCExceptionReporter] [WARN] - SQL Error: 0, SQLState: null
2006-11-22 15:11:26,348 [resin-tcp-connection-*:81-2] [org.hibernate.util.JDBCExceptionReporter] [ERROR] - Connections could not be acquired from the underlying database!
2006-11-22 15:11:26,348 [resin-tcp-connection-*:81-2] [org.hibernate.util.JDBCExceptionReporter] [WARN] - SQL Error: 0, SQLState: null
2006-11-22 15:11:26,348 [resin-tcp-connection-*:81-2] [org.hibernate.util.JDBCExceptionReporter] [ERROR] - Connections could not be acquired from the underlying database!
2006-11-22 15:11:26,379 [resin-tcp-connection-*:81-2] [org.apache.struts.action.RequestProcessor] [WARN] - Unhandled Exception thrown: class org.springframework.transaction.CannotCreateTransactionException
服务器是Resin3.0.14