Home » SQL & PL/SQL » SQL & PL/SQL » Executing stored procedure
Executing stored procedure [message #376554] Wed, 17 December 2008 17:22 Go to next message
vijju56
Messages: 22
Registered: December 2008
Junior Member
Hi,

I am having table like this:

tmp_pdf

ID NUMBER(9) PK
pdf BLOB NULLABLE

I wrote a procedure like insert_pdf. I am having SQL developer tool. I am using this statement to execute the procedure:

EXECUTE insert_pdf(1,NULL);

I am getting this error -



Error starting at line 1 in command:
EXECUTE insert_pdf(3,NULL);
Error report:
ORA-01502: index 'DBA_PDF3.TMP_PDF_PK' or partition of such index is in unusable state
ORA-06512: at "DBA_PDF3.INSERT_PDF", line 7
ORA-06512: at line 1
01502. 00000 - "index '%s.%s' or partition of such index is in unusable state"
*Cause: An attempt has been made to access an index or index partition
that has been marked unusable by a direct load or by a DDL
operation
*Action: DROP the specified index, or REBUILD the specified index, or
REBUILD the unusable index partition

Is this the right execution command?

Thanks

[Updated on: Wed, 17 December 2008 17:37]

Report message to a moderator

Re: Executing stored procedure [message #376586 is a reply to message #376554] Wed, 17 December 2008 23:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
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 and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Quote:
Is this the right execution command?

Yes.

Regards
Michel
Re: Executing stored procedure [message #376698 is a reply to message #376554] Thu, 18 December 2008 05:26 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Well, we don't know what the code in the procedure INSERT_PDF looks like, and we don't know how you created that table, so there's a limited amount of help we can provide.

Run these two queries, and post the results:
select object_name,object_type from user_objects where status = 'INVALID';     

select * from user_errors;
Re: Executing stored procedure [message #376830 is a reply to message #376554] Thu, 18 December 2008 14:30 Go to previous messageGo to next message
vijju56
Messages: 22
Registered: December 2008
Junior Member
I found the answer

DECLARE
v_ID tmp_pdf.id%TYPE;
v_pdf tmp_pdf.pdf%TYPE;
BEGIN
v_id:=1;
v_pdf:=NULL;

insert_pdf(v_id,v_pdf);
END;

Thanks
Re: Executing stored procedure [message #377335 is a reply to message #376830] Mon, 22 December 2008 08:01 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
No - that's not the reason your code now works.
I suspect that someone has fixed the problem with the index and not told you.
Previous Topic: Query help with cumulative sum to be broken into sections
Next Topic: Inserting and Deleting
Goto Forum:
  


Current Time: Tue Dec 06 10:32:28 CST 2016

Total time taken to generate the page: 0.05433 seconds