菜单

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

2019年7月25日 - sqlite

在SQL SEEscortVE中华V 2008 ENVISION2下用Windows
身份认证的登陆名创制了一个会见ORACLE数据库的链接服务器xxxxx,测量检验成功,木不日常,不过别的登陆名使用该链接服务器时,报如下错误:

 

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

Server Error in ‘/Engtek’ Application.


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

Cannot obtain the schema rowset “DBSCHEMA_TABLES_INFO” for OLE DB provider “SQLNCLI10” for linked server “DB1”. The provider supports the interface, but returns a failure code when it is used.

Description: An unhandled
exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and
where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Cannot obtain the schema
rowset “DBSCHEMA_TABLES_INFO” for OLE DB provider “SQLNCLI10” for
linked server “DB1”. The provider supports the interface, but returns a
failure code when it is used.

Source Error:

Line 23:         public DataTable GetWipProductionSeries()
Line 24:         {

Line 25: return objBusinessBase.GetDataToDataSet("usp_WipProductionSeries_GetAll").Tables[0];

Line 26:         }
Line 27:     }

Source File:d:\Projects\Engtek\App_Code\System\Wip\WipProductionSeries.cs    Line: 25

Stack Trace:

[SqlException (0x80131904): Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "DB1". The provider supports the interface, but returns a failure code when it is used.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +86
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +144
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +319
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +94
   Insus.NET.Base.ExecuteProcedure(String procedureName, DataSet& dataSet) +186

[Exception: Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "DB1". The provider supports the interface, but returns a failure code when it is used.]
   Insus.NET.Base.ExecuteProcedure(String procedureName, DataSet& dataSet) +250
   Insus.NET.BusinessBase.GetDataToDataSet(String procedureName) +90
   Insus.NET.WipProductionSeries.GetWipProductionSeries() in d:\Projects\Engtek\App_Code\System\Wip\WipProductionSeries.cs:25
   System_Report_OldEis_Wip_Stock.Data_Binding() in d:\Projects\Engtek\System\Report\OldEis\Wip\Stock.aspx.cs:29
   System_Report_OldEis_Wip_Stock.Page_Load(Object sender, EventArgs e) in d:\Projects\Engtek\System\Report\OldEis\Wip\Stock.aspx.cs:21
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

 


 

Version
Information:
 Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.1

 

数据库进级至Microsoft SQL Server 二零零六 中华V2
陆14位之后,从前链接到SQL三千的先后出错了。的英特网到二个缓和办法:

On SQL 2000 side run the following script:

图片 1图片 2代码

create procedure sp_tables_info_rowset_64
@table_name sysname,
@table_schema     sysname = null,
@table_type nvarchar(255) = null

as

declare @Result int set @Result = 0
exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type

 

 

 

 

那儿须求在“服务器对象”——>“链接服务器”——>“访谈接口”下,找到OraOLEDB.Oracle选项,单击右键选拔属性,然后在拜访接口选项下勾选“允许进程内”(Allow
inprocess)。就可以化解地点难题,临时候,大概要求再一次新建此链接服务器。

图片 3

 

老外给出了三个消除那几个难题的步骤,优秀详细严酷,大约弹无虚发。能够当作参谋学习的好材料:

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.

 

 

相关文章

发表评论

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

网站地图xml地图