Oracle Error 00302
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies ora-06550 pls-00302 component must be declared of this site About Us Learn more about Stack Overflow the company Business
Pls-00302 Component Must Be Declared Package
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges pls-00302 component must be declared cursor Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute:
Pls-00302 Component 'count' Must Be Declared
Sign up Why do I get PLS-00302: component must be declared when it exists? up vote 3 down vote favorite 1 I am using Oracle 10.2. I am working in some scripts to move some ORACLE Objects from one SCHEMA (S1) to another (S2). I am creating the functions with DBA role. When moved, one of my functions becomes invalid, but I don't pls 00302 component must be declared stored procedure understand why. Its code goes along these lines: MY_FUNC CREATE OR REPLACE FUNCTION S2."MY_FUNC" RETURN VARCHAR2 IS something VARCHAR2; othervar VARCHAR2 (50):= 'TEST'; BEGIN something := S2.MY_FUNC2(); /*some code*/ return othervar; END; / If I use MY_FUNC2 without the schema, It works: something := MY_FUNC2(); instead of something := S2.MY_FUNC2(); My_FUNC2 CREATE OR REPLACE FUNCTION S2."MY_FUNC2" RETURN VARCHAR2 IS something BOOLEAN; othervar VARCHAR2 (50) := 'TEST2'; BEGIN /*some code*/ return othervar; END; / MY_FUNC2 has a synonym like this: CREATE OR REPLACE PUBLIC SYNONYM "MY_FUNC2" FOR "S2"."MY_FUNC2" MY_FUNC compiles with errors: PLS-00302: component 'MY_FUNC2' must be declared I don't understand why I am getting this error, when my functions were in the other schema (S1) they had exactly the same structure and the synonym was created exactly the same (but pointing to S1) and MY_FUNC compiled fine. I didn't create this functions and synonym originally. Is it possible that I am missing some privileges in S2, so MY_FUNC can work properly? oracle plsql oracle10g share|improve this question edited Jun 7 at 1:59 Mark Stewart 7421525 asked Feb 24 '15 at 20:56 Dzyann 1,70642546
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on
Pls-00302 Component Must Be Declared Xml Publisher
and reload this page. Please enter a title. You can not
Pls-00302 Component 'rowid' Must Be Declared
post a blank message. Please type your message and try again. More discussions in PL/SQL and SQL pls-00302 procedure must be declared All PlacesDatabaseDatabase Application DevelopmentPL/SQL and SQL This discussion is archived 13 Replies Latest reply on Nov 11, 2010 11:54 PM by 813289 PLS-00302: component must be declared http://stackoverflow.com/questions/28706077/why-do-i-get-pls-00302-component-must-be-declared-when-it-exists 609621 May 4, 2009 11:42 AM Dear all, As user MEXX I created the below procedure.. I can able to execute the procedure.. When I give debug,execute prov on this proc to user test1.. am getting the error : PLS-00302: component '.D_COMMAND' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored user test1 has https://community.oracle.com/thread/896690 all necessary privileges on the tables EIM_EXECUTED_COMMANDS,EIM_COMMAND_RECORD and on the sequence spc_trans.. I've created private synonyms for all this objects in test1 schema.. CREATE OR REPLACE PROCEDURE MEXX.D_COMMANDS AS PRAGMA AUTONOMOUS_TRANSACTION; CURSOR CR_MJI_SIN IS SELECT sno, cno, iumber FROM TEST1.m_mca; C_SUBNO VARCHAR2 (20); C_CARDNO VARCHAR2 (12); C_IMSI_NUMBER VARCHAR2 (30); TRANSNO1 NUMBER (8); BEGIN OPEN CR_SMS_SUB; LOOP FETCH CR_SMS_SUB INTO C_SUBNO,C_CARDNO,C_IMSI_NUMBER; EXIT WHEN CR_SMS_SUB%notfound; SELECT spc_trans.NEXTVAL INTO TRANSNO1 FROM DUAL; INSERT INTO EIM_COMMAND_RECORD ( SUBSCR_TYPE, AREA, SUBNO, SERORDNO, TRANSNO, EXC, EXCSYSTEM, PORTNO, SPC_FUNCTION, APPDATE, NXTROUTINE, RETRANSMIT, TRANSSTATUS, EQUIPID, SOTYPE, CARDNO, CARD_TYPE) VALUES ( 'G', '0', C_SUBNO, NULL , TRANSNO1, 'GSM1', 'GSM1', '1', 'SERI', sysdate, 'SPC001', 'Y', 10, 'MCA' , 66, C_CARDNO, 'PLI'); INSERT INTO EIM_EXECUTED_COMMANDS ( TRANSNO, CMDNO, COMMAND, TIMEOUT) VALUES (TRANSNO1, 1, 'ADD MCA FOR '||C_SUBNO||' USING (IMSINO='||C_IMSI_NUMBER||')', 30); END LOOP; CLOSE CR_SMS_SUB; COMMIT; EXCEPTION WHEN OTHERS THEN raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ER
Message Navigator E-mail to friend Error 302: Component must be declared [message #418752] Tue, 18 August 2009 08:30 waqasbhai Messages: 118Registered: August 2008 Location: Pakistan Senior http://www.orafaq.com/forum/t/149107/ Member Hi I am getting Error 302: Component "..." must be declared error whenever i qualify a schema name with table, functions, procedure etc. eg if i declare a variable as: v_temp SCHEMA_NAME.TABLE_NAME.FIELD_NAME%TYPE; and compile it i get Error 302: Component "..." must be declared error however if i remove the scehma name and do it as: v_temp TABLE_NAME.FIELD_NAME%TYPE; must be then it complies fine. Please note that this problem is occuring in only one user/schema. Any help Report message to a moderator Re: Error 302: Component must be declared [message #418756 is a reply to message #418752] Tue, 18 August 2009 08:53 Michel Cadot Messages: 63911Registered: March 2007 Location: Nanterre, France, http://... Senior MemberAccount Moderator No enough must be declared data to compute. Where do you get this error? Regards Michel Report message to a moderator Re: Error 302: Component must be declared [message #418760 is a reply to message #418752] Tue, 18 August 2009 08:58 waqasbhai Messages: 118Registered: August 2008 Location: Pakistan Senior Member i am getting this error in the database function Report message to a moderator Re: Error 302: Component must be declared [message #418761 is a reply to message #418760] Tue, 18 August 2009 09:03 Michel Cadot Messages: 63911Registered: March 2007 Location: Nanterre, France, http://... Senior MemberAccount Moderator From where do you get the error? Which client? "Error 302: Component " is not a database error. Regards Michel Report message to a moderator Re: Error 302: Component must be declared [message #418762 is a reply to message #418752] Tue, 18 August 2009 09:03 waqasbhai Messages: 118Registered: August 2008 Location: Pakistan Senior Member soory the actuall error code is : pls-00302 component must be declared Report message to a moderator R