Hi, I'm trying to master command line Oracle:
Can anyone tell me why the first spool is successful but the second one isn't?
SQL> Spool text1
SQL> select * from dba_segments where tablespace_name = 'PRODUCTION';
SQL> Spool text2
SQL> select tablespace_name, segment_name, bytes, blocks, extents from dba_segments where tablespace_name = 'PRODUCTION';
text1.lst is a file containing all the contents of dba_segments for the Production tablespace as i would expect.
text2.lst is an empty file, but there is output on the screen - so i'm copying and pasting it. But obviously this method has limitations and it would be much better to be able to capture it straight to file.
Can anyone tell me why the first spool is successful but the second one isn't?
SQL> Spool text1
SQL> select * from dba_segments where tablespace_name = 'PRODUCTION';
SQL> Spool text2
SQL> select tablespace_name, segment_name, bytes, blocks, extents from dba_segments where tablespace_name = 'PRODUCTION';
text1.lst is a file containing all the contents of dba_segments for the Production tablespace as i would expect.
text2.lst is an empty file, but there is output on the screen - so i'm copying and pasting it. But obviously this method has limitations and it would be much better to be able to capture it straight to file.