Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Linked Server Problem Expand / Collapse
Author
Message
Posted Monday, January 28, 2013 10:52 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 3, 2014 4:04 AM
Points: 203, Visits: 500
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.
Post #1412560
Posted Monday, January 28, 2013 1:09 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 25, 2014 9:33 PM
Points: 3,941, Visits: 7,162
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"
Post #1412622
Posted Tuesday, January 29, 2013 12:36 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 3, 2014 4:04 AM
Points: 203, Visits: 500
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,
Post #1412781
Posted Tuesday, January 29, 2013 12:38 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, August 3, 2014 4:04 AM
Points: 203, Visits: 500
Yes, data type was a fact. I fixed it but still problem arises. So I think to install Microsoft OLE DB Provider for Oracle.
Post #1412783
Posted Tuesday, January 29, 2013 6:55 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 25, 2014 9:33 PM
Points: 3,941, Visits: 7,162
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"
Post #1413021
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse