Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Identical Dblink Issue… Oracle
  • Jai Shree Ram Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • switchlogfile.sh Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • How can I tell if ASO is installed ? Oracle
  • scripts to take listener.log backup Linux/Unix
  • moving lob object to other tablespace lob_mvmt.sql Oracle
  • AWR license Oracle
  • Vivek Tuning for Row Locks. Oracle
  • Difference between SYNC and AFFIRM Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • rm_backup_arch_file.ksh Linux/Unix

pvm_pre_change.sql

Posted on 23-Jun-2009 By Admin No Comments on 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: Database logon trigger issue
Next Post: Free conference number from http://www.freeconference.com

Related Posts

  • column level grant syntax Oracle
  • Export With Query Another Example. Oracle
  • create database syntax Oracle
  • sql_plan9i.sql Oracle
  • Standby Database Behavior when a Datafile is Resized on the Primary Database Note:123883.1 Oracle
  • exp syntax in oracle 10g 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 (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle
  • sql_plan9i.sql Oracle
  • eplan.sql Oracle
  • Oracle 11g Training on 29JAN1010 Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • age_alert.ksh aging out alert.log Linux/Unix
  • adding new line after specific pattern using sed Linux/Unix
  • Roles and Stored Object behaviour Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme