We will take the backup of the frequently used objects before we bounce the database and push it back once it come alive.
select 'execute dbms_shared_pool.keep('''||owner||'.'||name||''','''||decode(type,'PACKAGE BODY','P','PACKAGE','P','FUNCTION','P','PROCEDURE','P','TRIGGER','R','TYPE','T','SEQUENCE','Q')||''');' FROM v$db_object_cache
WHERE type NOT IN ('NOT LOADED','NON-EXISTENT','VIEW','TABLE','SEQUENCE','INVALID TYPE','CURSOR')
AND loads>1 AND executions>loads AND executions>100 AND kept='NO'ORDER BY owner,namespace,type,executions desc;
select 'execute dbms_shared_pool.keep('''||owner||'.'||name||''','''||decode(type,'PACKAGE BODY','P','PACKAGE','P','FUNCTION','P','PROCEDURE','P','TRIGGER','R','TYPE','T','SEQUENCE','Q')||''');' FROM v$db_object_cache
WHERE type NOT IN ('NOT LOADED','NON-EXISTENT','VIEW','TABLE','SEQUENCE','INVALID TYPE','CURSOR')
AND loads>1 AND executions>loads AND executions>100 AND kept='NO'ORDER BY owner,namespace,type,executions desc;
No comments:
Post a Comment