IBM AS400链接服务器到SQL Server 2012

时间:2018-03-26 22:33:37

标签: sql-server ibm-midrange

我设置了链接服务器,效果很好。我用了很多年了。最近我们需要访问不同的库,包括我们目前可以访问的库。我们的IT部门给了我们一个新的用户名和密码。我使用新的用户名和密码设置了一个新的链接服务器(从工作中编写脚本)。我收到以下错误。

Cannot initialize the data source object of OLE DB provider "DB2OLEDB" for linked server "400_TEST".
OLE DB provider "DB2OLEDB" for linked server "400_TEST" returned message "The user does not have the authority to access the host resource. Check your authentication credentials or contact your system administrator.". (Microsoft SQL Server, Error: 7303)

问题:因为我们的另一个工作正常,它必须在400方面具有权限。他们声明InitCat = ####和QGPL都有访问权限。什么是用于DB2的Microsoft OLE DB提供程序(DB2OLEDB)的主机资源'正试图联系?是否有隐藏的东西我需要他们授予访问权限?

链接服务器

EXEC master.dbo.sp_addlinkedserver @server = N'400_TEST', @srvproduct=N'Microsoft OLE DB Provider for DB2', @provider=N'DB2OLEDB', @provstr=N'InitCat=####;NetLib=TCPIP;NetAddr=########.COM; NetPort=446;PkgCol=QGPL;', @catalog=N'QGPL'
 /* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'400_TEST',@useself=N'False',@locallogin=NULL,@rmtuser=N'########',@rmtpassword='********'

GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'collation compatible', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'data access', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'dist', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'pub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'rpc', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'rpc out', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'sub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'connect timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'collation name', @optvalue=null
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'lazy schema validation', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'query timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'use remote collation', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'400_TEST', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO

0 个答案:

没有答案