Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find all users who have DML privileges Oracle
  • sess1.sql Oracle
  • get_vmstat_linux Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • Kernel Parameters for Solaris Linux/Unix
  • ORA-01220 Oracle
  • Implementation of key based authentications Linux/Unix
  • Another export with Query Oracle
  • Oracle Statspack survival Guide Oracle
  • sesswait.sql Oracle
  • Renaming the column name Oracle
  • Building Our Own Namespaces with “Create Context” Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • To find explain plan for a statement that occurred in past. Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA 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

  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Sequence Resetting Oracle
  • Privilege to describe the table. Oracle
  • Goldengate document from Porus Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry 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 (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • For Search and replace unix command. Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • Oracle 11g Training on 29JAN1010 Oracle
  • Implementing Listener Security Oracle
  • Set Role explaination. Oracle
  • Proc code Oracle
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • chk_space_SID.ksh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme