Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sys as sysdba within a script?
Connor McDonald wrote:
> hastenthunder wrote:
> >
> > Hello.
> >
> > I'm trying to run a batch job that requies sysdba privilege.
> > Specifically, I trying to perform a transportable tablespace export
within a
> > script. However, the following command will encounter an error
(caused by
> > "as sysdba" clause)
> >
> > exp sys/password as sysdba transport_tablespace-y tablespaces=tbs1
> > triggers=y file=test.dmp
> >
> > Is there any way to get around that so I don't have to maually
enter the
> > sysdba password every time the script runs?
>
> A nice thing of some unix shells is piping the password so its not
> visible from a ps command, ie
>
> print $PASSWORD | exp userid=uname_at_db ...
>
> hth
> connor
> --
On Windoze you can do the same without exposing the entire connect string as,
echo sys/password as sysdba|exp file=... log=...
and you don't even need any " or ' or escape sequence :->).
Regards
/Rauf
Received on Wed Dec 22 2004 - 08:02:25 CST