Microsoft KB Archive/248062
Article ID: 248062
Article Last Modified on 3/14/2006
- Microsoft SQL Server 7.0 Standard Edition
This article was previously published under Q248062
BUG #: 56007(SQLBUG_70)
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.
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.
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:
SELECT * FROM OPENQUERY(OracleServer, 'SELECT * FROM demo.SQLCust')
displays this error:
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
For additional information on SQL Server distributed queries with an Oracle data source, see the SQL 7.0 Books Online topic "OLE DB Provider for Oracle".
For more information, see the following article in the Microsoft Knowledge Base:
240340 PRB: SQL Distributed Query with Oracle Causes 'Could not open table' Error
For additional information regarding this problem on SQL Server 2000, see the following article in the Microsoft Knowledge Base:
294459 FIX: Can't Use Four-Part Name to Query Oracle Table If Name Contains Lowercase Characters
Keywords: kbbug kbfix KB248062