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
saída do sqlplus:
Queries will appear in spool
SYS_CONTEXT('USERENV','INSTANCE_NAME')
---------------------------------------------------
wibble
Output from the HOST command will not
AWESOMESERVERNAME
SQL>
teste.log:
Queries will appear in spool
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
wibble
Output from the HOST command will not
Se não for possível capturar a saída do HOST, alguém pode sugerir uma solução alternativa.