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

Home -> Community -> Usenet -> c.d.o.server -> Re: sys as sysdba within a script?

Re: sys as sysdba within a script?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 22 Dec 2004 06:02:25 -0800
Message-ID: <1103724145.752984.42150@c13g2000cwb.googlegroups.com>

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

Original text of this message

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