|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 5:24 AM
Points: 126,
Visits: 348
|
|
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.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 4:32 PM
Points: 2,063,
Visits: 3,787
|
|
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"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 5:24 AM
Points: 126,
Visits: 348
|
|
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,
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 5:24 AM
Points: 126,
Visits: 348
|
|
| Yes, data type was a fact. I fixed it but still problem arises. So I think to install Microsoft OLE DB Provider for Oracle.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 4:32 PM
Points: 2,063,
Visits: 3,787
|
|
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"
|
|
|
|