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.
MORE INFORMATION
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
REFERENCES
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