SQL*Plus Spooling Wrapper

--******************************************************************************
--**
--** start_spool
--**
--** starts a spool file named with the passed prefix and the database SID
--** and timestamp suffixes.
--**
--******************************************************************************
column database_name noprint new_value database
column database_time noprint new_value now
select sys.database_name, to_char(sysdate,'yymmddhh24mi') as database_time from dual;
spool &1._&database._&now.
set timing on
set echo on

 

Advertisements