NutzCN Logo
问答 sqlserver连接报错,连接字符串包含的名称或值的格式错误。
发布于 1584天前 作者 qq_eedf53d6 1989 次浏览 复制 上一个帖子 下一个帖子
标签:

dao.js

dynamitAutomaticDataSource : {
        type : "com.alibaba.druid.pool.DruidDataSource",
        fields : {
            driverClassName : "com.microsoft.sqlserver.jdbc.SQLServerDriver",
            url :"jdbc:sqlserver://10.10.103.151:1433;databaseName:zhongchuliang",
            username :"sa",
            password :"bms.123",
            initialSize : 1,
            maxActive: 20,
            maxWait: 60000,
            minIdle: 1,
            poolPreparedStatements: false
        },
        events : {
            depose : 'close'
        }
    },
    dynamitAutomaticDao : {
        type : "org.nutz.dao.impl.NutDao",
        args : [{refer : "dynamitAutomaticDataSource"}]
    }

报错信息

com.microsoft.sqlserver.jdbc.SQLServerException: 连接字符串包含的名称或值的格式错误。
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
	at com.microsoft.sqlserver.jdbc.Util.parseUrl(Util.java:445)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.parseAndMergeProperties(SQLServerDriver.java:1026)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1008)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1558)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623)
	at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468)
2020-07-22 16:57:57 ERROR [DruidDataSource] - create connection SQLException, url: jdbc:sqlserver://10.10.103.151:1433;databaseName:zhongchuliang, errorCode 0, state null
1 回复
databaseName=zhongchuliang
添加回复
请先登陆
回到顶部