Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sys as sysdba within a script?
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
-- Connor McDonald Co-author: "Mastering Oracle PL/SQL - Practical Solutions" ISBN: 1590592174 web: http://www.oracledba.co.uk web: http://www.oaktable.net email: connor_mcdonald_at_yahoo.com Coming Soon! "Oracle Insight - Tales of the OakTable" "GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day" ------------------------------------------------------------Received on Wed Dec 22 2004 - 07:05:04 CST