John Scoles wrote:
I sort if expected that for the exec it is usualy only used withing SP
perhaps

"begin; exec(user.package.proctest(?)); end; "  ?? who knows

same problem as without exec:

PLS-00302: component 'PACKAGE' must be declared

The next error is usually a permission problem on the Oracle side. Either the use who is calling the SP dose not have execute permission for the package or something in the package (hard to debug that) or the present state of the package is stopping you from executing it.

you might want to try

GRANT execute  to the package


The fact that DBD is returning the error from Oracle usually means that DBD is running correctly.

Cheers

It is not a permission issue.

call user.package.proctest(?)

works and

begin user.package.proctest(?); end;

fails with the error above.

Thanks for the help though - it almost got me there. I'll keep investigating.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Martin Evans wrote:
John Scoles wrote:
Wow I go one right for once.

Not 100% sure on why that is? Me thinks when you use 'Begin End' it forces OCI to take it as an pseudo 'stored procedure' and runs in the current OCI client.

I think using call just executes as a thread off the present client and in the background someplace??

You might want to try 'exec proctest(?); '

Doesn't work:

DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute) [for Statement "exec proctest(?)" with ParamValues: :p1=99] at procfail.pl line 17.

I think it does it in the local client.

Will have to crack open the OCI docs to see and as I am not suffering from insomnia right now I have no real want to start digging though it right now.

Cheers

Your solution with begin/end works for:

begin proctest(?); end;

but does not work for:

begin user.package.proctest(?); end;

DBD::Oracle::st execute failed: ORA-06550: line 1, column 11:
PLS-00302: component 'PACKAGE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 10 in 'begin user.<*>package.proctest(:p1); end;') [for Statement "begin user.package.proctest(?); end;" with ParamValues: :p1=99] at procfail.pl line 17.

Any idea how to call a procedure in a package in a particular uses schema because that would be a complete solution for me then?

Martin


Reply via email to