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: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Wed, 22 Dec 2004 21:05:04 +0800
Message-ID: <41C97100.80C@yahoo.com>


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

Original text of this message

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