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

Oracle Software
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle


Privacy Policy




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.


echo 'starting distribution of tnanames.ora'

# Note: dbnames file is in the form HOST DATABASE
for host in `cat dbnames|awk '{ print $2 }'`
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

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:

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