Linked Server Problem

  • 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.

  • 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; Theyll drag you down to their level and beat you with experience

  • 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,

  • Yes, data type was a fact. I fixed it but still problem arises. So I think to install Microsoft OLE DB Provider for Oracle.

  • Try wrapping the string in double-quotes:

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

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply