Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Linked Server Problem


Linked Server Problem

Author
Message
shohelr2003
shohelr2003
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 610
Dear All,

I have configured a linked server between sql server 2008 r2 and oracle 11g. Everything is successfully established. But when I execute the insert command or select command from sql server to oracle. It throws an error message. The error message is as follows.

Msg 7356, Level 16, State 1, Line 1

The OLE DB provider "OraOLEDB.Oracle" for linked server "SS-PC1" supplied inconsistent metadata for a column.
The column "TEXT" (compile-time ordinal 2) of object ""SCOTT"."TABLE1"" was reported to have a "DBTYPE" of 130
at compile time and 131 at run time.


I executed the following insert command.

insert into [SS-PC1]..SCOTT.TABLE1 values('This is test command',100000);



Please help me to sort out the prob.
MyDoggieJessie
MyDoggieJessie
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4862 Visits: 7363
Sounds like a data type conversion issue. Is the data you're selecting of the same type as the table being inserted into?

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience" ;-)
shohelr2003
shohelr2003
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 610
I configured linked server using "Oracle Provider for OLE DB" and tested connection. Everything works fine. When I execute insert command, the problem arises.

System Configuration:
Windows 7 Ultimate 64 bit
SQL Server 2008 R2 Standard Edition 64 bit
Oracle 11gR2 Client 64 bit
ODAC 11.2.0.3.2.0 64 bit

I think Microsoft OLE DB provider for Oracle will work. But I can't get that option while configuring linked server. So I need to install Microsoft OLE DB provider for Oracle.

Please anyone help.

Thanks,
shohelr2003
shohelr2003
SSC Veteran
SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)SSC Veteran (225 reputation)

Group: General Forum Members
Points: 225 Visits: 610
Yes, data type was a fact. I fixed it but still problem arises. So I think to install Microsoft OLE DB Provider for Oracle.
MyDoggieJessie
MyDoggieJessie
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4862 Visits: 7363
Try wrapping the string in double-quotes:
insert into [SS-PC1]..SCOTT.TABLE1 values('"This is test command"',100000);

______________________________________________________________________________
"Never argue with an idiot; They'll drag you down to their level and beat you with experience" ;-)
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