Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • To see mem usage and CPU usage system wide. Linux/Unix
  • How to see which patches are applied. Oracle
  • Oracle Statspack survival Guide Oracle
  • Roles and Stored Procs II Oracle
  • tracksqltime.sql Oracle
  • create database link syntax Oracle
  • chk_space_SID.ksh Linux/Unix
  • temp_use.sql diplays usage of temp ts Oracle
  • find_encr_wallet.sql Uncategorized
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • Add new columns in dataframe Python/PySpark
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • logminer and my_lbu Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • Temporary Tablespace Information and restriction. Oracle

Looping for remote servers and find its database from oratab file.

Posted on 05-Oct-2006 By Admin No Comments on Looping for remote servers and find its database from oratab file.

if you wish for your Unix Oracle user to be able to connect to the remote server named prodwest, then the prodwest server must contain an .rhosts file in its Oracle user’s home directory. This file must contain an entry allowing the remote Oracle user to connect. Your system administrator can help you configure your .rhosts file.

# Loop through each host name . . .

for host in `cat ~oracle/.rhosts|

cut -d”.” -f1|awk ‘{print $1}’|sort -u`

do

echo ” ”

echo “************************”

echo “$host”

echo “************************”

# Loop through each database name

# /etc/oratab (AIX & HP-UX) or

# /var/opt/oracle/oratab in Solaris.

for db in `rsh $host

“cat /etc/oratab|egrep ‘:N|:Y’|

grep -v *|cut -f1 -d’:'”`

do

# Get the ORACLE_HOME for each database.

home=`rsh $host “cat /etc/oratab|

egrep ‘:N|:Y’|grep -v *|grep ${db}|

cut -f2 -d’:'”`

echo ” ”

echo “database is $db”

done

done

Linux/Unix, shell

Post navigation

Previous Post: Validating ORACLE_SID againt oratab file.
Next Post: find_du.ksh to find # of files, their sizes in current folder and its subdolder

Related Posts

  • grep multuple patterns Linux/Unix
  • Small sample shell program Linux/Unix
  • find the files that are 1 day old. Linux/Unix
  • Search and replace editor command in vi Linux/Unix
  • find checksum of a file. Linux/Unix
  • prepfiles.sh for step by step generating pending statistics files Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • USER_TABLES.Freelists Oracle
  • Identical Dblink Issue… Oracle
  • ipcs -l Linux/Unix
  • Linux CPU info. Linux/Unix
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • pvm_pre_change.sql Oracle
  • cache buffer chain latch Oracle
  • backspace in SQL Plus not working then..? Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme