Re: connect userid/password script

From: Robin Aylesworth <raylesworth_at_metasolv.com>
Date: 1996/09/09
Message-ID: <01bb9e7a$08be2b60$1202010a_at_RAYLESWORTH.metasolv.com>#1/1


What I do is have a cron call a script which in turn calls export with the parfile option. My unix script is set up so that it will backup multiple databases without human intervention. The parfile is where the actual password information is stored and will not show up in your unix process list.

My unix script follows:

#!/bin/sh
# Perform a full export of oracle databases
# filename: exp_daily.sh

umask 077

ORACLE_BASE="/u/oracle"
ORACLE_HOME="/u/oracle"
ORACLE_BACKUP_BASE=/u3/oracle_backup/

export ORACLE_BASE ORACLE_HOME ORACLE_BACKUP_BASE

database_list="metatest metadev training"

for database in $database_list

	do
	 ORACLE_SID=$database
	 ORACLE_BACKUP_FILE=$ORACLE_BACKUP_BASE$database.exp
	 ORACLE_BACKUP_FILE_OLD=$ORACLE_BACKUP_FILE.old
	 export ORACLE_SID ORACLE_BACKUP_FILE ORACLE_BACKUP_FILE_OLD

	 echo $ORACLE_SID
	 if [ -f $ORACLE_BACKUP_FILE ]; then
	    mv $ORACLE_BACKUP_FILE $ORACLE_BACKUP_FILE_OLD
	 fi
	
	 $ORACLE_HOME/bin/exp PARFILE=$ORACLE_BASE/backup/$ORACLE_SID.par

done



the above script calls export with the parfile option. My sample parfile follows:

userid=system/manager_at_t:10.1.1.6:metadev buffer=1000000
file=/u3/oracle_backup/metadev.exp
compress=y
grants=y
indexes=y
rows=y
full=y
constraints=y
consistent=y
log=/u/oracle/metadev_exp.log


Hope this is useful!

Robin Aylesworth

jpjones_at_ wrote in article <957cc$111233.2d8_at_limper.gsa.gov>...
> I know I've seen the answer to this before on this list but is there
> an archive list or faq of previous threads?
>
> Question:
> We have a script that kicks off an export that is fed a userid/password
> combination. Executing a ps -ef on our Unix system shows the actual
> userid/password combination the export process is using.
>
> How can we prevent the password from showing up along with the system
> process information?
>
> Any ideas appreciated!
>
> Pat
>
>
Received on Mon Sep 09 1996 - 00:00:00 CEST

Original text of this message