Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Issuing Oracle administrative commands from restricted user account
"Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in message
news:92eeeff0.0302122042.2cc6111c_at_posting.google.com...
> "FC" <flavio_at_tin.it> wrote in message
news:<JYt2a.228733$AA2.8896727_at_news2.tin.it>...
> > Hello folks,
> > I guess my problem is very common, however I can't find a solution in
the
> > Windows 2000 documentation I own.
> > I want to execute several commands inside a batch progam (.bat) like
> > LSNRCTL, ORADIM and so on.
> > Each command requires administrator privileges, so I thought it would be
> > sufficient to "runas" the batch program itself as Administrator while
> > connected as a restricted user, but it doesn't work, the commands end up
in
> > error.
> > Is there any specific policy preventing inheritable permissions from
working
> > ?
> > Or any special right to be granted ?
> >
> > Thanks in advance for the help.
> >
> > Bye,
> > Flavio
>
>
> Are you providing the administrator password when prompted? Run a
> single command from command line and see if it works. Running runas
> from command line works fine, e.g.
>
> C:\> runas /user:<domain>\administrator "lsnrctl start"
> Enter password for <domain>\administrator:
>
> Regards
> /Rauf Sarwar
Yeah, I know that works, my problem is slightly different.
If you put commands like LSNCRTL in a batch command file (.bat, .cmd), even
if you "runas /user:Administrator" the script, they don't work, presumably
because they do not inherit administrator rights from the calling
environment or some other unknown reason.
If you run them one at a time with RUNAS they work, but inside a batch
program they don't.
The most acceptable solution I found so far is to open a command prompt with
Administrator rights, then you can run any command you like from there and
you have to type the Administrator password only once.
However, in this fashion, you cannot just point and click, you must supply
the batch program name every time.
I just wanted to create some small scripts that prompted the user for the
administrator password, no matter what your current account is and put them
on the desktop or some other folder, ready to be launched.
I have an Oracle multi-home environment and having different scripts to
start up or shutdown a certain db instance and or listener and or related
service is very handy.
Not a big deal probably, but still I can't find a way around it.
Thanks,
Flavio
Received on Thu Feb 13 2003 - 02:35:50 CST
![]() |
![]() |