Re: sqlplus output formatting

From: Mike Dwyer <dwyermj_at_co,larimer.co.us>
Date: 2000/07/31
Message-ID: <Fqfh5.3$v03.445_at_wdc-read-01.qwest.net>#1/1


Put > set sqlprompt '' right after > connect /as sysdba

"Martin Doering" <doeringm_at_gmx.de> wrote in message news:398026a9.281945926_at_news.mn.man.de...
> 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 Mon Jul 31 2000 - 00:00:00 CEST

Original text of this message