Think Foward Logo Tested on Oracle 7 Tested on Oracle 8.0

Shell Script

Database Size

Updated: 08-Jan-2002
Version: 1.0

Description

Displays physical size off all databases on a UNIX Machine.

Parameters

None

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
#!/bin/ksh export PATH=/usr/local/bin:$PATH # Locate oratab file, exit if we can't find it if [ -f /etc/oratab ]; then ORATAB="/etc/oratab" ; elif [ -f /var/opt/oracle/oratab ]; then ORATAB="/var/opt/oracle/oratab" ; else echo echo "ERROR: Unable to locate oratab file" exit 1 ; fi for i in `egrep '^[a-zA-Z].*:.*:.*$' $ORATAB | awk -F: '{ print $1}' | sort -u ` do export ORACLE_SID=$i export ORAENV_ASK=NO . oraenv 2>/dev/null sqlplus -s internal << EOF 2>/dev/null col Mb form 999,999 select name, sum(bytes)/1024/1024 Mb from dba_data_files, v\$database group by name; exit EOF done

Related Links

Oracle 9i: (Shell Script) Database Size

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links