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,
Thiru
It 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
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 -
Hi All,
Can any one provide the Script or Sql query to find the Tablespace growth per day and Per one hour?DBA Learner wrote:
Hi All,
Can any one provide the Script or Sql query to find the Tablespace growth per day and Per one hour?Here is the scripts
SQL> set heading on
SQL> set linesize 5500
SQL> SELECT TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY') days
2 , ts.tsname
3 , max(round((tsu.tablespace_size* dt.block_size )/(1024*1024),2) ) cur_size_MB
4 , max(round((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) usedsize_MB
5 FROM DBA_HIST_TBSPC_SPACE_USAGE tsu
6 , DBA_HIST_TABLESPACE_STAT ts
7 , DBA_HIST_SNAPSHOT sp
8 , DBA_TABLESPACES dt
9 WHERE tsu.tablespace_id= ts.ts#
10 AND tsu.snap_id = sp.snap_id
11 AND ts.tsname = dt.tablespace_name
12 AND ts.tsname NOT IN ('SYSAUX','SYSTEM')
13 GROUP BY TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY'), ts.tsname
14 ORDER BY ts.tsname, days;
above scripts give you growth per day.
--neeraj -
Past Tablespace Growth Each month
Hi All,
Is their any script to find past tablespace growth for each month.
Regardsuser13364785 wrote:
Hi All,
Is their any script to find past tablespace growth for each month.
RegardsHow about read the docs:
http://lmgtfy.com/?q=tablespace+growth+query -
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 -
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 EHave 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 -
How to exclude UNDO and temp tablespace using monitoring template
hi,
as per MOS note id 816920.1 undo and temp tablespace is excluded from monitoring starting version 11G onwards.It says that thresholds will need to be explicitly set if undo and temp needs to be monitored
we have grid 12C implemented now with monitoring templates which sets thresholds for all tablespaces. does it apply that thresholds to undo and temp too?? we are receiving alerts for undo and temp tablespaces and we wish to disable them. We have undo tablespaces with different names in many databases as per naming conventions for that line of business.
How can i exclude undo and temp tablespaces from monitoring using grid 12C monitoring templates. is there a way through templates where i can set thresholds of permanent tablespaces only???In EM12c, go to the 'Enterprise' menu, then 'Job', then 'Library'. There should be an out-of-the-box job called "DISABLE TABLESPACE USED (%) ALERTS FOR UNDO AND TEMP TABLESPACES" that you can run against your database targets, and that job will disable database-generated alerts.
If a previous admin has set up EM12c-generated alerts for undo and temp, then yes, a monitoring template will take care of disabling them. Either remove those alerts from the existing monitoring template and apply them to your targets, or create a new monitoring template based on one database's current settings, remove those warning/critical thresholds for your undo and temp tablespaces, and apply it to your targets. -
DBMS_SPACE(9i) for tablespace growth trend..?
Hello,
for 10G, dbms_space.object_growth_trend() can expect table's growth....
for 9i (9.2.0.6 in Sun9) database, is there any friend has experience know how to do for the following purpose:
1. How to expect tablespace growth? say, to accommodate new data for the next 30 days we have to increase tablespace A by X GB, tablespace B by Y GB, … etc
2. How to expect database level growth? say, we need XXX GB more to accommodate new data for the year YYYY
3, Is there any way to Initialize (if possible) Segment Advisor with the information about segment trends we have already collected in 9i
Thank you in advance
JerryHi..
AFAIK in 9i you can't find the Subprograms like object_growth_trend() package in dbms_space.
How to expect tablespace growth? I think that you will have to maintain a sheet of the tablespace usage.Daily you will need to maintain the tablespace size, used and free size of tablespace.Ans after few days of observation you can predict the approximate amount of size being filled up in a day.
You can use the below query to know the used and the free space in the tablespace.
select df.tablespace_name tspace,
df.bytes/(1024*1024) tot_ts_size,
(df.bytes/(1024*1024) -sum(fs.bytes)/(1024*1024)) Used_ts_size,
sum(fs.bytes)/(1024*1024) free_ts_size,
round(sum(fs.bytes)*100/df.bytes) free_pct,
round((df.bytes-sum(fs.bytes))*100/df.bytes) used_pct1
from dba_free_space fs, (select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name ) df
where fs.tablespace_name = df.tablespace_name
group by df.tablespace_name, df.bytes
order by 1
2. How to expect database level growth? Again same, you need to maintain a sheet for it.Use the below query
select sum(bytes/1024/1024/1024) Physical_size_gb from dba_data_files;
select sum(bytes/1024/1024/1024) Actual_size_gb from dba_segments; 3, Is there any way to Initialize (if possible) Segment Advisor with the information about segment trends we have already collected in 9iNo.
HTH
Anand
Edited by: Anand... on Jan 6, 2009 4:17 AM -
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. -
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 -
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 -
Hi,
is there by any chance to veiw my all the tablespace growth for the last 2 months from db02 transaction.
Thanks
Sarat chandra<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="2105685"></a>
Duplicate post
Read and Follow the forum rules -
Tablespace growth from db02 transaction.
Hi,
is there by any chance to veiw my all the tablespace growth for the last 2 months from db02 transaction.
Thanks
Sarat chandraDear Sarat,
You can check out in the following way:
DB02
Space -> History -> Tables and Indexes
Filters =
Tablespace = *
Table abd Index *
Table or index size > *
order by growth and data will be dispalyed.
This would resolve your purpose.
Regards,
Abhishek -
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
Maybe you are looking for
-
Podcast episodes download to wrong folder. How can I move them?
Some of my downloaded podcast episodes seem to be going to incorrect folders. For example, I subscribe to the Photoshop TV podcast. Some of the downloaded episodes go into the iTunes Music folder>Podcasts>Photoshop TV folder. This seems to me to be t
-
Need help with margins & footer, and browser display issues....
Hello, I am working on a splash page in Dreamweaver, but am having trouble with the margins and the footer. 1. Margins: I basically want/need the center contents of the page never to extend past the contents of the header and footer. If you look at t
-
Render Files Are Being Saved onto My Mac Book Hard Drive...?
Hi All - So, I was highly curious as to why I have such little disk space on the hard drive on my Mac Book Pro and discovered that there is a file called "Render Files" on my hard drive which contains an enormous amount of video footage from movies I
-
Tell BrowserLab to simulate mouse/keyboard input?
I'm interested in using BrowserLab to research form element styling (something akin to http://www.456bereastreet.com/archive/200701/styling_form_controls_with_css_revisited/ , but with today's browsers). I haven't found a JS solution to simulate clic
-
3gs issues connecting with itunes
I left my iphone dowloading the new ios but it ask me to connect to itunes but i cant, the phone its not connecting with the cpu, itunes not recognizes the phone, what can i do?