Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 oracle to ss

Author  Topic 

basicconfiguration
Constraint Violating Yak Guru

358 Posts

Posted - 2008-12-05 : 16:25:43
Trying to read data from Oracle. I setup a linked server and it appears it doesn't work with some tables. I show you an example of 2 tables. One works and the other doesn't. Any idea what is going on?

----------------------------------------------------------------------------
Doesn't work
----------------------------------------------------------------------------
Table_schema: dwods
table_Name: cli
table_type: view

select * from openquery (Oracle, 'select * from DWODS.CLI where rownum < 5')

OLE DB provider "MSDAORA" for linked server "Oracle" returned message "Oracle error occurred, but error message could not be retrieved from Oracle.".
OLE DB provider "MSDAORA" for linked server "Oracle" returned message "Data type is not supported.".
Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "select * from DWODS.CUS where rownum < 5" for execution against OLE DB provider "MSDAORA" for linked server "Oracle".


----------------------------------------------------------------------------
Does work
----------------------------------------------------------------------------
Table_schema: dwods
table_Name: cus
table_type: view

select * from openquery (Oracle, 'select * from DWODS.CUS where rownum < 5')

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-05 : 16:56:49
What is data type for column returned?
Go to Top of Page

hanbingl
Aged Yak Warrior

652 Posts

Posted - 2008-12-05 : 16:58:38
Data type is not supported on SQL server side. It could be Oracle timestamps issue...
Go to Top of Page

basicconfiguration
Constraint Violating Yak Guru

358 Posts

Posted - 2008-12-05 : 17:22:55
Fixed it. Needed to include the column names instead of the *.
Go to Top of Page
   

- Advertisement -