Microsoft KB Archive/248062

= FIX: Distributed Query with Oracle Cannot Work with Table Exported by DTS =

Article ID: 248062

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q248062



BUG #: 56007(SQLBUG_70)



SYMPTOMS
After successfully copying a SQL Server 7.0 table to Oracle using the Microsoft Oracle OLEDB provider, the Data Transformation Services (DTS) wizard reports a success. However, a SQL 7.0 distributed query to Oracle may not find the table.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.



Steps to Reproduce the Behavior
Use the DTS Export wizard to copy the SQL 7.0 Northwind..Customers table to the Oracle "DEMO"."SQLCust" table using the Microsoft Oracle OLEDB provider. The DTS wizard will work ok and will report success. You can run the DTS Import Wizard to find the same table in Oracle (demo.SQLCust) and copy it back to SQL Server. However, a SQL 7.0 distributed query to Oracle will not find the table.

For example: EXEC sp_addlinkedserver  'OracleServer',  'Oracle',  'MSDAORA',  'myOracleServer'

EXEC sp_addlinkedsrvlogin 'OracleServer', 'FALSE', NULL, 'demo', 'demo'

Select * from OracleServer..DEMO.SQLCUST The preceding query does not work with various combinations of capitalization. It returns the following error:

Server: Msg 7314, Level 16, State 1, Line 1

OLE DB provider 'MSDAORA' does not contain table '"DEMO"."SQLCUST"'.

This code: SELECT * FROM OPENQUERY(OracleServer, 'SELECT * FROM demo.SQLCust') displays this error:

Server: Msg 7321, Level 16, State 2, Line 1

An error occurred while preparing a query for execution against OLE DB provider 'MSDAORA'.

[OLE/DB provider returned message: ORA-00942: table or view does not exist

sp_tables_ex OracleServer lists the table as SQLCust with TABLE_SCHEM = DEMO After applying the fix, since the DTS wizard creates the table in Oracle using quotes on the names so that it's mixed-case, users will need to access the table with an exact table name: Select * from OracleServer..DEMO.SQLCust When using SQL linked Server queries with a four part name to access mixed-case tables in Oracle (created without using quotes), users will need to access it using upper case letters, from SQL Server, such as: Select * from OracleServer..DEMO.SQLCUST