sqlplus output formatting
From: Martin Doering <doeringm_at_gmx.de>
Date: 2000/07/27
Message-ID: <398026a9.281945926_at_news.mn.man.de>#1/1
EOF
)|grep '.dbf' >>outfile
Date: 2000/07/27
Message-ID: <398026a9.281945926_at_news.mn.man.de>#1/1
[Quoted] I want to get an output of sqlplus, which shows me all the tablespaces and the referring dbfiles. I want ot work with the output in a shellscript and put all the lines in a outfile.
This worked without problems under svrmgrl, but I have problems with the formatting capabilites of sqlplus. I did:
(sqlplus /nolog <<EOF
connect /as sysdba
set head off
set linesize 1000
set feedback off
set newpage none
set sqlprompt ''
select tablespace_name, file_name
from sys.dba_data_files order by tablespace_name, file_name;exit
EOF
)|grep '.dbf' >>outfile
This is, what is shown in the outfile:
SQL> SQL> SQL> SQL> SQL> 2 3 AA_DATA /usr/ora_tp1/oradata/tp1/AA_DATA.dbf
AA_INDEX /usr/ora_tp1/oradata/tp1/AA_INDEX.dbf AC_DATA /usr/ora_tp1/oradata/tp1/AC_DATA.dbf AC_INDEX /usr/ora_tp1/oradata/tp1/AC_INDEX.dbf DDF_ADMIN /usr/ora_tp1/oradata/tp1/DDF_ADMIN.dbf FA_DATA /usr/ora_tp1/oradata/tp1/FA_DATA.dbf FA_INDEX /usr/ora_tp1/oradata/tp1/FA_INDEX.dbf FH_DATA /usr/ora_tp1/oradata/tp1/FH_DATA.dbf FH_INDEX /usr/ora_tp1/oradata/tp1/FH_INDEX.dbf FN_DATA /usr/ora_tp1/oradata/tp1/FN_DATA.dbf
So the first line is corrupted. What can I do?
Martin Doering Received on Thu Jul 27 2000 - 00:00:00 CEST