![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tech Article: Guide to Oracle Data Guard Fast-Start Failover | iBot | Oracle Updates (RSS) | 0 | 05-27-2009 05:00 PM |
| Oracle Cluster Ready Services waiting for SunCluster on x86 to start | amitranjansahu | UNIX and Linux Applications | 0 | 05-19-2009 01:49 AM |
| Tech Article: Guide to Oracle Data Guard Fast-Start Failover | iBot | Oracle Updates (RSS) | 0 | 03-23-2009 03:45 PM |
| How to start Oracle database automatically | greg0320 | SUN Solaris | 3 | 03-30-2005 05:46 PM |
| Start application after Oracle has started | Piet | UNIX for Advanced & Expert Users | 3 | 08-13-2003 12:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
lsnrctl start script for Oracle on Solaris
Hi,
os version :sun solaris 5.9 I have a problem with one of production server where listener will die frequently, I have raised SR with oracle for the same, but mean time i need simple script and i need schedule in cron for every 5 min if listner will down it will start automatically. this is the script but i am getting error appreciated for inputs. Code:
lsnrctl status > /oracle/test.txt aaa=`grep "The command completed successfully" /oracle/test.txt` bbb="The command completed successfully" ccc="TNS:no listener" if ["$aaa" = "$bbb"]; then exit else if ["$aaa" = "$ccc"]; then lsnrctl start fi fi exit listener.sh: test: ] missing Thanks Prakash Last edited by fpmurphy; 06-13-2009 at 10:17 AM.. Reason: Fix spelling in title |
|
||||
|
Hi,
Code:
bash-2.05$ cat listener.sh lsnrctl status > /oracle/test.txt aaa=`grep "The command completed successfully" /oracle/test.txt` bbb="The command completed successfully" ccc="TNS:no listener" if [ "$aaa" = "$bbb" ]; then exit else if [ "$aaa" = "$ccc" ]; then exec >/dev/null 2>&1 lsnrctl status || lsnrctl start fi fi exit Thanks Prakash |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|