Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Pending Distributed Transations Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • proper cpu stats Linux/Unix
  • When to rebuld B-tree index Oracle
  • Monitor Long Running Job Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Kill a session dynanically using execute immediate Oracle
  • create PLAN_TABLE command. Oracle
  • create database syntax Oracle
  • Oracle Statspack survival Guide Oracle
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle
  • find_pdbs.sql Uncategorized
  • Backup and Recovery Scenarios 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

  • sqlnet.ora paramters Oracle
  • Find sort details from Db find_sort.sql Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • Wait Based Tuning Step by step with SQL statement Oracle
  • Explain Plan Doesn’T Change For Sql After New Statistics Generated 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 (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • 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.sh23-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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • Find all users who have DML privileges Oracle
  • restarting network in linux Linux/Unix
  • Query to Generate aggregate on every 30 mins. Oracle
  • CPU speed on Linux Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme