Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

 
 

ss

Oracle Tips by Burleson 

Copy tnsnames.ora to all UNIX Servers

This is a super useful UNIX command snippet to distribute common files to all servers. As we have noted, this script requires the .rhosts setup to allow the UNIX rcp and rsh commands.

#!/bin/ksh

echo 'starting distribution of tnanames.ora'

# Note: dbnames file is in the form HOST DATABASE
for host in `cat dbnames|awk '{ print $2 }'`
do
db=`cat dbnames|awk '{ print $1 }'`
echo starting distr to $host
rcp -p tnsnames.ora $host:/etc/tnsnames.ora
rsh $host ls –al /etc/tnsnames.ora
done


Note that this script uses a driving file called dbnames that contains a list of hostname and database name pairs. Here is a sample of this file.

dioneges mysid1
dioneges prod9i
dioneges testm1
praetor test9i
praetor testapps
praetor prodapps


The above is an excerpt from the "Oracle9i UNIX Administration Handbook" by Oracle press, authored by Donald K. Burleson.

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

 

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2017 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter