![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Command/script to find size of Unix Box ? | sakthifire | Shell Programming and Scripting | 6 | 06-17-2008 11:07 PM |
| unix script to check whether particular file exists and to find its size | Balachandar | Shell Programming and Scripting | 9 | 02-04-2008 11:56 PM |
| shell script to find files by date and size | dadadc | UNIX for Dummies Questions & Answers | 1 | 10-20-2007 02:18 AM |
| Shell script to Find file size | ragsnovel | Shell Programming and Scripting | 1 | 08-10-2007 07:01 AM |
| oracle connection from shell script | DILEEP410 | Shell Programming and Scripting | 2 | 12-15-2006 06:46 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I need to execute a script to find the tablespace size in oracle.But i get an error. Script Executed:- #!/bin/ksh ORACLE_SID= oracelinstance ORACLE_HOME= oracle path PATH=$ORACLE_HOME/bin export ORACLE_SID ORACLE_HOME PATH sqlplus username/password@oracle_instance <<-EOF set serveroutput on whenever sqlerror exit 1; spool /tmp/tab_tmp.log connect sys/standard as sysdba; select tablespace_name, round((sum(bytes)/1024/1024),2) size_in_mb, sum(greatest(maxbytes,bytes))/1024/1024 total_available, round(((sum(bytes)/1024/1024)/(sum(greatest(maxbytes,bytes))/1024/1024)),2) pct_used from DBA_DATA_FILES group by tablespace_name order by 1; spool off EOF exit 0 Error : SQL> SQL> connect sys/standard as sysdba; Connected to an idle instance. SQL> SQL> select tablespace_name, round((sum(bytes)/1024/1024),2) size_in_mb,sum(greatest(maxbytes,bytes))/1024/1024 total_available, round(((sum(bytes)/1024/1024)/(sum(greatest(maxbytes,bytes))/1024/1024)),2) pct_used from DBA_DATA_FILES group by tablespace_name order by 1; select tablespace_name, round((sum(bytes)/1024/1024),2) size_in_mb, sum(greatest(maxbytes,bytes))/1024/1024 total_available, round(((sum(bytes)/1024/1024)/(sum(greatest(maxbytes,bytes))/1024/1024)),2) pct_used from DBA_DATA_FILES group by tablespace_name order by 1 * ERROR at line 1: ORA-01034: ORACLE not available |
| Forum Sponsor | ||
|
|