Metric threshold Blocking session count
Hi,
I am trying to modify the blocking session count threshould and making warning threshold as null and critical threshold > 0. When i create a blocking session in the database i get the warning for application wait class but i don't get a critical alert generated even waiting for more than an hour. Here is what i have done so far
1. changed the warning threshold to null, critical threshold to > 0 and changed the time of collection to each 5 minutes.
2. Creating a blocking lock in the database, when i go on the performance page of db and look at the instance locks i can see the lock being held for more than 30 minutes
Any ideas how can i get this going will be much appreciated.
In order to trigger the metric "blocking session count", you have to
a. have one session which is holding the lock (not comitting)
b. at least one session which is waiting for exactly that lock. in that case, the metric will report sid of blocking session with a value of > 0.
Regards,
Martin Decker
www.ora-solutions.net
Similar Messages
-
ORA-00333: redo log read error block 283081 count 8192
I am starting the database..it mount but after that it gives me this error
ORA-00333: redo log read error block 283081 count 8192
Below are the contents of alert Log.._Please advice_
Completed: ALTER DATABASE MOUNT
Tue Jan 20 10:24:45 2009
ALTER DATABASE OPEN
Tue Jan 20 10:24:45 2009
Beginning crash recovery of 1 threads
parallel recovery started with 2 processes
Tue Jan 20 10:24:45 2009
Started redo scan
Tue Jan 20 10:25:00 2009
Errors in file /d01/oracle/PROD1/db/tech_st/10.2.0/admin/PROD1_prod1/udump/prod1_ora_32356.trc:
ORA-00333: redo log read error block 283081 count 8192
ORA-00312: online log 2 thread 1: '/d01/oracle/PROD1/db/apps_st/data/log02a.dbf'
ORA-27072: File I/O error
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4
Additional information: 283081
Additional information: 257536
Tue Jan 20 10:25:16 2009
Errors in file /d01/oracle/PROD1/db/tech_st/10.2.0/admin/PROD1_prod1/udump/prod1_ora_32356.trc:
ORA-00333: redo log read error block 283081 count 8192
ORA-00312: online log 2 thread 1: '/d01/oracle/PROD1/db/apps_st/data/log02a.dbf'
ORA-27091: unable to queue I/O
ORA-27072: File I/O error
Linux-x86_64 Error: 2: No such file or directory
Additional information: 4
Additional information: 283081
Additional information: 257536
Tue Jan 20 10:25:31 2009I did what Prabhu told me..But i recovered using backup controlfile and when i was asked to apply logs..i applied my oldest logs and it worked
Like i have two groups with two members each
I applied log1a.dbf and it said media recovery completee
I opened the database But then it started giving me errors for undo tablespace
I made another undo tablespace..tried dropping the old one but it did not permitted as it had some segments with status "needs recovery"
Than i added this parameter in pfile with the correupted segment and than tried to drop the segment but it still did not permit
corruptedrollback_segments =(corrupted_undo segment_name)
Next what i did was I mounted the database, ran another session of media recovery and opened the databse using resetlogs
Than i dropped the old undo and it went through successfully..
If you think anything i did wrong than please advice..
I hope this action plans helps you in case you come across same errors some day
I would be very thankful if you can refer me a document of recovery which covers all kinds of recoveries and scenarios and commands too
Thanks alot -
ORA-00333: redo log read error block 65538 count 8192
Hi,
I wanted to alter user hr's password, but I couldn't open the database first. What should I do? Here is my demo: Thank you for your response.
C:\>sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on Sun May 16 12:12:43 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect sys/oracle as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL> select * from v$controlfile;
STATUS
NAME
C:\ORACLE\ORADATA\SARAH\CONTROL01.CTL
C:\ORACLE\ORADATA\SARAH\CONTROL02.CTL
C:\ORACLE\ORADATA\SARAH\CONTROL03.CTL
SQL> select * from dba_users;
select * from dba_users
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-00333: redo log read error block 65538 count 8192
SQL> desc v$instance
Name Null? Type
INSTANCE_NUMBER NUMBER
INSTANCE_NAME VARCHAR2(16)
HOST_NAME VARCHAR2(64)
VERSION VARCHAR2(17)
STARTUP_TIME DATE
STATUS VARCHAR2(12)
PARALLEL VARCHAR2(3)
THREAD# NUMBER
ARCHIVER VARCHAR2(7)
LOG_SWITCH_WAIT VARCHAR2(11)
LOGINS VARCHAR2(10)
SHUTDOWN_PENDING VARCHAR2(3)
DATABASE_STATUS VARCHAR2(17)
INSTANCE_ROLE VARCHAR2(18)
ACTIVE_STATE VARCHAR2(9)
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
sarah MOUNTED
SQL>
*******************************I did what Prabhu told me..But i recovered using backup controlfile and when i was asked to apply logs..i applied my oldest logs and it worked
Like i have two groups with two members each
I applied log1a.dbf and it said media recovery completee
I opened the database But then it started giving me errors for undo tablespace
I made another undo tablespace..tried dropping the old one but it did not permitted as it had some segments with status "needs recovery"
Than i added this parameter in pfile with the correupted segment and than tried to drop the segment but it still did not permit
corruptedrollback_segments =(corrupted_undo segment_name)
Next what i did was I mounted the database, ran another session of media recovery and opened the databse using resetlogs
Than i dropped the old undo and it went through successfully..
If you think anything i did wrong than please advice..
I hope this action plans helps you in case you come across same errors some day
I would be very thankful if you can refer me a document of recovery which covers all kinds of recoveries and scenarios and commands too
Thanks alot -
Typical metric thresholds and patterns for monitoring Exadata
I’m looking for any best practices or a list of recommended settings for the following:
.- Metric Threshold settings to manage Exadata with OEM12c.
.- List of main and/or typical metrics used for setting up alerts in OEM12c for Exadata.
Thanks in advance,
Carlos.Hello Ravi,
This is a 10.2.0.4 (4nodes) Rac on Linux.
This a alert text:
Host=WEUSRV011.intrum.net
Target type=Database Instance
Target name=ie_colldesk_iecolld1
Categories=Performance
Message=Metrics "Global Cache Average Current Get Time" is at 0.615
Severity=Warning
Event reported time=Feb 25, 2013 9:44:05 PM CET
Target Lifecycle Status=Production
Comment=WEU Oracle Production Hardware
Operating System=Linux
Platform=x86_64
Event Type=Metric Alert
Event name=rac_global_cache:currentgets_cs
Metric Group=Global Cache Statistics
Metric=Global Cache Average Current Block Request Time (centi-seconds)
Metric value=0.615384615384615
Key Value=SYSTEM
Rule Name=Locks_Rule,rule 96
Rule Owner=A_GUTIERREZ
Update Details:
Metrics "Global Cache Average Current Get Time" is at 0.615
And
Host=tstcolldesk01.intrum.net
Target type=Database Instance
Target name=COLLDESK_COLLDESK1
Categories=Performance
Message=Metrics "Global Cache Average Current Get Time" is at 0.632
Severity=Warning
Event reported time=Feb 25, 2013 9:03:00 PM CET
Comment=WEU Oracle test Environment
Operating System=Linux
Platform=x86_64
Event Type=Metric Alert
Event name=rac_global_cache:currentgets_cs
Metric Group=Global Cache Statistics
Metric=Global Cache Average Current Block Request Time (centi-seconds)
Metric value=0.631578947368421
Key Value=SYSTEM
Rule Name=Locks_Rule,rule 96
Rule Owner=A_GUTIERREZ
Update Details:
Metrics "Global Cache Average Current Get Time" is at 0.632
The metrics definition is:
Global Cache Average Current Block Request Time (centi-seconds)
Global Cache Average CR Block Request Time (centi-seconds)
And the metrics values defined at template level are:
Warning Threshold 1.2
Critical Threshold 3
Comparison Operator >
Occurrences Before Alert 3
Corrective Actions None
I need to explore select * from dba_thresholds.
Thanks
Best regards
Arturo -
Set metric threshold for default metrics
Running Grid Control 10.2.0.4; have not had the time to go through an upgrade to 10.2.0.5 yet.
There are several metrics I am interested in setting a threshold for, specifically the Streams Replication metrics. When I click the "All Metrics" link on the cluster database's homepage I see a category called Streams Process Count as well as several metrics within that group. Right now none of those metrics have thresholds set. I have tried adding a threshold in the monitoring config (Preferences -> Rules -> Database availability and critical states) but the Streams metrics do not appear.
Am I missing something here? I feel kind of ridiculous for asking, but I can't seem to find the answer anywhere...Not every metric in 'all metrics' is configurable with metric thresholds.
Your workaround is to write an user definied metric. -
Hi,
Need some assistance...!
For the last few weeks i was getting the blocking session alerts and when i checked out for what the blocking session is doing, i found some select or insert or pl/sql line of code is getting executed. but the thing is i have observed the blocking is done on the same table each time.
Any suggestions how i can proceed further ? why the lock is getting on the similar table.
Regards,
SunilaAbout code examination, you could check the detailed SQL statements:
- INSERT should only block if another INSERT is run on the same table with the same primary key and in this case the second INSERT statement will fail due to duplicate key.
- SELECT can only block if SELECT with FOR UPDATE clause is used and in this case all rows returned by the SELECT (for a single table SELECT) are locked. SELECT without FOR UPDATE clause does not block.
If not already done, see How Oracle locks data. -
How to find active sessions count on a server in weblogic server console
Hi All,
I would like to know how to find active sessions count on a server in weblogic console. I am using weblogic 11g.
Regards,
Sunil.On the deployment, monitoring tab, you can select web applications. Here the number of current sessions are listed per web application deployed on the domain.
The deployment itself (deployments, application, monitoring, sessions) shows a list of sessions and where it is located. Unfortunately, there is no aggregation (but that is something you can so yourself as well).
When you are using a load balancer in front, the count of sessions on per web application on the domain gives you some clue how many sessions there are present on each server.
That is to say, when load balancer is using round-robin (and does that correct), you can take the total number of sessions divide it by the number of servers. -
Session Count not dropping in BOE XI
Iam calling crystal reports using url reporting. ie. calling OpenDocument.aspx page from a custom asp webpage. Iam able to create a token and then redirect to the OpenDocument.aspx correctly. But iam facing 2 issues :
1. The session created does not get destroyed on browser close. So, as i open new reports that i have linked as various links on my intranet, new sessions are created. Old ones are not destroyed. this keeps incrementing session count.
2. In the same browser page, (which was idle for a period of time), if i try to open a new report, at times, iam led to the infoview login page although the redirecting url shows a token being passed. Now if i click the back button on IE and then try to open the report again, it opens.
Why does this happen ? What can be done to resolve these issues ?
Any advice is highly appreciated.
Thanks in advance.Thanks for your reply Ted!.
I was hoping that we could do some custom code from the openDocument page to clean up the sessions.
Now that we are not able to modify it, dont you think it is going to eat up memory resources on server when we move this to production where we have a large number of users who will be accessing different reports at the same time. We have quite a large number of reports available for access this way, and accessed by a large number of users. What do you think would be a good approach in this scenario ?
Regards. -
Blocking sessions during MGP compose
We keep getting the MGP compose process blocked by inactive sessions
We raised a SR with Oracle and they suggested adding the instance parameter DO_APPLY_BFR_COMPOSE=YES to webtogo.ora, but this does not seem to have cured the problem.
From tracing, it seems that the problem is an inactive apply session that resulted in an error, being there for the user it is trying to compose. The actual block is on the table MOBILEADMIN.C$ALL_CLIENT_ITEMS.
If an apply fails due to an error (eg: constraint violarion, trigger failure etc), it executes the statement
UPDATE MOBILEADMIN.C$ALL_CLIENT_ITEMS SET CRR='Y' WHERE CLIENTID=? AND PUBLICATION_ITEM IN ( SELECT PUBLICATION FROM MOBILEADMIN.C$ALL_TEMPLATE_ITEMS ati WHERE ati.TEMPLATE=?):
as part of the copy to the error queue. It also looks to execute the same statement at the beginning of the compose for the user, hence the block.
The other odd thing is that looking at the blocks this morning, the MGP apply/compose kicked off at 7.09 am. The user synchronised at just after 8 am, by which time the MGP cycle was well into the compose phase, and there is no record of apply activity for the user within the cycle (the actual apply is in the following cycle), the the content of the blocking session was definitely apply code.
MGP used to do all of the applys first, and then all of the composes, with a test to skip the compose if there was data in the user in queue. The upgrade to 10.2 (or one of the many patches since) looks to have changed the default behaviour to attempt an apply before each user compose, but the parameter above was supposed to set the server back to its old behaviour (ie: keep apply and compose seperate). NOTE i have not seen any of the old 'compose deferred because of unprocessed data in the in queue' messages in the compose recently either.
Upshot is that it looks like it is still mixing apply and compose together, and where the apply hits an error, the apply thread is not closing correctly, or releasing its locks.
Does anyone have any information about the parameters
DO_APPLY_BFR_COMPOSE or
SKIP_INQ_CHK_BFR_COMPOSE (this appeared with a value of NO when we added the other parameter.
Information from oracle is that the two are mutualy exclusive (?) but they are not documented anywhere that i can find (the one reference on metalink leads to a non existant note), and oracle seem reluctant to supply any
so PLEASE
a) any information about the parameters
b) any dependancies (ie: parameters not working because we are missing a patch)
c) location of documentation
d) any other ideaswhich version are you on?
we are on 10.2.0.2, so unsure if this works in other versions
The standard mobile manager parameters screen does not by default show these settings, but we were asked to add them into the webtogo.ora file in the [CONSOLIDATOR] section eg:
[CONSOLIDATOR]
# Installer will change these values
SERVER_VERSION=8.1.7
SKIP_INQ_CHK_BFR_COMPOSE=YES
DO_APPLY_BFR_COMPOSE=NO
RESUME_FILE_SIZE=512
# 8.1.7
# Installer won't change these values
MAX_THREADS=3
JDBC_DRIVER=oracle.jdbc.driver.OracleDriver
once this was done we stopped and restarted the mobile server and then the new parameters will appear in the normal data synchronisation>administration>instance parameters screen
our current setting on the live system are
SKIP_INQ_CHK_BFR_COMPOSE YES
DO_APPLY_BFR_COMPOSE NO
and this does the compose whether or not there is pending data in the in queues for the client. Just my opinion, but there seems little point in doing the check as even if you force two tries of the apply process (one in the main apply phhase before the compose phase, and one just before composing for a particular user), the data in the second apply will not be picked up on fast refresh publication items as the 'snapshot' of the changes has already been done in the process logs phase -
Metric threshold and Response Action
Hello,
I have a problem regarding the metric thresholds in Oracle 10gR2. I would like to set a response action for the "Tablespace full in percent"-metric, but until now I wasn't successful with that.
I tried the following steps (sorry, if I sometimes don't use the correct terms, but I have a non-English version of EM):
1. Logging in into Enterprise Manager as SYS
2. Adjusting the threshold value for the metric
3. Setting a Response Action for the metric
a) first I tried a PL/SQL-procedure
b) another time I tried a OS-command (batch file on Windows XP)
4. Clicking "OK"
EM shows me then the page with all metrics and their settings; a message says that my changes were applied correctly. Everything seems to be right, when looking at the metric I see my new threshold value as well as the Response Action. When reloading the page, my customized threshold setting is still there, but the Resonse Action "vanished". So, no surprise, the Action is never started when the threshold is reached.
Has anybody an idea why this is not working? Am I missing something? I hope I forgot no important information. Thanks for all replies!
Regards,
LarsI thought I posted this earlier -- try the host metric log parser. It will search a given log file fo a given text string. Its quite simple to setup. There was an issue in 10.2.0.2 with the parameters in the wrong order but thats been corrected in 10.2.0.3. You could if desired put a fix it job in there that rotates the listener.log upon an error.
-
How to set collection schedule for metric thresholds
Greetings All,
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
Windows Server 2008 R2Please know that I am a newbie when in regards Enterprise Manager (any version).
I am trying to use EM-Database Control version that was installed when I installed Oracle.
I am trying to activate e-mail notification when tablespace(s) usage exceeds set thresholds. Specifically the locally managed tablespaces.
I found the Metric Thresholds page, and I found the “Tablespace Space Used (%)” metric. Note this is NOT the “(dictionary managed)” metric.
I do have e-mail and credential information established.
I found where you can identify a SQL script to be executed for corrective actions for the warning and critical thresholds. However I don’t want to execute any corrective action, I am just interested in the e-mail notification.
I know I could setup a SQL script that would send an e-mail but from my reading/research I believe that e-mail notification should automatically take place so long as e-mail and credential information has been established, which has been established.
My question is:
I can find now way to set a Collection Schedule. The dictionary managed tablespace metric has a collection schedule link (i.e. Every 15 Minutes), but the non-dictionary managed tablespace metric(s) has none.
Clicking the edit icon(s) provides no way of setting the collection schedule.
Where/how do I establish a Collection Schedule for this metric?
Thanks for your time,
BobHi Bob,
With Grid/Cloud Control you can modify the collection frequency (interval) for the Tablespace Space Used (%) metric for locally managed tablespaces; however, you cannot do the same in DB control.
That being said, alerts from the metric are server-generated alerts, which are generated from the monitored database target. When the space used percentage exceeds the Warning or Critical threshold, assuming you have subscribed to an appropriate notification rule for email notification, you should receive an email notification in about 1 minute or so.
The following doc may help explain more about server -generated alerts:
http://docs.oracle.com/cd/B28359_01/server.111/b28310/monitoring001.htm#CIHCAGAJ
Regards,
- Loc -
Access to view blocking sessions in sql server 2008
Hi,
One of my client wrote a stored procedure. we scheduled this SP in a job. while job is running, it is blocking other sessions. It is happening frequently. So, client is asking me to grant permission to view blocking session( want to execute sp_who2). Could
you please advise me, which permission I need to give. I don't like to give access other than sp_who2. Please advise.
Thanks.
Raja.
Thanks, RajaYou need VIEW SERVER STATE permissions for sp_who or sp_who2 to work. You can also use sys.dm_exec_requests which will also give blocking information and requires the same permissions.
Else you can take a look at the other alternative which is sp_whoisactive - check this link -
http://sqlblog.com/blogs/adam_machanic/archive/2012/03/22/released-who-is-active-v11-11.aspx
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com -
Pl/sql block to count no of vowels and consonents in a given string
hi,
I need a pl/sql block to count no of vowels and consonants in a given string.
Program should prompt user to enter string and should print no of vowels and consonants in the given string.
Regards
KrishnaEdit, correction to my above post which was wrong
SQL> ed
Wrote file afiedt.buf
1 with t as (select '&required_string' as txt from dual)
2 --
3 select length(regexp_replace(txt,'([bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ])|.','\1')) as cons_count
4 ,length(regexp_replace(txt,'([aeiouAEIOU])|.','\1')) as vowel_count
5* from t
SQL> /
Enter value for required_string: This is my text string with vowels and consonants
old 1: with t as (select '&required_string' as txt from dual)
new 1: with t as (select 'This is my text string with vowels and consonants' as txt from dual)
CONS_COUNT VOWEL_COUNT
30 11
SQL> -
ORA-00333: redo log read error block 69855 count 8192
Hello Guys,
where importing a dump to newly created database 10gR2 on Linux i got this error:
ORA-00333: redo log read error block 69855 count 8192
By searching this error, i found that I need to do recovery, but i don't have any backup of this database.
Is there any easy solution for this error?
Regards, Imranmisterimran wrote:
Hello Guys,
where importing a dump to newly created database 10gR2 on Linux i got this error:
ORA-00333: redo log read error block 69855 count 8192
By searching this error, i found that I need to do recovery, but i don't have any backup of this database.
Is there any easy solution for this error?no
00333, 00000, "redo log read error block %s count %s"
// *Cause: An IO error occurred while reading the log described in the
// accompanying error.
// *Action: Restore accessibility to file, or get another copy of the file.what additional clues exist with alert_SID.log file?
do as below so we can know complete Oracle version & OS name.
Post via COPY & PASTE complete results of
SELECT * from v$version; -
Active session count of an user
Hi,
Could you help me understand the concept of active user session count and the factors influencing the active sesssion count of an user
1) Does running multiple queries in a number of query windows in SQL developer lead to increase active session count?
2) Does a high degree of parallel option ( e.g. Parallel (Degree 8)) provided in a query lead to a higher session count?
3) Does the size of data processed in a query influence session count?
4) Does the complexity of a query influence session count?
5) Can a session remain active even after completion of a query and thereby increase the active sessioncount?
Regards
-Learnsequel910874 wrote:
Could you help me understand the concept of active user session count and the factors influencing the active sesssion count of an userThat depends on the client. Does the client use some form of multi-threading? If so, the client needs a separate and active Oracle session servicing each of its running threads.
The user may only initiate a single connection to the database - but the application remembers the authentication and connection details and can transparently establish multiple additional sessions. (a common behaviour by TOAD and SQL-Developer)
1) Does running multiple queries in a number of query windows in SQL developer lead to increase active session count?Yes - as an Oracle session is serialised. It can only execute a single client request at a time. Thus if the client has 3 windows/tabs with each running a SQL query - then 3 Oracle sessions are required to service that client.
2) Does a high degree of parallel option ( e.g. Parallel (Degree 8)) provided in a query lead to a higher session count?No. PX slave processes are database processes. They only "assist" a session at specific times. Then they can "assist" other sessions with other parallel query processing. The database has a configurable PQ processing pool of processes. You can specify the minimum number of processes to create in the pool at startup. You can specify the ceiling of the pool.
So no number of sessions can grow the number of PQ processes beyond the maximum size of the pool. And the pool is there to service all sessions. Not just a single session.
3) Does the size of data processed in a query influence session count?No.
4) Does the complexity of a query influence session count?No.
5) Can a session remain active even after completion of a query and thereby increase the active sessioncount?This is default behaviour. If that session terminates, the client looses its database connection.
In the case of a multi-threaded client, it can decide to close one or more of the transparent "background" sessions it created to the database, when no longer needing such a session. However, it will keep its initial (first) session open as its primary connection to the database.
Maybe you are looking for
-
Windows Vista, IE 7 and SAP passport
Hi, I am having problems to configure the SAP passport in my PC with Windows Vista to have SSO with the SAP marketplace. When I apply for the SAP passport, I only get a pop-up with the following error: "The execution of the ActiveX control could not
-
What's wrong with my iphone? :o/
Got this phone for over a year now, its unlocked with 3.0 All of a sudden one day the sleep/wake button stop working, phone still works fine, then the next day when I was charging it, it get really HOT. After that it start acting weird, it can call o
-
Hey all I just finished publishing my AIR mobile app for iOS and Android, both featuring freemium style in-app purchasing/billing, for a single purpose only - opening the app to be full featured. Now the client wants a desktop version of the app. I n
-
Image stretched on Samsung 16:9LCD TV connected to Satellite M100
Hi there, I'm struggling to work out why my 40" lcd will only show a stretched image when I connect my Satellite M100 via the vga output. Two weeks ago I was watching movies in the correct resolution and aspect ratio using the tv as an extended deskt
-
I tried many things, but nothing has solved my problem yet. I tried changing the history settings and some settings in about:config --> autofill true, etc. I just doesn't autofill. What should I do?