Alex,

echo spool output.lis                        > sql_file.sql
echo SELECT s.sid,                          >> sql_file.sql
echo        s.serial#,                      >> sql_file.sql
echo        p.pid,                          >> sql_file.sql
echo        p.spid,                         >> sql_file.sql
echo        s.osuser,                       >> sql_file.sql
echo        s.machine,                      >> sql_file.sql
echo        s.program                       >> sql_file.sql
echo   FROM v$session s, v$process p        >> sql_file.sql
echo  WHERE p.addr = s.paddr                >> sql_file.sql
echo    AND s.schemaname <> 'SYS'           >> sql_file.sql
echo  ORDER BY p.spid,s.sid, p.pid, p.spid; >> sql_file.sql
echo  exit                                  >> sql_file.sql
echo spool off                              >> sql_file.sql

sqlplus dbvision/dbvision@t_nhspint @sql_file.sql


Put the above commands into a DOS batch file and then run it...you can add
in things like SET LINESIZE etc...just the same way as the spool command is
written.

Cheers,
Kev.

"hit any user to continue"
__________________

Kevin Thomas
Technical Analyst
Deregulation Services
Calanais Ltd.
(2nd Floor East - Weirs Building)
Tel: 0141 568 2377
Fax: 0141 568 2366
http://www.calanais.com


-----Original Message-----
Sent: 13 November 2001 23:00
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: Thomas, Kevin
  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).

Reply via email to