Re: SQL*PLUS- Spooling problem

From: Marc Mazerolle <informaze_at_sympatico.ca>
Date: Wed, 10 Mar 1999 13:46:43 GMT
Message-ID: <36E6785F.D8A0169B_at_sympatico.ca>


I had a similar problem a while back to finally find out that my last select had a ';' and the following line had a '/';

Something like :

SELECT TO_CHAR(sysdate, 'DD/MM/YYYY HH24:MI:SS') FROM dual; /

This does execute the select once at the ';' and the '/' execute the last instruction in the buffer (the same select). Fortunatly, it was a harmless select like the one in my example use for trace purposes. Took me a while to figure it out.

Regards,

Marc Mazerolle

Ms. D.H. Harvey wrote:

> David Vanmarcke (david.vanmarcke_at_argenta.be) wrote:
> : Hi,
>
> : I have the following syntax-like script (original is with 1500
> : insert-commit-select blocks)
>
> : ==========================
> : spool inssel1.log
> : SELECT TO_CHAR(sysdate, 'DD/MM/YYYY HH24:MI:SS') FROM dual
> : /
> : INSERT INTO owner1.table1 SELECT * FROM owner1.table1_at_db_name
> : /
> : COMMIT
> : /
> : SELECT 'info:','owner1','table1', COUNT(*) FROM owner1.table1
> : /
> : INSERT INTO owner1.table2 SELECT * FROM owner1.table2_at_db_name
> : /
> : COMMIT
> : /
> : SELECT 'info:','owner1','table2', COUNT(*) FROM owner1.table2
> : /
> : ...
> : SELECT TO_CHAR(sysdate, 'DD/MM/YYYY HH24:MI:SS') FROM dual
> : /
> : spool off
> : ==========================
>
> : When the script is finished, the last xx lines of my logfiles are repeated
> : twice
> : although they have not been executed twice.
>
> : Is there anybody who can give me a reason why this duplication of logged
> : lines appears ???
> : I assume it has something to do with SQL*PLUS versus database links ..., but
> : I hope to have a confirmation from the pro's out there ! ;o)
>
> : Thanx in advance !!!
>
> : David.
>
> : 8.0.4.3 (Digital unix)
>
> Do the selects that repeat end in ; ? ie
>
> SELECT 'info:','owner1','table2', COUNT(*) FROM owner1.table2;
> /
>
> ; causes select to run. / causes the contents of the buffer to be
> run. In effect select run twice.
>
> Hope this helps Helen
Received on Wed Mar 10 1999 - 14:46:43 CET

Original text of this message