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: RUNNING .BAT FILE FROM PROCEDURE ?

Re: RUNNING .BAT FILE FROM PROCEDURE ?

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Thu, 10 Jan 2002 05:56:27 -0800
Message-ID: <F001.003EC214.20020110053036@fatcity.com>

The fact, that it works under 9i, is really interesting.  I didn't have chance to play with it yet. As for 8.1.7, Oracle runs under NT 'SYSTEM' account (just look at startup options of Oracle service in ControlPanel/Services).
Hence, your .bat file, called from Oracle, is executed under 'SYSTEM' account, which does not have privileges to access 'mapped' network drives, and it is not possible to grant those privileges to 'SYSTEM' account.
What you can try, is to create NT account, grant it appropriate privileges to access network drive, and change startup options for Oracle service to 'Log on'  as this new account, should work.
 
Again, it's interesting, what's been changed in 9i.  Check the account used to run Oracle service.  
Igor Neyman, OCP DBA<A
href="mailto:ineyman_at_perceptron.com">ineyman_at_perceptron.com 

<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

  Sent: Thursday, January 10, 2002 7:40   AM
  Subject: RUNNING .BAT FILE FROM PROCEDURE   ?   

  OS : WINNT , DB :  8.1.7
  I have a java class embedded in database and I am   calling it with a procedure.
  The procedere executes a bat file .
  In the bat file there 2 copy commands . First of   them copying a file from  a local directory to another local directory.   

  Second command copy's a file in a shared   directory of another computer to another shared directory of that computer.   

  BAT file and permissions are all set correctly in   all directories..(everyone ,full access).Also gave javasyspriv role and other   privileges to the user .
 When I double click on the bat file . Both
  two commands run correctly.
  But When I run the bat file via the procedure .   The first command runs correctly (local copy command) , but the second one   (copying a file in a shared directory of another computer to another shared   directory of that computer)  does not run .
 

  What is the problem ? I gave all permissions but   still does not work for remote computer shared files.   I tried it on 9i database and it worked   ..(INTERESTING)
  Any ideas please ???
 
 
Received on Thu Jan 10 2002 - 07:56:27 CST

Original text of this message

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