Rerun catalog.sql and catproc.sql

来源:互联网 发布:知聊多久提现 编辑:程序博客网 时间:2024/05/16 09:55


 Rerun catalog.sql and catproc.sql


在open下,conn / as sysdba


Catalog - creates data dictionary views.

Catproc - create in built PL/SQL Procedures, Packages etc

 

catalog.sql and catproc.sql are used to create/recreate database internal views/procedures/packages, etc...

They are primarily used after applying a patch/patchset to the database (Refer to instructions of your specific patch/patchset)

Pros:
It is not harmful to run these against a database.

Cons:
It will consume resources when running.


running catalog and catproc will make your packages/procedures invalid. You will have to recompile them. 
You can use utlrp.sql which you can find in $ORACLE_HOME/rdbms/admin. Or you could run utlrmp.sql and recompile ( in parallel ) using the provided procedure.



1. SQL> @catalog.sql

2. SQL> @catproc.sql

3. Check for invalids from dba_objects:

    SQL> select owner, object_name from dba_objects where status='INVALID';

4. Run utlrp.sql:  
    SQL> @utlrp.sql

5. Check for invalids again.

    SQL> select owner, object_name from dba_objects where status='INVALID';




0 0