Created
October 6, 2016 16:23
-
-
Save dotmaik1/2e097a52b8cc40ac27ab847dbbf66bae to your computer and use it in GitHub Desktop.
Historical database growth script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ksh | |
| export ORACLE_SID=mxapps1 | |
| export ORACLE_HOME=/u001/MXDB/oracle/product/11.2.0/db | |
| export PATH=$ORACLE_HOME/bin:$PATH | |
| $ORACLE_HOME/bin/sqlplus -s "/as sysdba" <<EOF | |
| SET PAGES 2000 LINES 200 | |
| SET HEAD OFF HEADING OFF FEEDBACK OFF | |
| SET SERVEROUTPUT ON | |
| spool /home/oracle/dbascripts/sizing/historical_db_growth.log append; | |
| select sysdate, sum(bytes)/1024/1024 || ' MB' from dba_data_files; | |
| spool off; | |
| exit; | |
| EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment