Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Some useful Unix Commands Linux/Unix
  • kill all processes from specific user in solaris. Linux/Unix
  • Database link password in user_db_links Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • myfile Oracle
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • How to see which patches are applied. Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • DBMS_SQL for alter session. Oracle
  • get_vmstat_solaris Oracle
  • Oracle 11g Environment Setup Oracle
  • find_pk.sql /* Find Primary Key */ Oracle
  • sbind.sql Find Bind variable from sql_id sqlid 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

  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • Good notes on Oracle Events Oracle
  • Implementing Listener Security Oracle
  • How to choose Driver table in SQL statement Oracle
  • Oracle Data Direct to TAPE Oracle
  • Trace a SQL session from another session using ORADEBUG 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 (149)
  • MYSQL (5)
  • Oracle (394)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • copying/removing directory with all its subdirectory Linux/Unix
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • Find average Row Length and other table size calculation. metalink notes Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • ORA-3136 Oracle
  • Proc code Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • Drop database in Oracle 10g Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme