在sql server 2008 r2下用windows 身份认证的登录名创建了一个访问oracle数据库的链接服务器xxxxx,测试成功,木有问题,但是其它登录名使用该链接服务器时,报如下错误: 消息 7302,级别 16,状态 1,第 1 行 cannot create an instance of ole db provide
在sql server 2008 r2下用windows 身份认证的登录名创建了一个访问oracle数据库的链接服务器xxxxx,测试成功,木有问题,但是其它登录名使用该链接服务器时,香港服务器,报如下错误:
消息 7302,香港服务器租用,级别 16,状态 1,第 1 行
cannot create an instance of ole db provider oraoledb.oracle for linked server xxxxxx.
此时需要在“服务器对象”——>“链接服务器”——>“访问接口”下,找到oraoledb.oracle选项,单击右键选择属性,然后在访问接口选项下勾选“允许进程内”(allow inprocess)。即可解决上面问题,有时候,网站空间,可能需要重新新建此链接服务器。
老外给出了一个解决这个问题的步骤,相当详细严谨,几乎面面俱到。可以作为参考学习的好资料:
ran into this issue where the linked server would work for users who were local admins on the server, but not for anyone else. after many hours of messing around, i managed to fix the problem using the following steps:
1:run “dcomcnfg.exe”. navigate to “component services -> computers -> my computer -> dcom config”.
2:open the properties page of “msdainitialize”.
3:copy the “application id” on the properties page.
4:close out of “dcomcnfg”.
5:run “regedit”. navigate to “hkey_classes_root\appid\{?}” with the ? representing the application id you copied in step #3.
6:right click the “{?}” folder and select “permissions”
7:add the local administrators group to the permissions, grant them full control.
8:close out of “regedit”.
9:reboot the server.
10:run “dcomconfig”. navigate to “component services -> computers -> my computer -> dcom config”.
11:open the properties page of “msdainitialize”.
12:on the “security” tab, select “customize” under “launch and activation permissions”, then click the “edit” button.
13:add “authenticated users” and grant them all 4 launch and activation permissions.
14:close out of “dcomcnfg”.
15:find the oracle install root directory. “e:\oracle” in my case.
16:edit the security properties of the oracle root directory. add “authenticated users” and grant them “read & execute”, “list folder contents” and “read” permissions. apply the new permissions.
17:click the “advanced permissions” button, then click “change permissions”. select “replace all child object permissions with inheritable permissions from this object”. apply the new permissions.
18:find the “oraoledb.oracle” provider in sql server. make sure the “allow inprocess” parameter is checked.
19:reboot the server.