Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Multiple listeners Oracle
  • Jai Shree Ram Linux/Unix
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Oracle Metalink useful notes Oracle
  • All About Trace Fils Oracle
  • Identical Dblink Issue… Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • How to analyze statspack or AWR report. Oracle
  • How to remove blank lines using vi editor command Linux/Unix
  • Another Tuning Article for subheap of shared pool Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • To see only files and/or folders using LS command 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

  • fuser to check who is using diretory Linux/Unix
  • oracle_env_10g_CADEV Linux/Unix
  • Search and replace pattern Linux/Unix
  • Unix split command to split files Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • Changing default shell Linux/Unix

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 (395)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • check_copy_progress.sh Linux/Unix
  • copying/removing directory with all its subdirectory Linux/Unix
  • create PLAN_TABLE command. Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle
  • Is It Recommended To Apply Patch Bundles When PSU Is Available? -ID 743554.1 Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • CPU speed on solaris Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme