how can i use 'append' clause in spool file to keep my existing spool file and add to it whenever i re-login
Printable View
how can i use 'append' clause in spool file to keep my existing spool file and add to it whenever i re-login
Hi.
Try this:
http://www.oracle-base.com/articles/...ACE_SPOOL_SAVE
Cheers
Tim...
hi tim
its not working in that way also as iam using oracle 9i
i write this in glogin.sql file:
column l_date new_value l_date noprint
select to_char(sysdate,'DDMONYYYY') l_date from dual;
spool c:\sqllog\log_&&l_date append
and when i login to my sql it gives following error:
Illegal spool file name: "c:\sqllog\log_14FEB2006 append" (bad character: ' ')
is there any other way. i don't want to overwrite the previous data in my spool file that was created very first time i logged to my SQL.
thanx
no, cant do that, 9i doesnt support appending to a spool file
You could create a sequence and use that in the file name OR use sys_context('USERENV','SESSIONID') - either way every logon will have a unique file name. eg:
select to_char(sysdate,'DDMONYYYY')||'_'||sys_context('USERENV','SESSIONID') l_date from dual;
And yet another idea. If you're on UNIX create an alias in your .profile for sqlplus:
I believe this should workCode:alias sqlplus='sqlplus /nolog 2>&1 | tee -a mysqlplus.log