Oracle 9i monitoring scripts in HACMP 5.4
Hi,
I have installed Oracle 9.2.0.8 on AIX 5.3 (HACMP 5.4) in active passive cluster.
I have made startup and shutdown scripts for Oracle.
Can anyone please guide me or point me to some link for the monitoring scripts for Oracle in HACMP so that failover can happen automaticaly.
Regards,
Amit E
Have you tried changing the /etc/redhat-release file? Change the "release 5" to "release 4" and see what happens. Make sure you change it back after the install.
Tom
Similar Messages
-
Oracle 9i database monitoring scripts
Hi Friends,
I am asked by my boss to submit weekly reports about the database status.
She wanted something in excel format.
Can you suggest me what reports do I submit?
I found the following monitoring scripts from google:
Are these scripts still relevant ,or applicable, or obsolete?
PURPOSE
This article contains a few ready-made queries on V$SQLAREA
for identifying the top 10 most resource-consuming SQL statements
with a variety of criteria.
The thresholds used are the same as used by default in Statspack:
Buffer Gets : 10,000
Physical Reads : 1,000
Executions : 100
Parse Calls : 1,000
Sharable Memory : 1,048576
Version Count : 20
Top 10 by Buffer Gets:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
buffer_gets, executions, buffer_gets/executions "Gets/Exec",
hash_value,address
FROM V$SQLAREA
WHERE buffer_gets > 10000
ORDER BY buffer_gets DESC)
WHERE rownum <= 10
Rem Top 10 by Physical Reads:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
disk_reads, executions, disk_reads/executions "Reads/Exec",
hash_value,address
FROM V$SQLAREA
WHERE disk_reads > 1000
ORDER BY disk_reads DESC)
WHERE rownum <= 10
Rem Top 10 by Executions:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
executions, rows_processed, rows_processed/executions "Rows/Exec",
hash_value,address
FROM V$SQLAREA
WHERE executions > 100
ORDER BY executions DESC)
WHERE rownum <= 10
Rem Top 10 by Parse Calls:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
parse_calls, executions, hash_value,address
FROM V$SQLAREA
WHERE parse_calls > 1000
ORDER BY parse_calls DESC)
WHERE rownum <= 10
Top 10 by Sharable Memory:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
sharable_mem, executions, hash_value,address
FROM V$SQLAREA
WHERE sharable_mem > 1048576
ORDER BY sharable_mem DESC)
WHERE rownum <= 10
Top 10 by Version Count:
set linesize 100
set pagesize 100
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
version_count, executions, hash_value,address
FROM V$SQLAREA
WHERE version_count > 20
ORDER BY version_count DESC)
WHERE rownum <= 10
;I just feel the above reports not really meaningful :(
Can you give me some other scripts that u have?
Thanks a lot,
MsKThanks all :-*
@sybrand
Oracle 9i comes with Oracle Enterprise Manager. This includes a reporting website with monitoring scripts.
Why write them yourself?My boss want a cumulative report over time, for example : what happened @ 1am,2am,3am on tuesday last week, why is the server so slow that the batch job did not complete as expected? Why was an error occured about a table that can not extend? Ora 1635. I mean you can see in the report that at this certain hour a certain tablespace was full.
oops maybe tablespace sample is not logical :D
say every day I can have excel reports of tablespace space status like:
tablespace_name used free date
TS_DATA 1000K 5000k 1-Oct-2010
TS_DATA 2000K 4000k 2-Oct-2010
TS_DATA 3000K 3000k 3-Oct-2010
TS_DATA 4000K 2000k 4-Oct-2010
TS_DATA 5000K 1000k 5-Oct-2010
TS_DATA 5000K 0k 6-Oct-2010Does Statspack can hold historical data for analysis? say for the last 24 hrs?
Thanks a lot -
I created a monitoring script which would run from crontab....Would anyone tell me how I would export Oracle SID in crontab script instead of hard coded it. Thanks.
I do some simple checks for correct number of arguments using "if [[ $# -lt 1 ]]; then..."
This is very simple and doesn't confirm that the arguments are valid.
Example:
if [[ $# -lt 1 ]]; then
print "\n ERROR: You did not specify an Oracle SID."
print "\n Please enter which Oracle SID to import into. \n"
exit 1
else
echo "\n ORACLE_SID = $1 \n"
echo "Do you wish to continue? \n "
read REPLY
case $REPLY in
y|Y) echo "\n test good \n";;
n|N) echo "\n exiting... \n"; return 1;;
echo "Invalid response (Bozo). Exiting..."
echo ""
return 2;
esac
fiBut my point was to show a quick and easy solution to the OP for his purposes.
Using "echo $1 |. oraenv" passes the variable to oraenv and sets everything he needs for his purposes.
From the sounds of the OP's question, it didn't seem to have the skills to develop more complex scripts.
Personally, I like to use a special file that I keep updated on all servers.
I call the file 'localsids' and place it in the /var/opt/oracle directory.
I have a similar file called 'allsids', which contains a list of all sids on all servers for when I want to check all databases (e.g., such as for users having DBA role, or something like that).
Then, I check for validity (and can add and remove SIDs from the file at will, (depending on purposes such as blackouts).
I like using a loop for this purpose (SIDFILE='var/opt/oracle/localsids' cat $SIDFILE |while read SID... do....)
Example:
# ==================================================
# check input given against valid sids on this machine
# ==================================================
export SIDFILE='/var/opt/oracle/localsids'
SID=`grep $1 $SIDFILE`
if [ "$SID" = "$1" ]; then
print "\n \"$SID\" verified... \n"
else
print "\n ERROR... \"$1\" is not a valid SID for this machine. \n"
exit 1
fiI have a couple other variations as well.
I think it would be nice if OTN had a more appropriate forum for people like us who like scripting and/or what to share unix skills. -
Tablespace growth monitoring script
Hi,
I am done with tablespace growth monitoring script.
But I doesnot know how to configure it in WINDOWS to send alert MAIL.
Is there any utility for mail configuration in windows.
Please suggest any solution ASAP.
Regards,
ThiruIt is called OEM alerts. I think we can have configuration in oracle eneterprise manager grid control for automated warnings for tablespace growth. You just have to read below link :
http://download.oracle.com/docs/cd/B19306_01/server.102/b25159/monitor.htm#i1007180
Something near to :
Enterprise Manager Configuration--Management Services and Repository--Agent
Regards
Girish Sharma -
Database uptime monitoring by either snmp or active monitor script anyone?
Hi,
Has anyone previously setup any type of active monitoring script through whats up gold or an snmp informant type of monitoring script to advise when a database is down or specific process is down?
An example would be like ORACLE_PKG1, and the process is named ora_smon_hrprd88.
This is what the HP-UX “ps” shows:
tpadb01:/# ps -ef | grep -i ora_smon
oracle 13207 1 0 Jan 1 ? 0:29 ora_smon_epprd88
oracle 13281 1 0 Jan 1 ? 1:31 ora_smon_hrprd88
oracle 13635 1 0 Jan 1 ? 1:03 ora_smon_fsprd84
oracle 3620 1 0 Jan 2 ? 0:18 ora_smon_mtprd04
oracle 14586 1 0 Jan 1 ? 0:23 ora_smon_mtprd05
oracle 15223 1 0 Jan 1 ? 0:26 ora_smon_inprd88
oracle 15879 1 0 Jan 1 ? 0:25 ora_smon_epsal88
oracle 16769 1 0 Jan 1 ? 0:52 ora_smon_hrsal88
root 17976 22609 0 10:46:39 ttyp2 0:00 grep -i ora_smon
tpadb01:/#
Not sure if the extra info helps, but you never know. We can set it up to send us database up alerts, but the problem I have is when the listener service is down I can't get my script to finish no matter how I change the values of my script around. I can provide my script if that would help as well. If someone has already done this and is willing to share great!
HarveyI would suggest you install OEM Grid Control to monitor your databases. For basic monitoring function it's free. OEM GC works great, it's a little overweight though. It's also use SNMP.
Or you can choose any third party tool like
Monitoring Oracle Enterprise with Cricket
http://www.mikehan.com/cricket/oracle.html
or some commercial one like Quest Software. -
Data Guard Gap Monitoring script
Hello,
Can anyone please provide me data guard gap monitoring script for databases(primary,standby) on RAC.
Oracle RDBMS 11.2.0.2(4-node RAC) on RHEL 5.6.
Thanks
Edited by: 951368 on Dec 26, 2012 9:21 AM951368 wrote:
Hello,
Can anyone please provide me data guard gap monitoring script for databases(primary,standby) on RAC.
Oracle RDBMS 11.2.0.2(4-node RAC) on RHEL 5.6.
Thanks
Edited by: 951368 on Dec 26, 2012 9:21 AMUse the script of MSeberg, Modify v$instance as gv$instance for RAC -
Monitoring scripts - Crontab - how to ?
HI Gurus,
I`m very interesting how can I execute monitoring scripts in Oracle ?
Let say that I would like to have a script which will monitor Sessions and Queries every few minutes. Does Oracle have any internal crontab ?
In OS crontab script should include system user password to be executed, how to do it without password ? Is there any good way ?Dlugasx wrote:
HI Gurus,
I`m very interesting how can I execute monitoring scripts in Oracle ?
Let say that I would like to have a script which will monitor Sessions and Queries every few minutes. Does Oracle have any internal crontab ?
In OS crontab script should include system user password to be executed, how to do it without password ? Is there any good way ?You can go for DBMS_SCHEDULER package, this is oracle internal job scheduler.
refer this link
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sched.htm -
We've been getting the following error for some time now.
An error occurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script'
Source: Microsoft VBScript runtime error
Description: The remote server machine does not exist or is unavailable: 'GetObject'
One or more workflows were affected by this.
Workflow name: System.Mom.BackwardCompatibility.ServiceStateMonitoring
Instance name: server.domain.local
Instance ID: {INSTANCE}
Management group: GROUP
Unfortunately the instance in question has since been decommissioned and simply does not exist any more.
We're currently on a repeat count of over 350,000 and I would REALLY like to get it stopped. I've had a look at adding an override but that points to the management server rather than the instance itself.
Does anyone have any suggestions?
thanks in advance!Hi Steven,
There are for option for us to override a monitor ot rule:
For all objects of class:
Class
When you select this option for your override, the override settings apply to all objects in the class at which the rule or monitor is targeted.
For a group
When you select this option for your override, the override settings apply only to members of the group. The rule or monitor without the override settings continues to apply to all objects in the targeted class except for those objects that are also members
of the group used for the override.
When you create a group, you save it to an unsealed management pack. However, an element in an unsealed management pack, such as an override, cannot reference an element in a different unsealed management pack, such as a group. If you are going to use a group
to limit the application of an override, you must either save the group to the same unsealed management pack as the override, or you must seal the management pack that contains the group.
For a specific object of class:
Class
When you select this option for your override, the override settings apply only to the specified object. The rule or monitor without the override settings continues to apply to all other objects in the targeted class.
For all objects of another class
When you select this option for your override, the override settings apply only to objects of a class other than the targeted class. The rule or monitor without the override settings continues to apply to all objects in the targeted class.
Did you try to override it for a specific object of class?
Regards,
Yan Li
Regards, Yan Li -
@Hi, How do we encrypt APPS password usage in Oracle Application Host script and still let it be used in encrypted format (eg.$1, $FCP_LOGIN should not show plain text password).
Appreciate the process along with any Profile available to place this control.
Concurrent Program Setup Option SECURE/ENCRYPT controls $1, $FCP_LOGIN respectively, but Developer still has access to view/log the APPS Password.
Can we have a System profile or an Apps DBA level Setup to encrypt and use the APPS/Password.
Thanks in Advance
LakshmiAre you linking the host script to fndcpesr? E.g.:
Host script defined with prog extension:
XXSCRIPT.prog
Move it to relevant dir:
$XX_TOP/bin
Create a soft link to fndcpesr
ln -s $FND_TOP/bin/fndcpesr XXSCRIPT -
I've seen plenty of references to Oracle Workflow Monitor, but I've never paid much attention. Yesterday I got an error message from Control Center that instructed me to use Oracle Workflow Monitor to solve my problem (a process was running and needed to be shut down before regenerating).
But how to I use Oracle Workflow Monitor? Is it installed by default when OWF was initially installed with OWB? What URL do I use access it? If it does not run after the conventional OWB install, is there a How-To document available for configuring it?
To be clear, OWF seems to be set up and working. I have created and run process flows successfully. I've just experienced a weird problem that Control Center cannot seem to handle -- and I'm looking for answers. Frankly, I'm mystified at the lack of information on Oracle Workflow Monitor given that OWB error messages reference it and plenty of people seem to discuss it in technical forums.
Thanks,
DavidThanks Robert!
We are using OWB 11 on Oracle 11, but I'm going to press on and ask our DBA to install the OWF mid-tier components from the 10g Companioin CD. I don't think workflow has changed and so I'm hopeful.
(If anybody has experience, please chime in for the record.)
Thanks again!
-David -
Monitoring scripts for AlwaysOn Availability Group
Does anyone have any any monitoring scripts for AlwaysOn AG using Transact SQL or stored procedures? I'm not a strong coder and don't know Powershell at all. But if there are some Powershell scripts we may be able to use them. I've
seen the dashboard but that's only good if you're logged onto it.
I'm looking for things like monitoring when a database is suspended, send an alert to us but also tries to do the resume.
Thanks for any info.Start with this list
http://technet.microsoft.com/en-us/library/ff877954.aspx
Automating the issue resolution has to conform to your operational standards. For example, if you use a file share witness for your quorum configuration and your monitoring tells you that it is offline, do you automate bringing it online or do you escalate
to your infrastructure team so that they can look into it? If the database is suspended or the Availability Group in offline state, do you just bring it online or do you check other dependencies like the quorum configuration and instead perform a forced quorum?
I'm a big fan of automation but make sure you define your process first so that you don't cause more issues as a result.
Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
Blog |
Twitter | LinkedIn
SQL Server High Availability and Disaster Recover Deep Dive Course -
Can i run or test oracle pl sql scripts online?
Hi Everyone
Is there any means to test and run oracle pl sql scripts online thru any website?
Thanksms wrote:
Hi Everyone
Is there any means to test and run oracle pl sql scripts online thru any website?
ThanksWhy do you expect another site to have your tables & data?
How do I ask a question on the forums?
SQL and PL/SQL FAQ -
Oracle - CCMS Monitor Templates
Hi,
In RZ20, The Oracle (Tablespaces) monitor templates are not available under Database.
And the MTE class CCMS_DB_mcmtc is not there in the list.
How to Maintain the data for this MTE class. Is it possible to create new MTE class.?
Please Advice.
Thanks in Advance
Arun
Edited by: ARUN PARAMASIVAM on Feb 2, 2010 12:14 PMHi Anil,
Thanks for your quick response.
Oracle Database Alert should be there by default under Database Alert Monitor right. But i am not able to find the Oracle Monitor Set Itself.
I tried by running the program "RSDBMON0" in SE38. That also doen't help.
Please advise on how to get the Oracle monitor set under Database.
Thanks
Arun -
ORAMON: Oracle Database Monitoring tool in PHP
ORAMON is a free Oracle database monitoring tool written in PHP. It can help you in managing critical database administration task easily. It also offers SQL Editor where you can write your own customize queries.
What you can monitor from Oramon?
* Database/Listener status
* Notification on database status
* Hit ratios
* User information
* Rollback segments
* Tablespaces
and more..
Please visit oramon website http://www.oramon.org for more detail.
For download go to http://www.oramon.org/download.phpCan you please list this project in open source project list?
-
Segmentation fault calling an oracle db status script
HI,
I have a problem on a OEL 5 cluster with an Oracle 10.2.0.3 in active/passive environment (not RAC).
When the Oracle Cluster service script checks the status of the service sometimes I have segmentation fault error.
The script is:
#!/bin/sh
# Cluster service script to start, stop, and check status of oracle
set -xv
case $1 in
start)
su - oracle -c /home/oracle/startdb.sh
RetVal=$?
stop)
su - oracle -c /home/oracle/stopdb.sh
RetVal=$?
status)
su - oracle -c /home/oracle/statusdb.sh
RetVal=$?
esac
set +xv
exit $RetVal
The error log of the executing the "status" part of the script is:
+ case $1 in
+ su - oracle -c /home/oracle/statusdb.sh
/usr/local/sbin/oraclust.sh: line 16: 6779 Segmentation fault su - oracle -c /home/oracle/statusdb.sh
+ RetVal=139
This script is executed every 30 seconds but I have the error once every 10 hours.
What could it be?
Many thanks.hi,
here is the script /home/oracle/statusdb.sh:
#!/bin/sh
# Script to CHECK the Oracle Database Server Status.
ORACLE_RELEASE=10.2.0
export ORACLE_SID=mysid
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/${ORACLE_RELEASE}/db_1
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:$LD_LIBRARY_PATH
export PATH=$PATH:${ORACLE_HOME}/bin
${ORACLE_HOME}/bin/sqlplus / as sysdba << EOF
whenever sqlerror exit sql.sqlcode;
whenever oserror exit failure;
set pagesize 0;
set feedback off;
set wrap off;
set heading off;
UPDATE clustmon.clst_chk_tbl SET status = 'ok';
commit;
quit;
EOF
exit $?
thanks.
Maybe you are looking for
-
BI Infoset left outer join (NW04s)
I created an Infoset using a left outer join for infoproviders: - 0FIGL_O10 (GL transaction figures - DSO ) - 0CCA_C03 (CCA Statistical key figures - CUBE) DSO 0FIGL_O10 is the left table with joins on: - 0COSTCENTER - 0FISCPER The data set returned
-
How do I "Select All" email messages at once for deletion rather than touching each one?
I receive many emails each day and many of them I would like to delete all at once. But the only way so far I have been able to figure out how to do that is to manually select each and every one of the emails I want to delete then hit delete. That i
-
Can I install a SSD in a ENVY 14t-1100
I am looking to replace the HDD that I have installed in my ENVY 14t-1100. Can I replace the drive with a SSD? The laptop is roughly 3 years old. I would like to replace it with at least a 500 gb SSD. thanks for the replies. This question was solve
-
Get the items in a content area!!
Hello I have created a content area with a structured like that: MainFolder1 Item1 SubFolder1 Item2 Item3 Item4 SubFolder2 Item5 SubFolder3 Item6 I have to display the names of the items content on this CA on a page, and I need to do It in the same w
-
Person Responsible for Activities
Hello Expert, According to my client requirement we are using only networks and not WBS elements. It is possible to define Person Responsible for WBS but How to define Person Responsible for the activities? Thanks Kushal