The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com



Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Tech Article: Oracle Enterprise Manager Grid Control Architecture for Very Large Site iBot Oracle Updates (RSS) 0 05-27-2009 05:00 PM
Tech Article: Oracle Enterprise Manager Grid Control Architecture for Very Large Site iBot Oracle Updates (RSS) 0 02-18-2009 02:30 PM
how to do GRID COMPUTING? nsharath High Performance Computing 5 01-31-2009 12:24 PM
How to automate check outs from version control? siegfried UNIX for Dummies Questions & Answers 5 04-12-2008 01:35 AM
GRID containers technology dheram AIX 1 07-25-2005 09:42 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 2 Weeks Ago
beginningDBA beginningDBA is online now
Registered User
  
 

Join Date: May 2009
Posts: 25
Automate restart Grid control

Hi all,

I'm trying to write a batch program to automate restart of grid control.

oraclehomes\db10g\bin\lsnrctl status >> %filename%
oraclehomes\oms10g\bin\emctl status oms >> %filename%
(This is just for testing.)

However, i cannot seem to let both of the line to execute as the batch stopped when line 1 finish executing (without executing line 2).

Any help is appreciated. Thanks.
  #2 (permalink)  
Old 2 Weeks Ago
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
Within the batch script, try preceding each of the two commands with "call " which will cause them to execute in their own batch shell, preventing the first job from exiting the whole batch job. (Not tested with your commands).

To read the help text about "call". From a "cmd" prompt:
Code:
call /?
  #3 (permalink)  
Old 2 Weeks Ago
beginningDBA beginningDBA is online now
Registered User
  
 

Join Date: May 2009
Posts: 25
Thanks man, it works.

Is there anyway i can catch the status of my shutdown process?
e.g. lsnrctl stop will return the status telling it shutdown successfully?
  #4 (permalink)  
Old 2 Weeks Ago
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,163
The "No longer listening on" messages will be in the Oracle listener log. Provided that you start a new log each time you start the Oracle listener, you can extract the messages with a MSDOS "find" command.

Not tried with your commands but you could try testing ERRORLEVEL immediately after executing the command, though I think that each command with the test for ERRORLEVEL would have to be in its own batch file executed from a call statement. We don't want to test the result of "call" itself.
ERRORLEVEL is explained in the help text for "if".

Code:
if /?
You'll have to check Oracle documentation for the ERRORLEVEL values from Oracle commmands.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0