`

WebSphere Application Server 6.0.2.9 配置 SqlServer 2000 SP2时出错问题解决

阅读更多

WebSphere Application Server 6.0.2.9 配置 SqlServer 2000 SP2时出错问题解决

 

[09-7-15 11:53:32:062 CST] 0000001f DataSourceCon E   DSRA8040I: 无法连接到 DataSource。遇到 "":java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]未能找到存储过程 'master..xp_jdbc_open'。DSRA0010E: SQL 状态 = HY000,错误代码 = 2,812

 

在节点 sivyerNode01 上的服务器 server1 上,数据源 ××× 的测试连接由于以下异常 java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.DSRA0010E: SQL 状态 = HY000,错误代码 = 0 而失败。

 

 

 

1、执行附件中的 Sql语句

/*
**	INSTJDBC.SQL
**	Installs XA stored procedures used by the JDBC driver 
*/


go
use master
go
dump tran master with no_log
go


/*
** drop procedures if they're already in the database
*/

sp_dropextendedproc 'xp_jdbc_open' 
go
sp_dropextendedproc 'xp_jdbc_open2' 
go
sp_dropextendedproc 'xp_jdbc_close'
go
sp_dropextendedproc 'xp_jdbc_close2'
go
sp_dropextendedproc 'xp_jdbc_start'
go
sp_dropextendedproc 'xp_jdbc_start2'
go
sp_dropextendedproc 'xp_jdbc_end'
go
sp_dropextendedproc 'xp_jdbc_end2'
go
sp_dropextendedproc 'xp_jdbc_prepare'
go
sp_dropextendedproc 'xp_jdbc_prepare2'
go
sp_dropextendedproc 'xp_jdbc_commit'
go
sp_dropextendedproc 'xp_jdbc_commit2'
go
sp_dropextendedproc 'xp_jdbc_rollback'
go
sp_dropextendedproc 'xp_jdbc_rollback2'
go
sp_dropextendedproc 'xp_jdbc_forget'
go
sp_dropextendedproc 'xp_jdbc_forget2'
go
sp_dropextendedproc 'xp_jdbc_recover'
go
sp_dropextendedproc 'xp_jdbc_recover2'
go
dump tran master with no_log
go



/*
**  add references for the stored procedures
*/

print 'creating JDBC XA procedures'
go

sp_addextendedproc 'xp_jdbc_open', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_open2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_close', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_close2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_start', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_start2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_end', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_end2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_prepare', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_prepare2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_commit', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_commit2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_rollback', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_rollback2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_forget', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_forget2', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_recover', 'sqljdbc.dll'
go
sp_addextendedproc 'xp_jdbc_recover2', 'sqljdbc.dll'
go


/*
**  grant privileges so that all users can enlist in XA transactions
*/
grant execute on xp_jdbc_open to public
go
grant execute on xp_jdbc_open2 to public
go
grant execute on xp_jdbc_close to public
go
grant execute on xp_jdbc_close2 to public
go
grant execute on xp_jdbc_start to public
go
grant execute on xp_jdbc_start2 to public
go
grant execute on xp_jdbc_end to public
go
grant execute on xp_jdbc_end2 to public
go
grant execute on xp_jdbc_prepare to public
go
grant execute on xp_jdbc_prepare2 to public
go
grant execute on xp_jdbc_commit to public
go
grant execute on xp_jdbc_commit2 to public
go
grant execute on xp_jdbc_rollback to public
go
grant execute on xp_jdbc_rollback2 to public
go
grant execute on xp_jdbc_forget to public
go
grant execute on xp_jdbc_forget2 to public
go
grant execute on xp_jdbc_recover to public
go
grant execute on xp_jdbc_recover2 to public
go

print ''
print 'instxa.sql completed successfully.'
go

dump tran master with no_log
go
checkpoint
go
/**/

 

2、将sqljdbc.dll 复制到 SQLSERVER 安装目录下

    例如:C:\Program Files\Microsoft SQL Server\80\Tools\Binn

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics