Sponsored Content
Top Forums Shell Programming and Scripting Need help in getting the oracle instance name which is offline in 10g through shell scripting Post 302597397 by cero on Friday 10th of February 2012 07:12:09 AM
Old 02-10-2012
So what keeps you from combining the 2 methods you trust partly?
The result could look like this:
Code:
OIFS=$IFS
IFS=:
while read O_SID DUMMY
do
   if ps -ef |grep pmon |grep -v grep >/dev/null
   then
      echo $O_SID is up
   else
      echo $O_SID is down
   fi
done </etc/oratab
IFS=$OIFS

 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

oracle 10g

I have download Oracle 10g for Solaris and I have configurate environment than I will start runInstaller and I have a messege that my version of solaris is not 5.7 , 5.8 and 5,9 I have 5.10 Solaris version what I shoud do I have download most actuall Oracle databases. (4 Replies)
Discussion started by: Deux
4 Replies

2. Shell Programming and Scripting

Shell Scripting with Oracle...

Hi guys, I have searched all the forums and searched the net as much as possible, but I carn't find any tutorials about shell scripting with Oracle. Has anyone come across any? Thanks for reading and in advance of posts, B14... (2 Replies)
Discussion started by: B14speedfreak
2 Replies

3. Red Hat

Help installing Oracle 9i/10g on RedHat?

If anybody can help would be greatly appreciated... I get the same error with Oracle 9i & 10g when installing on Red Hat Fedora 4, it's java related... Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/lib/i386/libawt.so: connat restore segment... (0 Replies)
Discussion started by: Joncamp
0 Replies

4. AIX

oracle 10g on AIX 5

hi can anyone help me by telling step by stem oracle10g installation in AIX 5 . Munir mondolsoft Bangladesh (3 Replies)
Discussion started by: dbamunir
3 Replies

5. Shell Programming and Scripting

Need help in writing a shell Script to connect to oracle instance

Please help me in writing a shell script which connects to a Oracle instance and tables to get the required information...:wall: (1 Reply)
Discussion started by: Dpu
1 Replies

6. AIX

Oracle 10g on AIX7

Hi, anyone know if Oracle Database 10g is AIX 7 certified??? thanks in advance. Regards. Mario (2 Replies)
Discussion started by: Zio Bill
2 Replies

7. AIX

HACMP 5.4.1->5.5 offline upgrade - different instance numbers ?

Hello, I did offline HACMP(PowerHA) upgrade 5.4.1 to 5.5 - basically stopped HACMP services and upgraded cluster.* filesets. Tried to start services again - topsvcs refused to start on second node complaining that node instance numbers are different - and indeed they are different. This is... (2 Replies)
Discussion started by: vilius
2 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 02:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy