Oracle SP vs. MS SQL Reporting Services

  • Hi all,

    I am trying to use an Oracle stored procedure to return a data set for my report in SQL Server Reporting Services.

    First, is that doable?

    If yes, my stored procedure has one output parameter which is the REFCURSOR for the returned data set. How can I define the parameter in the reporting services? And how can I handle the data set?

    Any help? And useful links?

    Thanks,

  • I don't think SQL Server is going to have any idea what to do with a REFCURSOR object.  I'm guessing because I've never worked with Oracle, but it sounds impossible.

    I think you'll need a version of the stored procedure (on the Oracle server) that returns the actual results, not a cursor.  Then you can use OPENQUERY or OPENRESULTSET to execute the procedure.

  • It's supposed to work.

    Look for info on

    http://www.microsoft.com/technet/community/newsgroups/dgbrowser/en-us/default.mspx?dg=microsoft.public.sqlserver.reportingsvcs

    I have to add that I've tried it several times, but I can't get it to work. I now write the SQL directly

  • Hi Antoon Vansina,

    I found the solution just a minutes before you post the link which includes the solution!

    It now works like a charm.

    if you want any help let me know.

     

    Thanks,

  • Hi there,

    Could you post solution to use Oracle Stored procedure in Reporting Services..

    Here is my post on MS board.

    http://www.microsoft.com/technet/community/newsgroups/dgbrowser/en-us/default.mspx?pg=2&guid=&sloc=en-us&dg=microsoft.public.sqlserver.reportingsvcs&fltr=

  • Hi Pune Boy,

    Follow the following steps for a clean new report.

     

    0. Make sure that you can access oracle DB by writing a query not SP.

    1. Add a new report in the solution

    2. Created a new Data Set as follows:

    - Command type = Storedprocedure

    - The only text to be added is : MyOracleSchema.MySP

    3. The DataSource is pointing to MS OLE DB Provider for Oracle and the Type of the data source is set to Oracle, so the connection string should only have

    "data source={your DS}"

    4. you stored procedure in Oracle should have 1 and only 1 out parameter of type REF Cursor which is the only supported data type in Oracle.

    5. If this works, then you may add some IN parameters to your SP and update your report to pass them.

    - Add the parameters by clicking the "..." next to the Dataset, and set

    the parameters in the parameters tab(the out param is not required).

     

    Let me know if this works.

     

    Thanks,

     

     

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

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