Linked Server Msg 7356

  • I have a Sybase 12.5 linked server defined to a SQL2000 SP3 instance using the Sybase OLE DB Provider.  The datasource successfully connects, and I can see the drop-down list of tables and views from within the SQL2000 instance.

    However, using Query Analyzer, when I select against a table, using the four-level syntax DATASOURCE.database.owner.tablename, I always get this error (no matter what table):

    Server: Msg 7356, Level 16, State 1, Line 10

    OLE DB provider 'Sybase.ASEOLEDBProvider' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

    OLE DB error trace [Non-interface error:  Column 'description' (compile-time ordinal 9) of object 'converts.dbo.securities' was reported to have a DBCOLUMNFLAGS_ISLONG of 0 at compile time and 128 at run time].

    According to BOL, this is a known bug with SQL7, and has to do with views and the use of numeric/decimal fields.  Unfortunately, none of those things apply in this case.

    Has anyone run into this?  Any suggestions for a workaround?

    Regards, Melissa

  • Hi,

    have u tried with openquery?

    ex.: select * from openquery("nameoflinkedserver", "statement")

  • Yes, with the same error.

    Regards, Melissa

  • Just wanted to update the thread ...

    After fiddling around with this, and consulting a Sybase newsgroup, it turns out that there is a bug with the OLE DB drivers.  Also, you may only use SQL Authenticated accounts when calling an OLE DB-defined Linked Server (windows authenticated accounts fail to execute).

    The best choice is to define the Linked Sybase servers using ODBC drivers.  These will work with either Windows or SQL Server authenticated accounts.  Finally, you must use the OPENQUERY syntax with fully qualified names.  Another trick:  A stored procedure will work only if it has no parameters; i.e.,

    select * from

    OPENQUERY(SS01,'exec sybsystemprocs.dbo.sp_who') is good.

    This is bad:

    select * from

    OPENQUERY(SS01,'exec sybsystemprocs.dbo.sp_who "61"')

    Go figure.

    Regards, Melissa

  • how were you able to get sql server to execute sps on sybae 12.5? I try and continue to get error message:

    Non-interface error: OLE DB provider unable to process object, since the object has no columnsProviderName='Sybase.ASEOLEDBProvider'

    I just try to run sp_who. Selects work fine.

  • You need to use ODBC drivers.  OLE DB will not work with sprocs.  At least, I haven't been able to get it to work.

    Regards, Melissa

  • sorry. I must be doing something boneheaded 'cause I still cant get it to work.

    I created a new odbc dsn and now get errror msg:

    Could not process object 'exec sybsystemprocs.dbo.sp_who'. The OLE DB provider 'MSDASQL' indicates that the object has no columns.

    OLE DB error trace [Non-interface error:  OLE DB provider unable to process object, since the object has no columnsProviderName='MSDASQL', Query=exec sybsystemprocs.dbo.sp_who']

     

     

  • I too am runing into the same issues when I try to use the parm with the SP. SPs without parms work fine. Now you can do the same thing with an Access DB ( using pass through queries) and it works. Surely, it should be able to work from SQL Server 2000 to Sybase 12.X.

Viewing 8 posts - 1 through 7 (of 7 total)

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