文章编号 | : | 280106 |
最后修改 | : | 2005年11月17日 |
修订 | : | 7.1 |
1. | 您必须在运行要在其上设置链接服务器的 SQL Server 计算机上安装 Oracle 客户端软件。 | ||||||
2. | 在运行 SQL Server 的计算机上安装所需的驱动程序。Microsoft 仅支持用于 Oracle 的 Microsoft OLE DB 提供程序和 Microsoft ODBC 驱动程序。如果您使用第三方提供程序或第三方驱动程序连接到 Oracle,则在使用这些提供程序或驱动程序遇到任何问题时,您必须与相应的供应商联系。 | ||||||
3. | 如果您使用用于 Oracle 的 Microsoft OLE DB 提供程序和 Microsoft ODBC 驱动程序,请考虑下列事项:
| ||||||
4. | 安装 Oracle 客户端软件之后,请重新启动运行 SQL Server 的计算机。 | ||||||
5. | 在运行 SQL Server 的计算机上,使用以下脚本设置链接服务器。-- Adding linked server (from SQL Server Books Online): /* sp_addlinkedserver [@server =] 'server' [, [@srvproduct =] 'product_name'] [, [@provider =] 'provider_name'] [, [@datasrc =] 'data_source'] [, [@location =] 'location'] [, [@provstr =] 'provider_string'] [, [@catalog =] 'catalog'] */ EXEC sp_addlinkedserver 'Ora817Link', 'Oracle', 'MSDAORA', 'oracle817' -- Adding linked server login: /* sp_addlinkedsrvlogin [@rmtsrvname =] 'rmtsrvname' [,[@useself =] 'useself'] [,[@locallogin =] 'locallogin'] [,[@rmtuser =] 'rmtuser'] [,[@rmtpassword =] 'rmtpassword'] */ EXEC sp_addlinkedsrvlogin 'Ora817Link', 'FALSE',NULL, 'scott', 'tiger' -- Help on the linked server: EXEC sp_linkedservers EXEC sp_helpserver select * from sysservers |
• | 方法 1 在查询分析器中,运行下面的代码以打开跟踪标志 7300。 DBCC Traceon(7300) |
• | 方法 2 捕获在 SQL 事件探查器的“错误和警告”事件类别中找到的“OLEDB 错误”事件。错误信息的格式如下: Interface::Method failed with hex-error code. 您可以在 MDAC 软件开发工具包 (SDK) 中附带的 Oledberr.h 文件中查找十六进制错误代码。 |
• | 消息 1
Error 7399:OLE DB provider '%ls' reported an error.%ls 打开跟踪标志 7300,或使用 SQL 事件探查器捕获“OLEDB 错误”事件,以便检索扩展的 OLEDB 错误信息。 | ||||
• | 消息 2a
"ORA-12154:TNS:could not resolve service name" 消息 2b
"The Oracle(tm) client and networking components were not found.These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 (or greater) client software installation" 有关如何解决 Oracle 连接问题的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
259959 (http://support.microsoft.com/kb/259959/) INFO:对使用 ODBC 驱动程序和 OLE DB 提供程序的 Oracle 服务器调试连接问题的技术 | ||||
• | 消息 3
Error 7302:Could not create an instance of OLE DB provider 'MSDAORA' 请确保正确注册了 MSDAORA.dll 文件。(MSDAORA.dll 文件是用于 Oracle 文件的 Microsoft OLE DB 提供程序。)使用 RegSvr32.exe 注册用于 Oracle 的 Microsoft OLE DB 提供程序。如果注册失败,请重新安装 Microsoft 数据访问组件 (MDAC)。有关 MDAC 的更多信息,请访问下面的 Microsoft Developer Network (MSDN) 网站:
http://msdn.microsoft.com/data/Default.aspx (http://msdn.microsoft.com/data/Default.aspx) 注意:如果您使用第三方程序,而该 Oracle 提供程序无法在 SQL Server 进程外运行,请更改提供程序选项使它在进程内运行。要更改提供程序选项,请使用下列方法之一。
| ||||
• | 消息 4
Error 7303:Could not initialize data source object of OLE DB provider 'MSDAORA'.[OLE/DB provider returned message:ORA-01017:invalid username/password; logon denied] OLE DB error trace [OLE/DB Provider 'MSDAORA' IDBInitialize::Initialize returned 0x80040e4d]. 该错误信息表明链接服务器没有正确的登录映射。您可以执行 sp_helplinkedsrvlogin 存储过程来正确设置登录信息。此外请验证您是否已为链接服务器配置指定了正确的参数。 | ||||
• | 消息 5
Error 7306:Could not open table ' %ls' from OLE DB provider 'MSDAORA'.The specified table does not exist.[OLE/DB provider returned message:Table does not exist.][OLE/DB provider returned message:ORA-00942:table or view does not exist] OLE DB error trace [OLE/DB Provider 'MSDAORA' IOpenRowset::OpenRowset returned 0x80040e37:The specified table does not exist.].
Error 7312:Invalid use of schema and/or catalog for OLE DB provider '%ls'.A four-part name was supplied, but the provider does not expose the necessary interfaces to use a catalog and/or schema.
Error 7313:Invalid schema or catalog specified for provider '%ls'.
Err 7314:OLE DB provider '%ls' does not contain table '%ls' 如果收到上述错误信息,则表明 Oracle 架构中可能缺少一个表,或者您在该表上可能没有权限。请验证是否使用大写形式键入架构名称。表和列的字母大小写情况应与 Oracle 系统表中指定的一样。在 Oracle 端,未使用双引号创建的表或列以大写形式存储。如果用双引号将表或列引起来,则表或列按原样存储。 下面的调用显示了 Oracle 架构中是否存在表。此调用还显示了确切的表名。 sp_tables_ex @table_server=Ora817Link, @table_schema='your_schema_name'有关错误信息 7306 的更多信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章: 240340 (http://support.microsoft.com/kb/240340/) PRB:对 Oracle 进行 SQL 分布式查询导致“Could not open table”(未能打开表)错误 | ||||
• | 消息 6
Error 7413:Could not perform. a Windows NT authenticated login because delegation is not available.
Msg 18456, Level 14, State 1, Line 1 Login failed for user '\'. 以下信息摘自 SQL Server 联机丛书:
该错误信息表明,在没有显式的登录映射的情况下,您试图对 Microsoft Windows 验证登录执行分布式查询。在不支持安全委派的操作系统环境中,Windows NT 验证登录需要显式映射到使用 sp_addlinkedsrvlogin 创建的远程登录帐户和密码。 | ||||
• | 消息 7
Error 7354:OLE DB provider 'MSDAORA' supplied invalid metadata for column '%ls'.The data type is not supported. 如果收到此错误信息,您可能会遇到在下面的 Microsoft 知识库文章中描述的问题:
243027 (http://support.microsoft.com/kb/243027/) FIX:Oracle 中的数字列导致错误 7354 | ||||
• | 消息 8
Error 7356:OLE DB provider 'MSDAORA' supplied inconsistent metadata for a column.Metadata information was changed at execution time. 如果您的链接服务器查询使用 Oracle 视图,您可能会遇到下面的 Microsoft 知识库文章中描述的问题:
251238 (http://support.microsoft.com/kb/251238/) PRB:分布式查询返回错误 7356 及 MSDAORA | ||||
• | 消息 9
Error 7391:The operation could not be performed because the OLE DB provider 'MSDAORA' does not support distributed transactions.OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b] 验证 OCI 版本是否已按上文描述的那样正确注册。 注意:如果注册表项全都正确,将会加载 MtxOCI.dll 文件。如果 MtxOCI.dll 未加载,则您无法使用用于 Oracle 的 Microsoft OLE DB 提供程序或 Microsoft ODBC 驱动程序对 Oracle 执行分布式事务。如果您正在使用第三方提供程序并且收到错误 7391,请验证您正在使用的 OLE DB 提供程序是否支持分布式事务。如果 OLE DB 提供程序确实支持分布式事务,请验证 Microsoft 分布式事务协调器 (MSDTC) 正在运行。 | ||||
• | 消息 10
Error 7392:Could not start a transaction for OLE DB provider 'MSDAORA'.OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionLocal::StartTransaction returned 0x8004d013:ISOLEVEL=4096]. 以下信息摘自 SQL Server 联机丛书:
OLE DB 提供程序返回错误 7392,因为对于此会话只能有一个事务处于活动状态。该错误表明,在连接处于显式或隐式事务中,且 OLE DB 提供程序不支持嵌套事务时,您试图对 OLE DB 提供程序执行数据修改语句。SQL Server 需要这种支持,以便在某些错误情况下,它可以终止数据修改语句的影响,同时继续进行事务处理。 如果 SET XACT_ABORT 为 ON,则 SQL Server 不需要 OLE DB 提供程序中的嵌套事务支持。因此,在显式或隐式事务中对远程表执行数据修改语句之前,请将 SET XACT_ABORT 设为 ON。这样做的目的是为了防止您正在使用的 OLE DB 提供程序不支持嵌套事务。 |
• | Microsoft SQL Server 2000 标准版 |
• | Microsoft SQL Server 2000 64-bit Edition |
• | Microsoft SQL Server 7.0 标准版 |
关键字: | kbhowtomaster KB280106 |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/693533/viewspace-101747/,如需转载,请注明出处,否则将追究法律责任。