gen_change_pct.sql
Download Script
/*
=========
Abstract:
=========
Generates a script to change the PCTINCREASE clause on all non-sys owned
objects to 0.
=============
Requirements:
=============
DBA Privileges
=======
Script:
=======
*/
SET ECHO off
REM NAME: gen_change_pct.sql
REM USAGE:"@path/gen_change_pct"
REM ------------------------------------------------------------------------
REM REQUIREMENTS:
REM DBA privs
REM ------------------------------------------------------------------------
REM AUTHOR:
REM Anonymous
REM Copyright 1995, Oracle Corporation
REM ------------------------------------------------------------------------
REM PURPOSE:
REM Running this script will in turn create a script to change the
REM pctincrease storage clause on all non-SYS owned objects to 0.
REM The created file, change_pct.sql,
REM can be run by any user with the DBA role.
REM
REM ------------------------------------------------------------------------
REM DISCLAIMER:
REM This script is provided for educational purposes only. It is NOT
REM supported by Oracle World Wide Technical Support.
REM The script has been tested and appears to work as intended.
REM You should always run new scripts on a test instance initially.
REM ------------------------------------------------------------------------
REM Main text of script follows:
set verify off
set feedback off
set termout off
set pagesize 0
set termout on
prompt Creating change pctincrease script...
set termout off
spool change_pct.sql
prompt spool change_pct.log
select 'ALTER '||segment_type||' '||owner||'.'||segment_name||' STORAGE(PCTINCREASE 0);'
from sys.dba_segments
where owner not in ('SYS')
and pct_increase <> 0;
/
prompt spool off
spool off
/*
----------- cut ---------------------- cut -------------- cut --------------
Solutions and References:
<PrSol:2068441.6> TALES FROM THE SCRYPT (TFTS) OVERVIEW
*/