|
 |
|
ss
Oracle Tips by Burleson |
Managing the UNIX
environment for the oracle user
The Oracle DBA will commonly perform all of their UNIX work when
signed-on to the UNIX server as the oracle user. In large UNIX
environments with hundreds of Oracle servers and dozens of Oracle
DBA’s, it is critical that all UNIX servers have a common
look-and-feel. This is done by creating the following constructs.
* Standard UNIX prompt for the Oracle user
* Standard command editor
* Standard alias for moving between Oracle directories
* Standard alias name for each $ORACLE_SID
Let’s take a look at commands that can be placed into the UNIX
.profile script for the oracle user. Most large UNIX shops create a
standard .profile scripts for all servers and use the UNIX rcp
command to distribute the .profile to every Oracle server.
Here is an example of a UNIX script to distribute a standard
.profile to every Oracle server.
distr_profile.ksh
#!/bin/ksh
echo 'starting distribution of .profile file'
#*******************************************************************
# We reply on the UNIX /etc/hosts file for a list of Oracle servers
#*******************************************************************
for host in `cat /etc/hosts|awk '{
print $2 }'`
do
echo starting distribution to $host
rcp -p .profile $host:~oracle/.profile
rsh $host ls –al ~oracle/.profile
done
In this script we look up each Oracle server name from the
/etc/hosts files. Then we loop between each server, using the remote
copy command (rsh) to copy our standard .profile file to every
server. We verify that the copy was successful by using the UNIX rsh
command to verify the UNIX time and file size for the .profile file.
Note that you may need to get your UNIX systems administrator to
configure the .rhosts files to allow the rsh and rcp commands to
work properly.
Download your Oracle scripts now:
www.oracle-script.com
The
definitive Oracle Script collection for every Oracle professional DBA
|
|