图片 1

无法通过powershell读取sql

在SQL SECR-VVE奥迪Q5 贰零零8 Wrangler二下用Windows
身份认证的报到名创制了一个做客ORACLE数据库的链接服务器xxxxx,测试成功,木反常,可是任何登入名使用该链接服务器时,报如下错误:

背景:

消息 7302,级别
16,状态 1,第 1 行

     全新服务器,须要充实品质监察和控制,开掘不能够透过powershell读取品质目的

Cannot create an
instance of OLE DB provider “OraOLEDB.Oracle” for linked server
“xxxxxx”.

消除措施:

 

  • Open the Registry Editor by going to the Start Menu and selecting
    Run…, then type “regedit”, and click the OK button.
  • Navigate to the
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg registry
    key.
  • Right click on the “winreg” key and select Permissions. Add users or
    groups to which you want to grant Read access.
  • Exit Registry Editor and restart Windows.

此时亟待在“服务器对象”——>“链接服务器”——>“访问接口”下,找到OraOLEDB.Oracle选项,单击右键选取属性,然后在拜访接口选项下勾选“允许进程内”(Allow
inprocess)。就可以化解地点难题,有时候,大概需求重新新建此链接服务器。

图片 1

 

老外给出了二个缓慢解决这一个难点的步骤,至极详细严峻,大约一帆风顺。能够看做参考学习的好材料:

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”

发表评论

电子邮件地址不会被公开。 必填项已用*标注