Question about trigger to check the number of open cursors

Hello.
I wonder if it is possible to create a trigger that fires when the number of open cursors in a database becomes larger than a certain number. What kind of trigger and how would it be?
If it were possible the trigger would write traces with the timestamp of the event.
I would also like some pl/sql tester that would increase the number of open cursors so that I could check the trigger.
Thanks in advance.

Satish Kandi wrote:
OPEN_CURSORS is a value per session and not for the entire database. So if your cron job is looking for a global cumulative value of open cursors to occur in a single session, it won't find any such sessions.
Is it the case?Yes, I am afraid it is.
I am sorry but I don't unsertand what you are telling me: doesn't "select count(*) from v$open_cursor" count the number of open cursor for all sid columns in the view?
The cron launches a scripts that connects to the database via sqlplus whereas there is a java application (several threads without connection pooling) that connects to the database via jdbc and that causes the problem once in 5 months (to say something).
Thanks again.
Edited by: fsanchezherrero on Jul 3, 2009 12:28 PM
Edited by: fsanchezherrero on Jul 3, 2009 12:36 PM

Similar Messages

  • How to analyse the number of open cursors being used by each program?

    Hi,
    I am getting an error "ORA:1000 Maximum Open Cursors Exceeded" in my
    application. I want to analyse and monitor that how many cursors are
    being used  by each program running in a particular session. I have
    already set the Open Cursors Count double of the recommended for my
    application, yet I am getting this error.
    Is there any tool to analyse and monitor the number of cursors being
    used by each DB call?
    I have installed SAP NW 7.0 and Using Oracle 10g as DB.
    Your immediate help will be greatly appreciated.
    Best Regards,
    Smriti.

    You can list the open cursors per session and check which one uses the most with sqlplus:
    SQL> select a.value, s.username, s.sid, s.serial#
    from v$sesstat a, v$statname b, v$session s
    where a.statistic# = b.statistic#  and s.sid=a.sid
    and b.name = 'opened cursors current';
    Values over 300 are unusual.
    It is quite possible, that you see several workprocesses using a lot, because workprocesses are kind of shared sessions.
    Cheers Michael
    Edit: ah, our posts crossed, obviously there is no workprocess in the java world

  • How to get highest number of open cursors within the current calendar day

    Hi all ,
    i need to know how to get the highest number of open cursors within the current calendar day.
    Thanks ,

    823030 wrote:
    the issue is my customer is getting the error ORA-01000: maximum open cursors exceeded and we need an sql statment that gets the following values :
    -highest number of open cursors experienced in the current calendar day.
    -current open cursors
    -and maximum open cursorsThis error is rare. It happens when
    a) the value of the open cursor parameter is set extremly low (default is something like 1000). Low would be something like 10.
    b) <strike>you have many concurrent users(=sessions) and </strike>the application does not use bind values
    In this case each select will open a new cursor, instead of reusing it.
    c) you have a select that opens a cursor for each line. This can happen with a statement where you have the CURSOR keyword somewhere in the select or where clause. Those cursors will be closed when the select is finished. But during the run time of the select, all cursors stay open.
    To track the number of "open cursors" during the day you would need to implement some monitoring. Maybe based on the view that was already mentioned.
    Edited by: Sven W. on May 16, 2011 2:30 PM - since the parameter is on session level, other open cursors should not influence it much.

  • Number of open cursors

    I'm working on debugging some code and trying to monitor some of things that are happening at runtime. One of the things that would be useful is if I could monitor the number of open cursors on a connection.
    I've done my searching and can't seem to find anything of the sort Connection.getOpenCursorCount().... is there such a method or anything related?

    There's nothing generic like this, every possible approach that I know of is implementation-specific, either Java-side or DB-side.
    The Java-side approach is to attempt to track ResultSets through their life-cycle, as a rough proxy for cursors; this usually relies on wrapped RSs or a vendor-specific driver feature, and is sometimes not a good solution for running down certain types of resource leaks.
    On the DB side, some DBs have some visibility into open cursors through some sort of vendor-specific API.
    For example, on Oracle, there is the system view V$OPEN_CURSOR that can be queried for some information related to open cursors, often in conjuction with info ftom V$SESSION and V$SQL, V$SQL_AREA or V$SQL_TEXT. IMPORTANT NOTE: this view is actually a view on internal Oracle memory structures. While you can query it like any normal view or table, it is changing constantly, with internal per-row consistancy guaranteed by latches (locks on memory). Complex queries against internal views (such as self-joins or complex aggregations) can interact with the latches very badly; the queries may take many hours to complete and consume massive amounts of CPU while doing so. If you need to perform a complex analysis, don't do it on the live view; create a snapshot of the view and use that, for example:
    CREATE TABLE SNAP_OPEN_CURSORS as
    SELECT * FROM V$OPEN_CURSORS(Note that in a RAC or OPS Oracle cluster, the V$ views only report on the instance you're connected to; there are analogous GV$ views that report on all available instances, and have an added INST_ID column identifying the source instance, when relevant).

  • [SOLVED]problem about wc to check the amount of the processes through

    #problem about wc to check the amount of the processes through ps
    hi.this is the processes current
    $ps
    PID TTY TIME CMD
    2674 tty3 00:00:00 bash
    2689 tty3 00:00:00 mocp
    2746 tty3 00:00:00 ps
    $ps | wc -l
    5
    The problem:since there are 4 lines of ps output here,why wc -l shows the number "5"?
    And if i redirect ps to a file and then check the lines number with "wc -l",it's "4".
    $ps > out
    $cat out
    PID TTY TIME CMD
    2674 tty3 00:00:00 bash
    2689 tty3 00:00:00 mocp
    2753 tty3 00:00:00 ps
    $cat out | wc -l
    4
    Any idea?Thanks.
    Last edited by wanghonglou82 (2011-10-07 06:49:44)

    falconindy wrote:Working as intended. wc is running when you pipe ps to it.
    hi.thank you.
    The clue you bring here sounds reasonable.But a little more confusion to me comes around.I will check the bash rules for digest commands.thanks.

  • How do I check the number of prints per laserjet cartridge

    HP Color Laserjet CM1312 MFP nfi
    Operating System: XP SP2
    How do I check the number of prints on the printer

    Hi Delroyaw, 
    This is a commercial line product. For the best answer to your questions you will need to repost your question to the following links. 
    http://h30499.www3.hp.com/t5/Business-Support-Forums/ct-p/business-support 
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413 
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • Where do i go to check the age of a site and their SEO strength? Am i able to check the number and quality of links to their sites?

    I would like to check the age of a site in an industry I am thinking of going into.
    I would like to check the strength of their on page SEO.
    I wold like to check the number of links they have on their site and the strength of those links.

    Not a Firefox question.

  • Visio 2010 Validation for Checking the number of a specific type of shape.

    I have written a rule for flowchart for checking the number of Start/End Shapes in a document.
    The FilterExpression is as follows:
    AGGCOUNT(FILTERSET(SHAPESONPAGE(), HASCATEGORY("Start/End"))) > 0
    The TestExpression is as follows:
    AGGCOUNT(FILTERSET(SHAPESONPAGE(),HASCATEGORY("Start/End"))) = 2
    (Since totally there are 2 shapes: 1 Start and 1 End Shape)
    However, it is not working. Can anybody tell me what is wrong in the expressions.

    Well, it worked for me, so I want to check that you modified the Start/End master to have the User.msvShapeCategories row with the value "Start/End", as I did?
    A Category is not a Master
    David J Parker MVP (Visio) http://blog.bvisual.net

  • Hello my name is vicky i have an ipod classic 160 gb  when im syncing songs to ipod classic it is get stucked and a small noise is coming from back endof the ipod  i even checked the number of reallocs and pending sectors so please help me......for t

    hello my name is vicky i have an ipod classic 160 gb  when im syncing songs to ipod classic it is get stucked and a small noise is coming from back endof the ipod  i even checked the number of reallocs and pending sectors so please help me......for this

    Make an appointment at the genius bar.
    If you went without an appointment, then it would make sense that you could be turned away.

  • How check the number range buffers in bw..

    can any one tell me the procedure...
    how to  check the number range buffers in sap bw,,,,can any one help me on this???
    regards

    Please follow the steps mentioned below for checking the number ranges:
    TCODE: /nse37
    FUNCTION MODULE: RSD_CUBE_GET
    Then click F8
    From there I_INFOCUBE : Cube name(Here we can give the cube names from /nrsa1(click on infoprovider on leftside menu…)
    I_INFOCUBE                      Cubename
    I_OBJVERS                       A
    I_BYPASS_BUFFER                 x
    I_WITH_ATR_NAV
    Click on F8
    In Export Parameters : select below one
    E_T_DIME
    There we will get the Time stamp and number range
    Regards.
    Message was edited by:
            cnu babu

  • How to check the number of licences for ODI

    Hi,
    I would like to know , how to check the number of licences exists for my current OID.
    ODI Version: 11.1.1

    ODI licensing is similar to Oracle DB licensing. Its licensed by the number of cores in your target database.
    So, count the number of CPUs in your target box. Multiply them by the core factor (x86 vs sparc, etc) and then match with the paperwork you have :D

  • When I try to FaceTime on my ipad it says face time failed please check the number but it says this on every number

    When I try to FaceTime on my ipad it says face time failed please check the number but it says this on every number and I know thier correct

    Read this
    http://support.apple.com/kb/TS5419
    As of april 16 every device that uses facetime must be updated to acertain level or it won't work. And the 'catch' is that it applies to your device and the person you're calling.

  • Checking the number of concurrent user?

    Hi all,
    We are using FMS 4.5 to provide f4m & m3u8 live streaming and VOD to user via http.
    How can i check the number of concurrent user connected to the live and VOD?
    Many thanks!

    A few random thoughts...
    1) Check the system documentation for how RAM needs to be populated in the V240.
    I seem to recall that platform needs them two-at-a-time.
    2) Your prtdiag report would not have eight lines of information for the Memory Module Group unless there were eight DIMMs in existence. Empty slots would not be mentioned.
    Use Google and search for a perl script utility named memconf_.
    It's a handy third-party tool to get a text report of how RAM is populated in a system.

  • How to check the number of connections to MySQL DB

    Hi,
    Is there some way to check the number of applications connected to a mysql database?
    I have two different Java applications that will be using the same instance of MySQL.
    My requirement is that, I want to close the MySQL instance while closing the Java application.
    But before doing so, I want to make sure the other application is not connected to it.
    Is there some way I can achieve this?
    Your suggestions will be of great help.
    Thanks,
    Sandeep

    Hi,
    Thanks for your response.
    "Show processes" definitely serves my need.
    Basically what I am trying to do is to check if there are any other open connections to a MySQL instance before closing it.
    In our application suite, if there is a MySQL instance running, then the applications connect to it by default which results in some undesirable behavior sometimes.
    Hence, we are making sure that we close the MySql instance before exiting the application.
    Thanks,
    Sandeep

  • How to check the number of remaining downloads on DPS dashboard?

    I think that after the renewal of Adobe DPS,
    Professionl/ Enterprise Edition users can chek the number of remaining downloads on DPS dashboard.
    How to check the number of remaining downloads on DPS dashboard?
    shimoawazu

    Is there a way to determine how many downloads have occurred on a professional account?  We have multiple apps on the Apple and Android app stores and would like to know how many downloads from our first 5,000 have been used.  Is there a way to view analytics from all of our apps at one time instead of having to log in to digitalpublishing.acrobat.com separately for each app?
    Andrew

Maybe you are looking for

  • Change customer Account Group

    Hi Experts, We have two different account groups with different number Ranges. When i try to change the customer account group from one to other through XD07 system given the following warning message. Customer 600021 not in External Sold-to-Party -

  • How can i get facebook on my notifications

    i can only set up my twitter account... FaceBook isnt showing up on my notifications list.... Not quite sure how to sync my facebook account to my notifications. Any ideas???

  • Different calculation on each column in table in obiee 11g report??

    Hi , I have to display values in a table for measures in obiee 11g report which should hold different calculation on each column. For ex: Result 1: Flag  Display   Transaction  Amount   C      'A'                 2              3   C      'B'        

  • How to call a method when initialing the page?

    Help! I need to call a method to get some information from server to create a part of the page. But I don't konw what to do, Is there a function similar to the Flex's createComplete in JavaFX. please give me an example to show how to do that.

  • Preview app not showing thumbnails view scrambled

    Hi, since i updated to maverick last week i got an issue with the Mac Preview app, it opens the documents ok, but when opening several files at the time, the thumbnails are all scrambled and not showing the miniature of the selected file. if i click