ORACLE SPOOL
If you want the result show in file:
SQL> spool <path>
SQL > <sql script>
SQL > spool off;
Example:
SQL> spool c:\1.txt
SQL> select host_name,instance_name from v$instance;
SQL> spool off;
SQL> select host_name,instance_name from v$instance;
SQL> spool off;
If you want the result show in file and not show on screen:
SQL>set termout off;
SQL>spool <path>
SQL > <sql script>
SQL > spool off;
Example:
SQL> set termout off;
SQL> spool c:\1.txt
SQL> select host_name,instance_name from v$instance;
SQL> spool off;
SQL> spool c:\1.txt
SQL> select host_name,instance_name from v$instance;
SQL> spool off;
Comments
Post a Comment