Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> FYI: script to resize datafiles before backup
For the brave ones..
I wrote a script to resize all datafiles to minimal size. Could be run right before the backup starts, or to save disk space. Below is the script header. It's nothing special, but it works for me. Comments are welcome.
REM NAME
REM resize_db.sql
REM DESCRIPTION
REM Generates/executes ALTER DATABASE DATAFILE '..' RESIZE commands to decrease filesizes REM so the backup timewindow becomes smaller, or just to save disk space REM REM USAGE REM By default, the script will not actually execute the ALTER statements generated REM If you want that just change value for boolean "ThisIsReal" to TRUE first REM All statement actually executed can be traced back in the alert.log file REM by searching for the comment "/* resize_DB */" REM REM NOTES REM This script assumes that all datafiles have the same standard block size, REM it doesn't handle Oracle9i's nonstandard block size yet REM REM Resize is done under following conditions: REM * datafile must be autoextensible so it can grow back to what is was before the resize REM * newsize must be smaller than original sizeREM
-- Andre van Winssen andrew01nospam_at_nospam-xs4all.nl please remove nospam if you want to send me mail.Received on Wed Feb 13 2002 - 10:45:38 CST
- application/octet-stream attachment: resize_db.sql