Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Unix command for system configuration Linux/Unix
  • Good Oracle Architecture In Short and point to point Oracle
  • Korn Shell Arithmatic Linux/Unix
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • Privileges Required to Create Procedures and Functions that uses objects from other schema. Oracle
  • First Entry in RAC Oracle
  • S3 Basic info AWS
  • Read CSV file using PySpark Python/PySpark
  • Finding Oracle Patches with opatch Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Good Doc 28-JUN-2006 Oracle
  • Changing default shell Linux/Unix
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • moving lob object to other tablespace lob_mvmt.sql 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

  • sid_wise_sql.sql Further explaination Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • 10g oem configuration Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • Database link password in user_db_links Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • column level grant syntax Oracle
  • Handling LOB data in Oracle Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • find checksum of a file. Linux/Unix
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Changing default shell Linux/Unix
  • To see mem usage and CPU usage system wide. Linux/Unix
  • How can I tell if ASO is installed ? Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme