Running Oracle stored procs from C?

Check that the Oracle user that your . NET application is connecting with has permissions to execute the stored procedure.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

A beginner question: I have a stored proc (just a procedure, without any packages) in the Oracle Database: CREATE OR REPLACE procedure FII_DBO. CLEAR_UNIT_TEST_PRODUCT IS BEGIN ... END CLEAR_UNIT_TEST_PRODUCT; and it works fine in TOAD. However, when I try to run it from C# it complains: System.Data.OracleClient.

OracleException: ORA-06550: line 1, column 7: PLS-00201: identifier 'CLEAR_UNIT_TEST_PRODUCT' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored relevant C# code: Command = new OracleCommand(); Command. CommandText = procedureName; Command. CommandType = CommandType.

StoredProcedure; Command. Connection = connection; Command.ExecuteNonQuery(); c# .net oracle ora-06550 link|improve this question edited May 19 '11 at 5:44OMG Ponies95.2k1065138 asked Mar 18 '09 at 11:00Grzenio11.7k23269 84% accept rate.

Yeah, that was the problem – Grzenio Mar 18 '09 at 11:15.

Found it, the error message was a bit misleading. I was executing it as a different user, who didn't have the proper access rights. This did the trick: grant execute on FII_DBO.

CLEAR_UNIT_TEST_PRODUCT to FII_USER.

Yeah, the error message is less than helpful, but I guess the thinking is that it's done for security purposes. If the user can't access the stored procedure, then the database won't even admit to its existence. – Ian Nelson Mar 18 '09 at 11:21.

I.e. Setting procedureName to "FII_DBO. CLEAR_UNIT_TEST_PRODUCT", not just "CLEAR_UNIT_TEST_PRODUCT"?

Yeah, tried that as well: identifier 'FII_DBO. CLEAR_UNIT_TEST_PRODUCT' must be declared – Grzenio Mar 18 '09 at 11:10.

Your procedure seems to be created in another schema. Issue ALTER SESSION SET CURRENT_SCHEMA = FII_DBO right after connecting. I recall the provider has some bugs with calling stored procedures.

Set your CommandText to BEGIN FII_DBO. CLEAR_UNIT_TEST_PRODUCT(); END; and CommandType to Text Also you may try to change the case of you stored procedure name, like: fii_dbo. Clear_unit_test_product , I recall that the case matters too.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions