The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
server monitor script... zedex Shell Programming and Scripting 1 06-01-2008 01:10 PM
arrays in shell script melanie_pfefer Shell Programming and Scripting 3 05-18-2007 05:36 AM
need script for activate and deactivated databases in server krishna176 Shell Programming and Scripting 3 11-08-2006 05:08 AM
ksh script - arrays sidamin810 Shell Programming and Scripting 13 07-18-2005 12:07 AM
CGI passing arrays/hashes to another CGI script WIntellect Shell Programming and Scripting 2 01-13-2003 08:22 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-05-2005
Registered User
 

Join Date: Sep 2005
Posts: 2
Script to Monitor databases help with arrays

Hi

I am new to the unix scripting world and really could do with some help.

I have written a basic unix script to do some monitoring of a oracle database.

I would like it to monitor about 10 different database. What i would like to do is list the database connection (with username, password, database sid, etc)

Below is what i have right now.

#!/bin/ksh
TEMP=temp.sql
TEMP1=temp01.sql
OUTPUT=/home/oracle/tony/space/report/space_report_$$
OUTPUT1=/home/oracle/tony/space/report/block_report

################################################## ##
# Space Report
################################################## ##
SPACE_REPORT () {
sqlplus -s ${list[0]}/${list[1]}@${list[2]} <<EOF > /home/oracle/tony/space/test_space.log.$$
@space_report_real.sql ${TEMP} ${OUTPUT} ${list[3]}
/
exit
EOF
}

set -A list username password GASD2.world 60

SPACE_REPORT
#########################################

If i want to add more databases to the list ie something like this

set -A list username password GASD4.world 60
set -A list username password GASD5.world 80
set -A list username password GASD6.world 65

how can i loop around to produce a report for each database

Thanks

Tony
Forum Sponsor
  #2  
Old 09-05-2005
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,249
Duplicate-post
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0