Dette eksempelscript (test.sql):
set heading off verify off feedback off echo off term off pagesize 0 linesize 10000 trimout on trimspool on timing off
spool test.log
SELECT 'content of spool file' FROM dual;
spool off
når du kører:
>sqlplus scott/tiger
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jun 22 08:46:58 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Mon Jun 22 2015 08:46:52 +02:00
Connected to:
Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
SQL> @test.sql
SQL> exit
Disconnected from Oracle Database 12c Release 12.1.0.1.0 - 64bit Production
genererer en "ren" spool-fil:
>type test.log
content of spool file