Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to check current redo log progress redo_progress.sql Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • S3 Basic info AWS
  • How To Limit The Access To The Database So That Only One User Per Schema Are Connected (One Concurrent User Per Schema) Oracle
  • DBMS_SQL for alter session. Oracle
  • OPENING A STANDBY DATABASE IN READ-ONLY MODE Oracle
  • SQL Server: How to see current transactions or requests SQL Server
  • send email from unix mailx with attachment. Linux/Unix
  • Nice notes on wait events Oracle
  • Oracle Connections expire_time and firewall Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • Jai Shree Ram Oracle
  • My Minimum Tuning Programs Oracle
  • metalink all dynamic view reference notes. 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

  • runsql_once.ksh Linux/Unix
  • move_arch_files.ksh Linux/Unix
  • replace alphabets using sed Linux/Unix
  • Implementation of key based authentications Linux/Unix
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • cold backup scripts to copy locally 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)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle
  • oradebug ipcrm ipcs Oracle
  • Rman Notes -1 Oracle
  • shr1.sql for MTS or Shared server configuration Oracle
  • shutdown linux Linux/Unix
  • DBMS_SQL for alter session. Oracle
  • tuning commmand for cpu, ip and memory stats Linux/Unix
  • Recovering lost SYS password Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme