Why Oracle SP with parameter Not Working with SSRS Report - oracle

I am trying to build SSRS report which using Oracle SP as backend to get data from Oracle DB. SP have only one input parameter & out put parameter ref cursor. On my client machine this is working fine but once I deployed on SSRS server it giving me error.
But same SP without any parameter or with one input parameter working on SSRS server
ODAC Driver Installed on SSRS server.
Error Message:
System.Data.OracleClient.OracleException (0x80131938): ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'get_name'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Related

SSRS report fail on Oraclev19 Function call

Thanks for your time on this question.
I'm new to SSRS but comfortable with basic Oracle SQL's.
I have some ssrs reports that run well on oracle v12 and now have to migrate db to oracle v19.
these reports have several oracle function that are used as dataset source. so on ssrs dataset, under 'query type' i select 'stored procedure' and enter function name with parameters and output. this approach was working well on old set up but in the new setup, it fails with oracle error:
An error has occured during report processing. (rsProcessingAborted)
Query execution failed for dataset 'region'. (rsErrorExecutingCommand)
ORA-06550: line1, column 7: PLS-00221: '<>' is not a procedure or is undefined ORA-06550:line1, column7: PL/SQL: statement ignored.
Some details:
the old versions: Oracle db v12, ssrs report builder v12, oracle client (TBC)
the new version: Oracle db v19, ssrs report builder v15, oracle client OLEDB
when i provide source as SQL query, the dataset works fine.
Could someone pls help on how to get over this error?
Have you called Oracle function from SSRS report?
Most of these function return 'refcursor', could this be an issue?
this has been nagging me for days. Many thanks in advance for your time and effort.
EDIT: I tried dataset source to a simple function GET_FUNC_TEST but that also fails with same error.
The issue was Oracle driver. OLEDB driver doesnt support refcursors. Once we installed oracle / odbc client, it was working smoothly.

Problem when migrate Sybase Database to Oracle with SQL Developer

I tried to use SQL Developer 19.2.1.247, connect Sybase 15.0 with jtds 1.3.1 successfully. However follow error occur and show in Migration Report when try to migrate the Sybase to Oracle:
<logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
<level>WARNING</level>
<class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
<message>Error:ORA-06550: line 1, column 14:
PLS-00201: identifier 'SYB12ALLPLATFORM.STAGECAPTURE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
: FAILED : Database Migration : FAILED</message>
<param>oracle.dbtools.migration.workbench.core.logging.LogInfo#62187f8f</param>
</record>
Any suggestion on the problem? Or any tools/method that can do the migration from Sybase to Oracle.
Thanks for your help!
The problem fixed after I grant all permission to the user
GRANT ALL PRIVILEGES TO migration_user;

Pass out variable as a command in Crystal Reports connected to Oracle database

I am trying to call a stored procedure using command (writing query) while connecting to Crystal Reports. Procedure has two IN parameters and one Out parameter which is a Sys_Refcursor to output the dataset from a table.
Problem is when calling the procedure from Crystal Reports I am getting error in setting the out variable.
call data_proc('abcd123', 345,:Data_Out)
above is my code from Crystal Reports.
Error:
ORA-01008 not all variables are bound
Unable to cross this hurdle, if I directly call procedure from connections instead of query their is User Name dependency where user name is prefixed to procedure and when I deploy on other databases I need to manually update the connection.

AcquireConnection method call to the connection manager Oracle Connector failed

I have setup the connection manager from SSIS to Oracle as:
In the Oracle source:
I can preview the data successfully:
However, upon attempting to execute the packge, the erorr appears as:
SSIS package "C:\Users\kakah\Documents\Visual Studio 2015\Projects\TestExcel\TestExcel\INV_MTL_SYSTEM_ITEMS_TL.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [17]: Truncation may occur due to inserting data from data flow column "DESCRIPTION" with a length of 600 to database column "DESCRIPTION" with a length of 150.
Warning: 0x802092A7 at Data Flow Task, OLE DB Destination [17]: Truncation may occur due to inserting data from data flow column "LONG_DESCRIPTION" with a length of 2000 to database column "LONG_DESCRIPTION" with a length of 150.
Error: 0x2C0 at INV_MTL_SYSTEM_ITEMS_TL: OCI error encountered. ORA-12154: TNS:could not resolve the connect identifier specified
Error: 0x20F at Data Flow Task, Oracle Source [62]: The AcquireConnection method call to the connection manager Oracle Connector failed with error code 0x80004005. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: Oracle Source failed validation and returned error code 0x80004005.
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
SSIS package "C:\Users\kakah\Documents\Visual Studio 2015\Projects\TestExcel\TestExcel\INV_MTL_SYSTEM_ITEMS_TL.dtsx" finished: Failure.
What could I be missing? How can this be resolved?
If you right click on the project and go to properties --> Configuration Properties --> Debugging, did you make sure Run64BitRuntime is False? Sometimes that gets toggles to True and will break it.
What exactly do you mean by executing the package? Execute it from BIDS/SSDT or SQL Server agent?
Are there any configuration files/dynamic configurations that you are using? From what it appears, the tnsnames.ora file that your connection manager is using at run time has bad connection information.
SSDT 2017 connecting to Oracle 9i.
Issue : on my windows 10 laptop I had installed 10G 32 Bit and 11G 64 bit client installed
Resolution : Remove all the clients and install only one version of Client 11G both 32 and 64 bit client and SSIS worked like a charm

How to convert Sybase error message offset to a Stored Procedure line number

I am trying to debug a long stored procedure in Sybase and I get an error message like:
Number (257) Severity (16) State (1) Server (DZUCRINSI225) Procedure (Calculate_FX_Haircut) Implicit conversion from datatype 'CHAR' to 'NUMERIC' is not allowed. Use the CONVERT function to run this query. (4068EE10)
I don't know where the error is occurring in the SP. How can I locate it? I guess that the '4068EE10' in the message may be an offset, but I don't know how to make use of it to find the line number. Can anyone help?
I should add that I am using Embarcadero Rapid SQL as an interface to the Sybase server. I'm not certain whether the '4068EE10' is added by Sybase or Embarcadero.
I haven't used Rapid Sql for a long while, but Open Client, the Sybase client interface, definitely has messages to the client that contain the line number when the SQL failing is an SP. Perhaps Rapid SQL is unsing an ODBC connection and the middleware discards Sybase specific things in server message handling?
Can you change your datasource to use a native Sybase connection - I'd expect Rapid Sql to be able to manage?
Why don't you try running this SP in the Sybase sql client isql?
You'll find you get a message that includes the SP name and line number.

Resources