You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by khalid syed <kh...@gmail.com> on 2007/12/05 15:55:46 UTC

PLS-00201: identifier '' must be declared

Hi,

I am trying to call a stored procedure defined within a package in Oracle
database from my servlet using java.sql.CallableStatement
The connection is established using JNDI.
I get the error:
PLS-00201: identifier '<package_name.procedure_name>' must be declared

However, the procedure gets executed when I try calling it with the schema
name prefixed - '<schema_name.package_name.procedure_name>'. The connection
is established using the same schema credentials. I have given the necessary
grants to the database user/schema.

Could you please let me know the following:
1. Do I necessarily need to mention the schema name to call the procedure.
2. If it is required how do I get the schema/user id from the JNDI settings
under Context.

Thanks and Regards,
Khalid Syed.

Re: PLS-00201: identifier '' must be declared

Posted by Edward Dowgiallo <ed...@gmail.com>.
The schema name is not required in general.

Speak to your DBA about creating a public synonym for the package.

Ed

On 12/5/07, khalid syed <kh...@gmail.com> wrote:
> Hi,
>
> I am trying to call a stored procedure defined within a package in Oracle
> database from my servlet using java.sql.CallableStatement
> The connection is established using JNDI.
> I get the error:
> PLS-00201: identifier '<package_name.procedure_name>' must be declared
>
> However, the procedure gets executed when I try calling it with the schema
> name prefixed - '<schema_name.package_name.procedure_name>'. The connection
> is established using the same schema credentials. I have given the necessary
> grants to the database user/schema.
>
> Could you please let me know the following:
> 1. Do I necessarily need to mention the schema name to call the procedure.
> 2. If it is required how do I get the schema/user id from the JNDI settings
> under Context.
>
> Thanks and Regards,
> Khalid Syed.
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PLS-00201: identifier '' must be declared

Posted by mg...@hotmail.com.
JNDI was designed for DB access with and without schema classification

once you have a connection you can always alter your session to take a
schema
ALTER SESSION SET SCHEMA = schema_name

M--
----- Original Message -----
Wrom: NHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXI
To: <us...@tomcat.apache.org>
Sent: Wednesday, December 05, 2007 9:55 AM
Subject: PLS-00201: identifier '<package_name.procedure_name>' must be
declared


> Hi,
>
> I am trying to call a stored procedure defined within a package in Oracle
> database from my servlet using java.sql.CallableStatement
> The connection is established using JNDI.
> I get the error:
> PLS-00201: identifier '<package_name.procedure_name>' must be declared
>
> However, the procedure gets executed when I try calling it with the schema
> name prefixed - '<schema_name.package_name.procedure_name>'. The
connection
> is established using the same schema credentials. I have given the
necessary
> grants to the database user/schema.
>
> Could you please let me know the following:
> 1. Do I necessarily need to mention the schema name to call the procedure.
> 2. If it is required how do I get the schema/user id from the JNDI
settings
> under Context.
>
> Thanks and Regards,
> Khalid Syed.
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org