SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Linked server error


Linked server error

Author
Message
Aatish Patel
Aatish Patel
SSC Veteran
SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)

Group: General Forum Members
Points: 263 Visits: 279
I create a linked server to Oracle in SQL 2008. tested the connection and it tests successfully.
When I try to query
SELECT top 10 * FROM [linkedserver]..[abc].[persons]
GO
it fails with following error :
Msg 7354, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "W263UW" supplied invalid metadata for column "INACTIVE_TS".
The data type is not supported.


Pls help with this.
Lowell
Lowell
SSC Guru
SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)

Group: General Forum Members
Points: 73373 Visits: 40968
Aatish Patel (11/25/2013)
I create a linked server to Oracle in SQL 2008. tested the connection and it tests successfully.
When I try to query
SELECT top 10 * FROM [linkedserver]..[abc].[persons]
GO
it fails with following error :
Msg 7354, Level 16, State 1, Line 1
The OLE DB provider "OraOLEDB.Oracle" for linked server "W263UW" supplied invalid metadata for column "INACTIVE_TS".
The data type is not supported.


Pls help with this.



in Oracle, what is the datatype for the column INACTIVE_TS in the [persons] table?

if it's a TIMESTAMP, look at this post:
http://webcache.googleusercontent.com/search?q=cache:6PcBw8RwF54J:drewstechnotes.blogspot.com/2010/05/easy-workaround-for-oracle-linked.html+&cd=1&hl=en&ct=clnk&gl=us

I've seen issues where an "old" drivers for Oracle version 9 is used agaisnt an Oracle version 10/11 database, and returns this kind of error for BLOB/CLOB columns;
the solution was to get a more updated Oracle driver installed on the SQL server to address the issue.

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Aatish Patel
Aatish Patel
SSC Veteran
SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)

Group: General Forum Members
Points: 263 Visits: 279
Hi,
I really don't know what data types does Oracle has. I was just give the name and info to create Linked server which I did successfully.
So the person table is on Oracle side?
Lowell
Lowell
SSC Guru
SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)SSC Guru (73K reputation)

Group: General Forum Members
Points: 73373 Visits: 40968
yes it is on the Oracle side; because of the _TS (_TIMESTAMP?) i think that it's the timestamp datatype issue.

pretty sure you can also resolve this by convertint the value to string or a different datetime as well.

you could find out the datatype via TSQL:
untested, but i think this is the syntax

SELECT * FROM [linkedserver]..[abc].[USER_TAB_COLS] WHERE TABLE_NAME = 'PERSON' AND COLUMN_NAME = 'INACTIVE_TS'



Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Aatish Patel
Aatish Patel
SSC Veteran
SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)SSC Veteran (263 reputation)

Group: General Forum Members
Points: 263 Visits: 279
it gives me the same error :
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search