Home » SQL & PL/SQL » SQL & PL/SQL » ORA-6508 Error (Oracle 10G)
ORA-6508 Error [message #450181] Mon, 05 April 2010 12:08 Go to next message
bholeuday
Messages: 28
Registered: April 2009
Location: Talavali
Junior Member

Hi,

I am getting below error when SP (Packaged Procedure) is called from application...
ORA-06508: PL/SQL: could not find program unit being called
After checking DB, i found package to be valid and call to SP giving same error ORA-06588.
If i fire alter command to compile the package..
alter package name compile;

and then if i try to run the SP in db it runs sucessfully.
again after some time ORA-06508 it occurs again. after compiling it starts working fine again.

Body of the procedure :-

begin
indexFields.extend;
indexFields(indexFields.last) := ATTRIBUTE_REC_TYPE(i_attributeName,i_attributeValue);
o_errorcode := '0';
o_errormsg := null;
EXCEPTION
WHEN OTHERS THEN
o_errorcode := to_char(SQLCODE);
o_errormsg := SQLERRM;
indexFields := ATTRIBUTE_TABLE_TYPE();
end prepBatchIndexField;

WHEREAS (Definition of types) :-

indexFields ATTRIBUTE_TABLE_TYPE := ATTRIBUTE_TABLE_TYPE();
CREATE OR REPLACE TYPE ATTRIBUTE_TABLE_TYPE IS TABLE OF ATTRIBUTE_REC_TYPE
/

CREATE OR REPLACE TYPE ATTRIBUTE_REC_TYPE IS OBJECT
(ATTRIBUTE_NAME VARCHAR2(256),ATTRIBUTE_VALUE VARCHAR2(512)
);
/

I donno what is wrong here...sometimes it is working fine, sometimes gives error on compiling it works again.
Please help me in this regards.

Thanks & Regards





Re: ORA-6508 Error [message #450182 is a reply to message #450181] Mon, 05 April 2010 12:12 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
The EXCEPTION handler is 100% totally worthless & should be removed.

Procedure will go INVALID when any dependent object is changed.

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: ORA-6508 Error [message #450183 is a reply to message #450181] Mon, 05 April 2010 12:17 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
ORA-06508: PL/SQL: could not find program unit being called 
Cause: An attempt was made to call a stored program that could not be found. 
The program may have been dropped or incompatibly modified, or have compiled with errors. 
Action: Check that all referenced programs, including their package bodies, exist and are compatible.  


Trace out what making you SP/package INVALID state?

Sriram Smile
Re: ORA-6508 Error [message #450186 is a reply to message #450183] Mon, 05 April 2010 12:24 Go to previous messageGo to next message
bholeuday
Messages: 28
Registered: April 2009
Location: Talavali
Junior Member

Hi,

When error occurs every time i check the object which are invalid and can cause the existing procedure to be invalid state.
But querying user_objects also does not show any invalid object also.
Error get resolved when i ...

1] compile the package again with alter command.
2] drop and recreate the package
3] disconnect and connect the session again.

Is it something related to memory ?

Thanks & Regards
Re: ORA-6508 Error [message #450187 is a reply to message #450181] Mon, 05 April 2010 12:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your previouos topics:
BlackSwan wrote on Wed, 02 December 2009 16:29
...You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.

BlackSwan wrote on Tue, 16 June 2009 17:42
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
...

Michel Cadot wrote on Thu, 30 April 2009 12:59
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Use SQL*Plus and copy and paste your session then we can see what's happening and where.
...


Yes, you can do it.

[Updated on: Mon, 05 April 2010 12:24]

Report message to a moderator

Re: ORA-6508 Error [message #450189 is a reply to message #450186] Mon, 05 April 2010 12:26 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Is it something related to memory ?
Problem Exists Between Keyboard And Chair.
Re: ORA-6508 Error [message #450191 is a reply to message #450189] Mon, 05 April 2010 12:34 Go to previous messageGo to next message
bholeuday
Messages: 28
Registered: April 2009
Location: Talavali
Junior Member

Hi,

I mean to say shared pool memory allocation ?

Thanks & Regards
Re: ORA-6508 Error [message #450193 is a reply to message #450191] Mon, 05 April 2010 12:38 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I mean to say shared pool memory allocation ?
Previous response is still the answer.
Re: ORA-6508 Error [message #450194 is a reply to message #450193] Mon, 05 April 2010 12:52 Go to previous messageGo to next message
bholeuday
Messages: 28
Registered: April 2009
Location: Talavali
Junior Member

If You dont know the answer then please keep quiet Mr. Blackswan
Re: ORA-6508 Error [message #450198 is a reply to message #450186] Mon, 05 April 2010 13:12 Go to previous messageGo to next message
flyboy
Messages: 1903
Registered: November 2006
Senior Member
bholeuday wrote on Mon, 05 April 2010 19:24
Hi,

When error occurs every time i check the object which are invalid and can cause the existing procedure to be invalid state.
But querying user_objects also does not show any invalid object also.

Objects, on which the procedure is depending, do not have to necessarily be invalid. They may be just dropped and re-created on the fly. Dropping the depending object makes the procedure invalid. You might list all of them by querying USER_DEPENDENCIES view. Check CREATED and LAST_DDL time for all of them.
Re: ORA-6508 Error [message #450207 is a reply to message #450198] Mon, 05 April 2010 13:59 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
I guess he is saying about This...

http://www.freelists.org/post/oracle-l/ORA06508-and-the-Shared-Pool-sizing,1


sriram Smile
Re: ORA-6508 Error [message #450212 is a reply to message #450194] Mon, 05 April 2010 14:15 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
bholeuday wrote on Mon, 05 April 2010 19:52
If You dont know the answer then please keep quiet Mr. Blackswan

If you don't want to follow the guidelines then please don't post Mr. bholeuday

[Updated on: Mon, 05 April 2010 14:15]

Report message to a moderator

Previous Topic: SQL performance when comparing to NULL in where clause
Next Topic: Function returning a table inside where clause
Goto Forum:
  


Current Time: Thu Apr 25 17:18:22 CDT 2024