Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: who execute scripts in Win NT like Unix!!

RE: who execute scripts in Win NT like Unix!!

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Wed, 14 Nov 2001 05:31:55 -0800
Message-ID: <F001.003C4788.20011114050520@fatcity.com>

@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                    
  Aordonez_at_ccss.sa.cr        Icq# 30173325

------------------------------------------------------------
The true is out there in WWW
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Alexander Ordonez
  INET: aordonez_at_ccss.sa.cr

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: ListGuru_at_fatcity.com (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: NDATFM_at_labor.state.ny.us

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: ListGuru_at_fatcity.com (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).
Received on Wed Nov 14 2001 - 07:31:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US