spooltest.sql:
SPOOL test.log
CLEAR SCREEN
SET VERIFY OFF
PROMPT Queries will appear in spool
select sys_context('USERENV', 'INSTANCE_NAME') from dual;
PROMPT Output from the HOST command will not
HOST ECHO %COMPUTERNAME%
SPOOL OFF
sqlplus output:
Queries will appear in spool
SYS_CONTEXT('USERENV','INSTANCE_NAME')
---------------------------------------------------
wibble
Output from the HOST command will not
AWESOMESERVERNAME
SQL>
test.log:
Queries will appear in spool
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
wibble
Output from the HOST command will not
If it's not possible to capture HOST output, can someone please suggest a workaround.