@lex,
What I usually do in NT is to create a temporary file containing the sql
statement within the NT batch job and then execute it via sqlplus. This,
for me, is easier to maintain - less files to open when making changes.
echo SELECT s.sid, > temp.sql
echo s.serial#, >> temp.sql
echo p.pid, >> temp.sql
echo p.spid, >> temp.sql
echo s.osuser, >> temp.sql
echo s.machine, >> temp.sql
echo s.program >> temp.sql
echo FROM v$session s, v$process p >> temp.sql
echo WHERE p.addr = s.paddr >> temp.sql
echo AND s.schemaname <> 'SYS' >> temp.sql
echo ORDER BY p.spid,s.sid, p.pid, p.spid; >> temp.sql
echo exit >> temp.sql
sqlplus user/password @temp.sql
hope this helps.
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Tuesday, November 13, 2001 6:00 PM
To: Multiple recipients of list ORACLE-L
Hi gurus!!!
I need execute any scripts in win nt like oracle in unix!!!
example:
sqlplus user/password << fin
SELECT s.sid,
s.serial#,
p.pid,
p.spid,
s.osuser,
s.machine,
s.program
FROM v\$session s, v\$process p
WHERE p.addr = s.paddr
AND s.schemaname <> 'SYS'
ORDER BY p.spid,s.sid, p.pid, p.spid;
fin
@lex
------------------------------------------------------------
Lic. Alexander Ord��ez Arroyo
Caja Costarricense del Seguro Social
Soporte T�cnico - Divisi�n de Inform�tica
Telefono: 295-2004, San Jos�, Costa Rica
[EMAIL PROTECTED] Icq# 30173325
------------------------------------------------------------
The true is out there in WWW
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Alexander Ordonez
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mercadante, Thomas F
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).