Linked Server issue Multiple-step OLE DB operation generated errors.

  • Need your Help on below error.

    I am getting following error on execution MySQL of procedure using Linked server from SQL Server.

    Query:-

    exec ('CALL proc_clientdata(''2014-06-06'',''2014-06-06'','''','''','''');') AT [MySQL];

    Error:-

    OLE DB provider "STREAM" for linked server "(null)" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

    Msg 0, Level 11, State 0, Line 0

    A severe error occurred on the current command. The results, if any, should be discarded.

    Query is returning one row and then giving above error.

  • Does the stored procedure itself run successfully on MySQL?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi Koen,

    Yes , when I execute the same procedure in MySQL it runs successfully .

    But when I try to run from SQL Server it is giving me error.

    I have also tried to execute using openquery and it is giving me following error.

    Query:-

    SELECT * FROM OPENQUERY([MySQL], 'db_agencyengine_test.dbo.proc_clientdata ''2014-06-06'',''2014-06-06'','''','''',''''')

    Error:-

    Msg 7357, Level 16, State 2, Line 1

    Cannot process the object "db_agencyengine_test.dbo.proc_clientdata '2014-06-06','2014-06-06','','',''".

    The OLE DB provider "MSDASQL" for linked server "MySQL" indicates that either the object has no

    columns or the current user does not have permissions on that object.

  • Can you issue a simple select statement through the linked server?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • yes I am able to get the output of select statement.

  • Either check that the account that is used by the linked server has execute permissions on the stored procedure (I guess such a things exist in MySQL), or that metadata information is retrieved by the stored procedure (keeping the no columns returned message in mind).

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi Koen,

    My issue is resolved I just changed query as follows

    SELECT * FROM OPENQUERY([MySQL], 'CALL proc_clientdata(''2014-06-16'',''2014-06-16'','''','''','''');')

  • Sushant Yadav (6/17/2014)


    Hi Koen,

    My issue is resolved I just changed query as follows

    SELECT * FROM OPENQUERY([MySQL], 'CALL proc_clientdata(''2014-06-16'',''2014-06-16'','''','''','''');')

    Glad to know you resolved the issue.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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