Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • alter database backup controlfile to trace Oracle
  • Processes Parameter decision Oracle
  • Temporary Tablespace Information and restriction. Oracle
  • sql_doing_fts.sql Oracle
  • Important Solaris Commands Linux/Unix
  • get_vmstat.ksh Linux/Unix
  • Goog notes on X$ tables Oracle
  • Find total file sizes Linux/Unix
  • Gathering statistics with DBMS_STATS Oracle
  • runon_allpdbs_show_conname.sh Oracle
  • export import with parameter file. Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • process id based files and processes Linux/Unix
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle

run this before doing any dbchange pvm_pre_change.sql

Posted on 08-Jul-2009 By Admin No Comments on run this before doing any dbchange pvm_pre_change.sql

column currdate new_value pvmdt noprint

select ‘pvm_comp_’ || to_char(SYSDATE, ‘DDMONRRRR_HH24MI’) || ‘.sql’ currdate from v$instance;

spool &pvmdt

set lines 120 pages 2000

set head off

set feedback off

prompt set pages 5000 lines 120

prompt select ‘prompt ‘||a.owner||’.’||a.object_name||’ – ‘||a.object_type|| chr(10)||

prompt ‘alter ‘||

prompt decode(a.object_type,’PACKAGE BODY’,’PACKAGE’,object_type) || ‘ “‘||

prompt a.owner||'”.’||a.object_name||’ compile ‘||

prompt decode(a.object_type,’PACKAGE BODY’,’BODY;’,’;’)

prompt from

prompt dba_objects a

prompt where a.status = ‘INVALID’

prompt and object_id not in

prompt (

exec dbms_output.enable(NULL);

set serveroutput on size 1000000

declare

v_objid number(10);

total_count number(10);

v_counter number(10) := 1;

cursor c1 is select object_id from dba_objects where status=’INVALID’;

begin

select count(1) into total_count from dba_objects where status=’INVALID’;

for cur1 in c1 loop

dbms_output.put_line(cur1.object_id);

if v_counter < total_count then
dbms_output.put_line(‘,’);

end if;

v_counter := v_counter + 1;

end loop;

end;

/

prompt )

prompt /

set feedback on

spool off

Oracle, SQL scripts

Post navigation

Previous Post: Implementing Listener Security
Next Post: remove archfiles only when it is applied to DR rm_archfiles.sh

Related Posts

  • Load SPM baseline from AWR Oracle
  • How to stop OCSSD Daemon Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Renaming Global Name GLOBAL_NAME Oracle
  • Goldengate Tutorial Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (402)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (350)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sql23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • rm_backup_arch_file.ksh Linux/Unix
  • oradebug ipcrm ipcs Oracle
  • Read CSV File using Python Python/PySpark
  • findobj.sql Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • chk_space_SID.ksh Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • Important Solaris Commands Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme