PLS-00201 error calling function in package member
Hello,
I'm trying to call a function defined in a PL/SQL package, but receiving a PLS-00201 error.
Sorry, a finger-controller error caused me to submit before I was ready. I'm having the module replaced today. :)
After rethinking my decision to post here, I decided not to. I've never received a helpful answer, probably because the issues are not simple... Too bad.
Similar Messages
-
PLS-00201 error after moving a package to a new scheme
hi
I've moved a package to a new schema and all the packages in the original schema that reference the moved package now fail to compile. The moved package has had a public synonym created and the execute privileges assigned to the original schema by role. what am i missing? Using 11gR2 version 11.2.0.3.0Privileges granted through roles do not apply to stored procedures and packages that are compiled with definer rights (the default). You need to grant the original schema execute privileges on the new schema's package directly.
John -
PLS-00201 ERROR - XML. and XPATH. Calls
I'm getting the below errors. I've loaded javavm and inixml.
Does anyone have any suggestion on compiling the vendor code.
Thanks. Corey
SQL> show errors
Errors for PACKAGE BODY INTR_ITIN_PKG:
LINE/COL ERROR
334/3 PL/SQL: Statement ignored
334/13 PLS-00201: identifier 'XML.PARSE' must be declared
341/3 PL/SQL: Statement ignored
341/21 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
353/5 PL/SQL: Statement ignored
353/22 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
363/5 PL/SQL: Statement ignored
363/21 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
480/3 PLS-00201: identifier 'XML.FREEDOCUMENT' must be declared
480/3 PL/SQL: Statement ignored
498/11 PL/SQL: Statement ignored
LINE/COL ERROR
498/29 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
509/11 PLS-00201: identifier 'XML.FREEDOCUMENT' must be declared
509/11 PL/SQL: Statement ignored
685/3 PL/SQL: Statement ignored
685/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
707/3 PL/SQL: Statement ignored
707/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
753/3 PL/SQL: Statement ignored
753/17 PLS-00201: identifier 'XPATH.SELECTNODES' must be declared
SQL>I had a package which worked under 8i, part of the package body like
Create or Replace Package Body AbleTool as
Function Transform(xml Clob,xsl Clob) Return Clob is
p xmlparser.Parser;
xmldoc xmldom.DOMDocument;
xsldoc xmldom.DOMDocument;
proc xslprocessor.Processor;
ss xslprocessor.Stylesheet;
cl Clob;
begin
p := xmlparser.newParser;
xmlparser.setValidationMode(p, FALSE);
xmlparser.setPreserveWhiteSpace(p, TRUE);
xmlparser.parseClob(p, xml); -- parse xml
xmldoc := xmlparser.getDocument(p);
xmlparser.parseClob(p, xsl); -- parse xsl
xsldoc := xmlparser.getDocument(p);
proc := xslprocessor.newProcessor;
ss := xslprocessor.newStylesheet(xsldoc, '');
dbms_lob.createtemporary(cl, TRUE);
xslprocessor.processXSL(proc, ss, xmldoc,cl);
xslprocessor.freeStyleSheet(ss);
xslprocessor.freeProcessor(proc);
return cl;
when I installed 9i db, and run the package on it. I get errors
like
PLS-00201: identifier 'XMLPARSER' must be declared
PL/SQL: Item ignored
PLS-00201: identifier 'XMLDOM' must be declared
PL/SQL: Item ignored
PLS-00201: identifier 'XMLDOM' must be declared
PL/SQL: Item ignored
PLS-00201: identifier 'XSLPROCESSOR.PROCESSOR' must be declared
PL/SQL: Item ignored
PLS-00201: identifier 'XSLPROCESSOR.STYLESHEET' must be declared
PL/SQL: Item ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
I searched on the Forum, someone suggests that the following privileges should grant to the user.
execute of xmldom
execute of xmlparser
execute of xslprocessor
so I did as he said, the first two errors about xmldoc and xmlparser gone, the third error is still there, the error message is
PLS-00201: identifier 'XSLPROCESSOR.PROCESSOR' must be declared
PL/SQL: Item ignored
PLS-00201: identifier 'XSLPROCESSOR.STYLESHEET' must be declared
PL/SQL: Item ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
PLS-00320: the declaration of the type of this expression is incomplete or malformed
PL/SQL: Statement ignored
What else there I should do?
Please help. -
ORA-06550/PLS-00201 error while configuring data source
Hi,
My development platform is Visual Studio 2005, ODAC11g Release 1 (11.1.0.6.20), and Oracle 10g Release 2 database.
I tried to setup a sqlDatasource in my web page using drag and drop features
When I configure the sqlDatasource to use a stored procedure inside a package,
I notice that odp.net uses #0# as separator (instead of .) between package name and procedure name in Configure Data Source dialog box. Then when I clcik the Test Query button, I got following error.
There was an error executing the query. Please check the syntax of the command and if present, the types and values of the parameters and ensure they are correct.
ORA-06550: line 1, column 7:
PLS-00201: identifier 'PK_LOOKUP_TABLE#0#P_LIST' must be declared
ORA-06550: line 1, column 7
PL/SQL: Statement ignored
It looks like odp.net cannot locate PK_LOOKUP_TABLE#0#P_LIST.
Is there any workaround ?
Below is the stored procedure code. It compiles and runs without problem.
PACKAGE BODY pk_lookup_table
AS
/* Get a list of lookup table name */
PROCEDURE P_LIST (
O_CURSOR OUT sys_refcursor )
IS
l_cur sys_refcursor;
BEGIN -- executable part starts here
OPEN l_cur FOR
SELECT table_name
FROM all_tab_comments u
WHERE u.comments LIKE '%Lookup Table%'
ORDER BY 1;
o_cursor := l_cur;
END P_LIST;
END "PK_LOOKUP_TABLE";
On the sqlDataSource property sheet, if I click the Select Query property, the Command and Parameter Editor will open, then I can change the select command name to PK_LOOKUP_TABLE.P_LIST. Then if I run the application, I get another error.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'P_LIST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Seems that it can locate the procedure.
In the Command and Parameter Editor dialog, I can add output parameter, but data type is restricted. There is no REF CURSOR datatype in the dropdown list.
How can I add output parameter with REF CURSOR type via IDE ?
Thanks for the time looking into this issue.
MansionHi
Even I faced this problem while connecting to RMAN . But I feel your problem is different .
My issue was like this
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SET_CHARSET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
RMAN-04015: error setting target database character set to WE8MSWIN1252
Solution :
execute catproc.sql; -
Hi to all,
I have tried to create this procedure:
CREATE OR REPLACE PROCEDURE VERIFY_CREDENTIALS
pUSERNAME IN VARCHAR2,
pPASSWORD in VARCHAR2
IS
lCounter number;
lPassword varchar(255) DEFAULT GET_HASHED_PW( pPASSWORD);
BEGIN
SELECT COUNT(*) INTO lCounter
FROM WEBUSERS
WHERE USERNAME = pUSERNAME
AND ENCRYPTEDPWD = lPassword;
IF ( lCounter = 0 ) THEN
RAISE_APPLICATION_ERROR( -20001, 'invalid USERNAME/password' );
END IF;
END;When I compile, the error
PLS-00201 - The identifier GET_HASHED_PW must be declared
is displayed.
How can resolve this problem ? Can You help me ?
The DB Version is 10.2.0.1.0 under Windows 2003 Server
Thank You and Best Regards
GaetanoSolved,
The GET_HASHED_PW is declared in a Package.
I have added the name of package to the function and all work.
Thank You.
Gaetano -
How can I call functions in packages using flash builder?
a new guy in flash developnet, I need to find out a way to import multiple packages into frames and call functions. I know how to import packages, but an error occurs error 1120 : access of undefined property. How can ı solve them?
Is there any easy way to add Mediapomise object to the stage form the package? "addChild(loader);" does not work? or ı do not know whether it works or not, ı could not see the photo that ı took from camerauı object in android.
thank youI need to find out a way to import multiple packages into frames
Usually, no matter where you use any classes of any package, the imports happen always in the beginning.
If you have a specific problem with flashbuilder you should post in this forum:
http://forums.adobe.com/community/flash_builder -
PLS-00201 error when trying to pass an OUT parameter
Hi,
Please help me to resolve the below error:
I am trying to pass an OUT parameter in a package.
I have declared it in package specs as
ProcABC(p_val IN varchar2, p_val2 IN varchar2, p_val3 OUT varchar2)
In package body
I have created the procedure as
Create or Replace procedure ProcABC(p_val IN varchar2, p_val2 IN varchar2, p_val3 OUT varchar2) AS
v_LogDir varchar2(40);
v_message varchar2(200);
BEGIN
SELECT directory_path into v_LogDir FROM ALL_DIRECTORIES WHERE directory_name = 'ABC';
v_message := v_LogDir ;
some sql statements..
p_val3 := v_message;
Return p_val3;
End procABC;
SQL> exec pkg_A.procABC('Stage2', NULL, p_val3);
Package compiles successfully but while execution it returns error as:
ORA-06550: line 1, column 74:
PLS-00201: identifier 'p_val3 ' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Please advise.Hi Suresh,
Thanks for the information and help. I was able to run the package with this usage.
Now, the issue is
I need to return a v long string by the OUT parameter so I defined the datatype of OUT parameter as CLOB.
But, when I declare local variable to run the package with this OUT paramater I get the error :
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1
When I pass a shorter string it works.
Kindly advise me how to resolve this issue while using CLOB as datatype of OUT parameter. -
PLS-00201 error occurs when batching a stored procedure in SQL*Plus
I have a batch file to run a stored procedure and spool the results to file. When I enter the commands manually in sql*plus the output works fine and my results are spooled to the output file. But when I run the same commands in the batched script I get an error.
Any ideas?
Stored Procedure:
create or replace procedure MMP( p_cursor in out SYS_REFCURSOR)
as
begin
open p_cursorfor select name, id from table;
end;
batch file 1:
sqlplus -S user/pw@REPORTDV @sp_output_spooled.sql
script file sp_output_spooled.sql
Pasting these commands directly to the SQL*Plus command prompt spools the result set to file as expected.
set colsep '|'
set echo off
set feedback off
set termout off
set heading off
set linesize 9000
set pagesize 0
set trimspool on
set headsep off
spool output.TXT
var rc refcursor
execute MMP(:rc)
print rc
spool off
exit
The errors printed to output.TXT file after the batch is run and error occurs:
BEGIN MMP(:rc); END;
ERROR at line 1:
ORA-06550: line 1, column 8:
PLS-00201: identifier 'MMP' must be declared
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
ERROR:
ORA-24338: statement handle not executed
SP2-0625: Error printing variable "rc"Hi,
Your code worked fine for me.
Is MMP procedure owned by the same user that is running the batch file or does it have proper privileges and synonym?
vr,
Sudhakar -
PLS-00201 error when declaring ROWTYPE variable
Hi,
I want to declare the rec_ variable like this:
PROCEDURE Insert___ (
objid_ OUT VARCHAR2,
objversion_ OUT VARCHAR2,
new_ IN OUT VARCHAR2,
attr_ IN OUT VARCHAR2 )
IS
rec_ OBUS.ORDER_TAB%ROWTYPE;
where ORDER_TAB belongs to the OBUS schema, a different schema from where the present procedure is being created.
When compiling, I get the following error:
"PLS-00201: identifier 'OBUS.ORDER_TAB' must be declared"
Why do I get this? Can't I refer to a different schema in the declaration area of the procedure?
Thanks.
Leandro.Thank you both. It compiled ok after granting the select privilege.
However, I was able to execute a "select * from obus.order_tab" from a SQLPlus session, no matter if I had granted or not the SELECT privilege for that table.
It seems the behaviour is different in a SQL session from a declaration in a procedure. Am I right? What could be the reason for this?
Thanks.
Leandro. -
Hi,
I get the following error message when trying to run a JNI application on a Mac. The application runs fine under Windows and I am trying to port to a Mac and am struggling. I've also copied the declarations and definition from the java and c++ header and source files.
The problem appears to be the calling of the function initWindows as the debugging print statement on the c++ is never displayed.
"Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: initWindows
at AvistoGL.initWindows(Native Method)"
Java file declaration
public native boolean initWindows();
Header file declaration
JNIEXPORT jboolean JNICALL Java_AvistoGL_initWindows (JNIEnv *, jobject);
cpp file definition
JNIEXPORT jboolean JNICALL Java_AvistoGL_initWindows(JNIEnv *env, jobject panel)
std::cout<< "Inside Java_AvistoGL_initWindows"<< std::endl;
return InitWindowMac(env, panel);
}You include the h file in the cpp file?
The cpp method is NOT part of any C++ class right?
What is the package for the java method?
You load the library in java and do not eat exceptions? -
Exception calling function in package
i am looking for help determining why i receive the following exception when trying to call the PA_SEARCH_NOTES() function that is in the PA_SEARCHING package:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00221: 'PA_SEARCH_NOTES' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:407)
at ...
this is the pl/sql:
PACKAGE Pa_Searching IS
TYPE tRowID IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
FUNCTION Pa_Search_Notes(in_string IN VARCHAR2, in_search_type IN NUMBER, in_types IN VARCHAR2, out_rows OUT tRowID)
RETURN NUMBER;
END Pa_Searching;this is the java code:
Connection con = new Connection( );
CallableStatement cs = con.prepareCall( "{ CALL PA_SEARCHING.PA_SEARCH_NOTES( ?, ?, ?, ? ) }" );
cs.setString( 1, bean.getPhrase( ) );
cs.setInt( 2, 1 );
cs.setString( 3, bean.getIssueTypeString( ) );
cs.registerOutParameter( 4, oracle.jdbc.OracleTypes.ARRAY, "TABLENUM" );
cs.execute( );this is the oracle database information i'm using:
Oracle8i Enterprise Edition Release 8.1.6.2.0 - Production
With the Partitioning option
JServer Release 8.1.6.2.0 - Production
using Oracle JDBC driver [ver. 8.1.7.0.0]Try { ? = CALL PA_SEARCHING.PA_SEARCH_NOTES( ?, ?, ?, ? ) } and use registerOutParameter to accept the return value from your function.
-
Error calling function in Oracle
Hi All,
I am calling the function in Oracle the following way
cs = conn.prepareCall( "{? = CALL package_name.function_name(?)}" );
But on the above line in my code, I am getting the error
java.sql.SQLException: Malformed SQL92 string at position: 5. Expecting "call"
Did anybody run into same issue?
ThanksUntil something slicker comes up:
try {
String sql = "select RISK.HVAR_MAINT.FNV_GET_PARTITION_NAME(?,'04-mar-2003') as theValue from dual ";
// Connection conn = getConnection();
CallableStatement stmnt = conn.theConnection.prepareCall(sql);
stmnt.setString(1,"hvar_mtm") ;
stmnt.execute();
ResultSet rs = stmnt.getResultSet() ;
while ( rs.next() ) System.out.println(rs.getString("theValue") ) ;
rs.close() ;
} catch (Exception e) {
System.out.println(e.getMessage() ) ;
Note: I have not been able to get "CALL" to work in Oracle
May be the next guy cal get conn.prepareCall( "{? = CALL package_name.function_name(?)}" ); to work -
Query Report Error ( Call function inside Query report )
Hello every body,
I'v database Oracle 11g R2 and i have Apex 4.1 , when i run my report with a simple query :
select gydb_wf_id,
gydb_workflow_name,
gydb_work_flow_owner,
FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR
from gybd_workflow ;
I got the following message error :
Query cannot be parsed within the Builder. If you believe your query is syntactically correct,
check the ''generic columns'' checkbox below the region source to proceed without parsing.
ORA-00904: "FUNC_GET_NBR_LAST_STEPS": invalid identifie
Note that i have all privilages on my function (FUNC_GET_NBR_LAST_STEPS) ,
Any issues
TnahkyouHi Yosof ,
concatenate schema name with your function
for example
select gydb_wf_id,
gydb_workflow_name,
gydb_work_flow_owner,
ABC.FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR // here i have written ABC as schema name
from gybd_workflow ;try and see it is working or not.
hope it works,
Thanks,
Jitendra -
Error: 'incorrect access of a member from const-qualified function'
Hi all,
While compiling what seemed to be a straightforward chunk of code I got the following error: 'incorrect access of a member from const-qualified function'
Unfortunately I can't find a small use case to give here, but the gist is:
int rval;
my_class::fill_rval(rval);
with
struct my_class { static void fill_rval(int &rval); };
The calling function is a member of a class, but not const-qualified (and not accessing any members in any case!). The callee is a static member function.
Does anyone know what this error means? The only thing Google finds is a bug report in FileZilla [1] where they fixed it by creating a local variable rather than manipulating temporaries, but I'm not using any temporaries in the first place.
[1] http://trac.filezilla-project.org/ticket/1283
Thanks!
RyanIt may be a compiler bug, however, it's impossible to say without seeing the code, of course.
If you manage to create a reasonably small compilable (well, except for the error) test case, you can post it here or file a bug though http://bugreport.sun.com/bugreport/ -
Error calling a package function
Hi all,
I've created one package and inside it, I've two different functions. The package definition and body are OK.
Now, I want use it but, I've an error:
ORA-06550: line 16, column 13:
PLS-00201: 'BB.PKG_BB_TEMP' must be declared
this is the function declaration on package declaration:
FUNCTION busca_municipio (gest varchar2) RETURN number;
Procedure solu (codi_ges number, muni number);
And this is the code from I'm calling:
DECLARE
CURSOR datos IS
select a.id from bb.cr_agent a, bb.cr_branchoffice b, bb.cr_professionalorder p, bb.cr_user u where a.branchoffice_id = b.id
and b.professionalorder_id = p.id and p.externalsystem_id = 42 and a.id = u.id and u.address_id is null;
cod_ag number;
muni number;
BEGIN
muni:=0;
open datos;
loop
fetch datos into cod_ag;
exit when datos%notfound;
muni:=bb.pkg_bb_temp.busca_municipio(cod_ag);
bb.pkg_bb_temp.solu (cod_ag,muni);
end loop;
close datos;
END;
This package is owned by user BB, and I'm connected like sys to execute the code I put before.
Any ideas?
Regards,
dbajugdbajug wrote:
Hi all,
I'm having problems to grant:
SQL> select object_name, object_type, status from dba_objects where owner like 'BB' and object_type like 'PACK%';
OBJECT_NAME OBJECT_TYPE STATUS
PKG_bb_temp PACKAGE VALID
PKG_bb_temp PACKAGE BODY VALID
SQL> GRANT EXECUTE ON BB.PKG_bb_temp to sys;
GRANT EXECUTE ON BB.PKG_bb_temp to sys
ERROR in line 1:
ORA-04042: procedure, function, package or package body doesn't exist
SQL> conn bb/*******
Conected.
SQL> GRANT EXECUTE ON PKG_bb_temp to sys;
GRANT EXECUTE ON PKG_bb_temp to sys
ERROR in line 1:
ORA-04042: procedure, function, package or package body doesn't exist
Any ideas?
Regards,
dbajugHave you created the package with a case sensitive name i.e. did you put double quotes around it?
select owner, object_name from all_objects where upper(object_name) = 'PKG_BB_TEMP';The owner should show as "BB" and the object_name should be in upper case (hopefully). If it's not upper case then it's been created case sensitive and you you'll have to either recreate the package without using double quotes around the name or make sure you always reference the package with double quotes and the case exact version of the name.
e.g.
GRANT EXECUTE ON "PKG_bb_temp" TO <user>;Hopefully, you are not running your other code as SYS, so you should ensure you grant permission to the correct user, not to SYS.
Maybe you are looking for
-
I changed my email address and my password on my ipad but when I tried to change the address on my icloud account it keeps asking me for my old password which I no longer know. I can't delete the account because I can't access it without the old pass
-
PHOTOSHOP ELEMENTS 13 Editing is not accessable with my new Yosemite OS
I have called in to support for TWO DAYS!! Spoken with 5 people left hanging for over 1/2 an hour with a expectation of their return... I hung up!! eventually was given a promise of a call back in 45 minutes from a specialist. Never happened. WTF ADO
-
Ive had the browser a couple of days now and I've noticed it crashes occasionally. Ive also noticed it doesn't play back videos off you-tube correctly and there is a green band going across them as they play. I think this may be an issue with adobe f
-
How do i restore a frozen ipad3
My daughter's ipad3 is frozen. She was in the process of upgrading to IOS7 when it locked up with "ipad is disabled' msg. I have tried the normal procedure of shutting the ipad off - holding the sleep button until red bar appears then shutting it dow
-
About 3 weeks ago my Sleek Photo started acting up, and I have tried everything to get it fixed. Any advice would be much appreciated. Here are my specifics: OS: Windows XP SP2 Media Player: Windows Media Player .0.5722.545 Player: Sleek Photo Firmwa