PURPOSE
=========
To document one of the features of spooling in SQL*Plus. This article
explains the behavior of “@” when used in the spooled file name.
I checked for Unix and its working fine.
This is an undocumented behavior of 10g sqlplus.
How is “@” interpretted when used in spooled file name?
========================================================
When you spool output to file with “@” included in the file name, the “@” is
replaced with ORACLE_SID value.
For example:
SQL> spool c:aaa@aaa.txt
SQL> select sysdate from dual;
SYSDATE
———
28-SEP-02
SQL> spool off;
If ORACLE_SID= ora9ir2 in this environment, then the spool file created
will be aaaora9ir2aaa.txt.