standred package [message #53885] |
Wed, 16 October 2002 04:34 |
sarfraz ahmad
Messages: 1 Registered: October 2002
|
Junior Member |
|
|
how can we compile or refresh package in case of any coruption/delettion if it.
how we can recompile the objects.
will the data save in the case of repair
|
|
|
Re: standred package [message #53892 is a reply to message #53885] |
Wed, 16 October 2002 09:03 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
Well - I've never seen a corrupted package. Broken ones - plenty - all due to developers/DBAs. Standard built in packages can be re-created at any time by re-running the scripts which created them in the first place. These days there are many scripts which could be responsible. They should all be under $ORACLE_HOME/rdbms/admin Just grep for the package name you are looking for and then figure out what the driving script is. Finding supporting Oracle documentation on metalink.oracle.com is advisable before runiing what you think should be run though.
To recompile, use a script like this to generate the recompile statements you want.
SELECT
'alter '||decode(object_type,'PACKAGE BODY','PACKAGE',object_type)||' '||owner||'.'||object_name||' '||decode(object_type,'PACKAGE BODY','COMPILE
BODY','COMPILE')||';'
FROM all_objects
WHERE owner like '%'
AND owner not in ('SYS', 'SYSTEM')
AND object_type IN
('PACKAGE','PACKAGE BODY', 'VIEW','PROCEDURE','TRIGGER','FUNCTION')
AND status='INVALID';
|
|
|