Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • rm_backup_arch_file.ksh Linux/Unix
  • Order by with ROWNUM Oracle
  • How to remove blank lines using vi editor command Linux/Unix
  • scp with ssh2 Linux/Unix
  • JSON/XML Types in Oracle Oracle
  • How to analyze statspack or AWR report. Oracle
  • Query to Generate aggregate on every 30 mins. Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • configUOCIOTTO.ora Oracle
  • More info about /proc folder and its relation with processes. Linux/Unix
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • login.sql Oracle
  • find_string_in_database.sql Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle

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

  • Virtual Indexes in Oracle Oracle
  • get_aix_vmstat.ksh Oracle
  • Find sort details from Db find_sort.sql Oracle
  • Find_stale_dr.sql finding stale physical DR.. Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • My Minimum Tuning Programs Oracle

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • shutdown linux Linux/Unix
  • Oracle Connections expire_time and firewall Oracle
  • My Minimum Tuning Programs Oracle
  • Find sort details from Db find_sort.sql Oracle
  • compile_inv.sql Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • Linux CPU info. Linux/Unix
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme