Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Display the top 5 salaries for each department using single SQL Oracle
  • cur_sql.sql Oracle
  • telnet listening Linux/Unix
  • Benefits and Usage of RMAN with Standby Databases Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • Oracle Connections expire_time and firewall Oracle
  • create a folder in multiple places Linux/Unix
  • Create type and Grant on it. Oracle
  • Jai Shree Ram Oracle
  • UNderstand and eliminate Latch contention. Oracle
  • to see when crontab is changed. Linux/Unix
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • DBMS_UTILITY PACKAGE Oracle
  • Wait Based Tuning Step by step with SQL statement 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

  • Removing Blank lines from file using grep Linux/Unix
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix
  • Sending email with file attachment. Linux/Unix
  • restarting network in linux Linux/Unix
  • scripts to take listener.log backup 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 (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • database trigger failing Oracle
  • To see only files and/or folders using LS command Linux/Unix
  • Find_table_size.sql Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • plan10g.sql good Oracle
  • Single character replacement in Unix Linux/Unix
  • Good notes on Oracle Events Oracle
  • cold backup scripts to copy locally Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme