Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • move_arch_files.ksh Linux/Unix
  • create PLAN_TABLE command. Oracle
  • Search and replace editor command in vi Linux/Unix
  • Caching sequence in Memory Oracle
  • find the files that are 1 day old. Linux/Unix
  • login.sql Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Rman Notes -1 Oracle
  • chk_space_SID.ksh Linux/Unix
  • PLSQL Table Syntax 1 Oracle
  • Wait.sql Oracle
  • Search and replace pattern Linux/Unix
  • Find Stale DR Physical Standby Oracle
  • Transfer SQL Profiles from One database to other database. Oracle
  • tuning commmand for cpu, ip and memory stats Linux/Unix

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

  • CPU speed on solaris Linux/Unix
  • CPU Core related projections AWS
  • More info about /proc folder and its relation with processes. Linux/Unix
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • tar and untar a dolder with all its subfolder. Linux/Unix
  • move_arch_files.ksh Linux/Unix

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Oracle Internal Good Websites 1 Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • Guide to Linux System Command Mastery Linux/Unix
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress
  • Some OS level threshold for performance. Linux/Unix
  • Facts about SCN and Rollback Segment Oracle
  • 10g oem configuration Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme