- 论坛徽章:
- 0
|
以下是一个脚本,我想返回一些数据(oracle)
sqlplus system/manager 1>/dev/null 2>/dev/null <<!
col Tablespace_Name format a20;
set echo off;
set pages 0;
set trim off;
rem set COLSEP '|';
set concat off;
set trimspool off;
set termout off;
set show off;
set autoprint off;
set autotrace off;
rem linesize 2000;
rem set head on;
rem set head off;
set flush off;
set feedback off;
set feed off heading off;
spool $HOME/tmp1.txt;
select
b.file_id as File_ID,
b.tablespace_name as Tablespace_Name,
b.bytes as Totle_B,
(b.bytes-sum(nvl(a.bytes,0))) as Used_B,
sum(nvl(a.bytes,0)) as Free_B,
sum(nvl(a.bytes,0))/(b.bytes)*100 as Per_B
from dba_free_space a,dba_data_files b where a.file_id=b.file_id
group by b.tablespace_name,b.file_id,b.bytes
order by b.file_id ;
exit;
!
cat $HOME/tmp1.txt;
*******************************
但是总是说 command not foundline 就是cat $HOME/tmp1.txt;这一行
我已经结束了,为什么还是不行呢,请各位指点 一下?????? |
|