Run a script without password !
I want to run a oracle rman script using another user (Like user "common") . Now I need to add a line
"su - oracle" in above the script . Since , the script dont run as root user so when I run the script , then during execution of "su - oracle" command , It prompt for password .But I dont want to specify the oracle user's password .
The script will be like following :
code :
su - oracle // "here I dont mention password"
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=support
$ORACLE_HOME/bin/rman target sys/sys123 << !
run
{
allocate channel t1 device type disk format '/dbfs/rmanback/ababil_%s_%T';
sql "alter system switch logfile";
backup incremental level 0 database;
backup archivelog all delete all input;
Would anybody plz help me regarding this issue ?
Last edited by shipon_97; 12-29-2009 at 05:05 AM.
|