Home » SQL & PL/SQL » SQL & PL/SQL » TRUNCATE & DROP
TRUNCATE & DROP [message #18625] Thu, 07 February 2002 14:12 Go to next message
bhasker
Messages: 5
Registered: February 2002
Junior Member
I need to drop and recreate tables as part of the
stored procedure. do you guys no any way to recompile
objects as part of stored procedure, because after
i drop the tables, the objects(in my case stored procedures) that depend on these tables get invalid.
I am looking for something which i can use to
automatically compile stored procedures that depend on these tables as part of a stored procedure.
do you guys know any comands or dynamic pl/sql that automatically compiles the objects that depend on these
stored procedures
Re: TRUNCATE & DROP [message #18626 is a reply to message #18625] Thu, 07 February 2002 16:08 Go to previous messageGo to next message
seng
Messages: 191
Registered: February 2002
Senior Member
you can find some tool, which is easy to use to compile function,procedure and packages. e.g Toad(www.toadsoftware.com).
other way is create script or procedure to check the invalid object and compile back with this command like

alter function <object name> compile;
alter procedure <object name> compile;
alter package <object name> compile;

the object name can been loaded from dba_objects ( with status - invalid) and load into this command to compile .
Re: TRUNCATE & DROP [message #18630 is a reply to message #18625] Thu, 07 February 2002 17:26 Go to previous message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
you can use TRUNCATE TABLE table1 DROP STORAGE to deallocates space.
Previous Topic: Help in Cursor!!!!
Next Topic: drop vs truncate.
Goto Forum:
  


Current Time: Wed Apr 24 23:13:20 CDT 2024