Investigate session PGA for one process

Windows server 2003 with Oracle 9.2.0.8.0
In this server there's a process (myprocess.exe) that runs every night at 4:00.
The process is always running, but only does actually work between 4:00 and 5:00. The rest of the day is present, with doing anything (idle).
Running this query:
SELECT
s.sid sid
, lpad(s.username,12) oracle_username
, lpad(s.osuser,9) os_username
, s.program session_program
, lpad(s.machine,8) session_machine
, (select ss.value/1024/1024 from v$sesstat ss, v$statname sn
where ss.sid = s.sid and
sn.statistic# = ss.statistic# and
sn.name = 'session pga memory') session_pga_memory
, (select ss.value/1024/1024 from v$sesstat ss, v$statname sn
where ss.sid = s.sid and
sn.statistic# = ss.statistic# and
sn.name = 'session pga memory max') session_pga_memory_max
, (select ss.value/1024/1024 from v$sesstat ss, v$statname sn
where ss.sid = s.sid and
sn.statistic# = ss.statistic# and
sn.name = 'session uga memory') session_uga_memory
, (select ss.value/1024/1024 from v$sesstat ss, v$statname sn
where ss.sid = s.sid and
sn.statistic# = ss.statistic# and
sn.name = 'session uga memory max') session_uga_memory_max
FROM
v$session s
ORDER BY session_pga_memory DESCI can see that myprocess.exe has:
154Mb of session_PGA_memory
163Mb of session_pga_memory_max
104Mb of session_UGA_memory
111MB of session_UGA_memory_max
For a idle process, this is just to much. So I think there are a lot of cursors not being close.
If I kill the myprocess.exe, immediaty I can see the oracle.exe memory used drop... around ~150MB.
If I restart myprocess.exe, PGA only has 4MB... until the next morning, where it has ~150Mb.
Getting the SID for myProcess.exe, and running this query:
SELECT s.machine, oc.user_name, oc.sql_text, count(1)  FROM v$open_cursor oc, v$session s
WHERE oc.sid = s.sid
AND s.sid=38
GROUP BY user_name, sql_text, machine
HAVING COUNT(1) > 1 ORDER BY count(1) DESC I was expecting to find a lot of cursors... but I did not! Only 9 rows are returned, and all with similat Sql_Text
"DELETE from GT_A "
"DELETE from GT_B "
"DELETE from GT_C "
(9 rows returned)
This GT_* are 9 global temporay tables, used in the PL/SQL execution.
1) Why are this 9 "DELETE from GT_" still present in open_cursors, if the process is idle since 5:00?
2) Checking the code, I found that they are created with: "On commit delete rows"...
but could this 9 global temporary tables justify the 154MB of PGA not release in the session?
Thanks in advance;
Edited by: PauloSMO on 6/Set/2011 4:20

The fact that the work area policy is set to auto and that you're on dedicated server of course invalidates the setting here. It's just a little odd that it was set given the docs state that it is defaulted to 0 and is recommended to be used in shared server environments.
Oracle does not recommend using the SORT_AREA_RETAINED_SIZE parameter unless the instance is configured with the shared server option. >Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. >SORT_AREA_RETAINED_SIZE is retained for backward compatibility.
PauloSMO wrote:Still active looking for a way to find why a idle process, has is session with 160MB in PGA.
Why does it not free memory to the Operating System!The pga_aggregate_target is a target. It will be exceded if necessary. If the memory is being used it can't be returned to the OS. The issue is finding out where it is using the memory. As you can see it's not particularly easy to dig into the real detail of what's contained in the PGA for that particular session, so why not set up a simple job to query the stats for that session every 10 seconds or something? That way you'll be able to get a profile of when the memory usage is going up and hopefully be able to correlate that with what the process is doing. It's not ideal but that's essentially what something like active session history is doing. If you have a decent level of instrumentation via things like dbms_application_info, it will make the job a little easier.
HTH
David

Similar Messages

  • Tcode to view fico related postings for one process order

    Hi Experts,
    Is there any trasaction code which can be used to view all related posting into FICO for one process order
    Thanks in advance.
    Narayanan
    Moderator: Please, search SDN

    Hi,
    Check In KoB1 T.code, Give Order Number and Date Range.
    Thanks
    Goutam

  • Tcode for FICO related postings for one process order

    Hi Experts,
    Is there any Tcocde which can be used to view all related posting into FICO for one process order
    Thanks in advance
    Narayanan
    cross-post

    Hi Venkat,
    Don't know any tcode, but from se16n BSEG table u can extract document data by filling AUFNR field with process order number.
    Hope this helps
    Best regards
    Vimal

  • Two Sessions Waiting for One Another Across DB Link

    Hi,
    Version: 9.2.0.8, patchset 8
    OS: Windows Server 2003
    Server: Itanium 2
    During our overnight ETL process last night, one of the stages which normally takes serveral minutes to run became stuck. The calling process in the DW database was showing as ACTIVE and the wait event was for "SQLnet message from DB Link". When looking at the session in the database where the changes are being collected from, the session was shown as INACTIVE and to be waiting for "SQLnet message from client".
    The process was stuck for 6 hours and until we managed to kill the job from the schedule so that the remainder of the ETL process could continue. There were no errors on either of the two servers (the DW and source DBs run on separate boxes). The network engineers reported 0 problems with the network at the fault time. There are no trace files or reported errors in the alert logs of either DBs.
    Has anyone seen this type of problem occuring before? Or can anyone suggest possible causes/ways to determine what the possible cause was?
    We have since re-run the offending stage and it completed within 5 minutes.
    Thanks in advance

    There was no answer from here or from Oracle. We use a different process now.

  • Different Valuation types for one process oder

    Hi,
    We have a requirement like valuation type in the process order should not get copied from the confirmation and the valuation type should be dynamic and different for each confirmation of the process order. Can any one tell me whether there are any costom setting for this scenario.
    If there are no custom settings Can we do core modifications to the program to clear the value of valuation type in the process order. If we clear valuation type manually will there be any effects to any of the programs based on the valuation type.
    What is the purpose of valutaiton type . Please specify any documens that i can refer for valuation type field in process order.
    Thanks,
    NN.

    Hi,
    The valuation type assigned to the material & not to the order.
    The valuation types are used to idetify how the material was processed.
    As Some stocks of a material can be procured externally. Others are
    produced internally. Using the valuation type  , you can assign your
    "bought-out" stocks and your "made-in" stocks to different accounts and
    valuate the "bought-out" stocks at different prices to the "made-in"
    stocks. Such stocks can be subject to different price controls.
    regards,
    K.Subhash

  • How many memory is used for the process of one connection?

    Hi,
    how many memory is used for the process of one connection in unix
    when the user connects to the database?
    Thanks,

    Write some queries using v$sesstat, v$statname, v$session to find the statistics for different stats. Query name from v$statname and find whatever you wants. I don't think there is a common rule that tells how much memory will be used for each connection, it depends on different factors like , resources available, type of databases, database memory settings etc.
    Example query.
    select s.osuser osuser,s.serial# serial,se.sid,n.name,
    max(se.value) maxmem
    from v$sesstat se,
    v$statname n
    ,v$session s
    where n.statistic# = se.statistic#
    and n.name in ('session pga memory','session pga memory max',
    'session uga memory','session uga memory max')
    and s.sid=se.sid
    group by n.name,se.sid,s.osuser,s.serial#
    order by 2
    ;

  • Change PGA for session?

    Hi there,
    we are developing an OLTP application on 11gR2. As a consequence of having a lot of small transactions, we have configured a relatively small PGA and a lot of SGA memory and have configured the optimizer relevant parameters for choosing b-tree index paths.
    Still we are going to have some batch Jobs, running during the non-office hours. Now my problem is, how to change the DB configuration session-wise, to be more DWH-like. While I can change the optimizer settings session wise, I have problems changing the PGA for a session.
    How would you solve the problem? One solution could be to change from automatic PGA memory management to manual, that is to setting the %_AREA_SIZE parameters. These parameters can be changed session wise. But this would very much affect the behaviour of the overall system.
    Any idea? What is the standard solution for such issues?
    Many thanks in advance.

    Centinul wrote:
    user8768362 wrote:
    Thanks but I mentioned this before in my own posting. I would somehow want to keep the automatic worksize area management.You can use manual PGA management at the SESSION level as Dom said, by changing the WORKAREA_SIZE_POLICY parameters, and subsequently setting the AREASIZE parameters.
    user8768362 wrote:
    and have configured the optimizer relevant parameters for choosing b-tree index paths.Would you be able to elaborate more on this? This sounds like a questionable change to me.
    >
    >Thanks but I mentioned this before in my own posting. I would somehow want to keep the automatic worksize area management.
    You can use manual PGA management at the SESSION level as Dom said, by changing the WORKAREA_SIZE_POLICY parameters, and subsequently setting the AREASIZE parameters.
    user8768362 wrote:
    and have configured the optimizer relevant parameters for choosing b-tree index paths.Would you be able to elaborate more on this? This sounds like a questionable change to me.
    >
    >
    Thanks but I mentioned this before in my own posting. I would somehow want to keep the automatic worksize area management.
    You can use manual PGA management at the SESSION level as Dom said, by changing the WORKAREA_SIZE_POLICY parameters, and subsequently setting the AREASIZE parameters.
    Thank you, that's it I think. My misunderstanding was that I had only looked at the PGA_AGGREGATE_TARGET parameter. Setting this parameter to 0, automatically sets the workarea_size to manual. Only difference is: pga_aggregate_target can only be changed on the system and not on the session level. So my solution is to change the workarea_size parameter to manual in the session and to set the xxx_area_size parameters as necessary. Thanks for the help. Sometimes the solution is there, but you just don't see it. :-)
    >
    user8768362 wrote:
    and have configured the optimizer relevant parameters for choosing b-tree index paths.Would you be able to elaborate more on this? This sounds like a questionable change to me.Don't worry about that. I have made very good experience with these settings. I actually got the idea some years back from the book of Tom Kyte "Effective Oracle by Design". The default values
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100are good for DWH environments. For OLTP apps the following setting can be better:
    optimizer_index_caching              integer     90
    optimizer_index_cost_adj             integer     25As you know the cost estimations of the optimizer are relative. So these parameters influence the decisions of the optimizer to rather choose index-paths or rather full table scans. The OLTP settings have been proved in my projects as recommendable.
    Thanks.

  • How to open multiple sessions for one user?

    Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
    When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 1
    update my_table set col1 = 0 where row_id = 1
    select col1 from my_table where row_id = 1
    -- shows result is 0and then enter into the second worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
    I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
    Re: Help with Procedure
    Edited by: tem on Apr 18, 2012 6:44 AM

    Thanks Jim,
    Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
    This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
    I don't see an option for "Worksheet".
    UPDATE:
    OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
    select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
    Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
    Edited by: tem on Apr 18, 2012 8:00 AM

  • Resolving the problem of same session id for more than one client

    Hello
    My web application developed in jsp is facing problem with the same session id given for 2 different clients.
    Here iam storing the user id and session id in a hashtable based on which further request are processed.
    Could u please suggest how to resolve this problem so that each client have different session id.
    -Regards
    Lakshmi

    define "2 different clients"
    1) You have 2 different PCs and it's using the same session ID for both? I doubt this. I think the server is advanced enough not to use give a session ID that's already been created.
    2) You have 1 PC and are using IE or Netscape and using File > New Window to open a new window and connect again. This you can't fix without using only URL rewriting to manage session, because the different windows will share the same session cookies.

  • In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account.

    In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account. But if I want to use more than one yahoomail accounts, in private browsing is not working. Please suggest.

    That problem isn't related to Private Browsing specifically, that's how Firefox works with regards to multiple "sessions" with the same server - only one logon is allowed at any time. Try using one of these extensions to be able to run multiple session cookies.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • Should we use only one process order for each CO-product?

    Dear All,
    We have process orders.  One process order opens per day.
    Now we need to use CO-products and calculate actual cost of goods manufactured for them.
    Suppose we have 30 process orders. We have specified  Apportionment Structure in Material Master.
    Then when we create process order we  define actual Apportionment Structure in setllement rule as well.
    After we have setlled all process orders would Material Ledger/ Actual costing run consider this Apportionment Structures from all 30 process orders?
    I heard opinion from Consultant from SAP that it will not work.
    Has anyone heard anything?
    Best regards,
    Kamila.

    Hi Evgeniy,
    Thanks for response
    But we use process orders, not CO-production orders.
    We open process order each day because management wants to have information about KPI of each schift.
    We have defined in material master apportionment structure, When we create process order we define apportionment structure in settlement rule as well.
    When we settle process orders our cost distributes to finished good and CO-product according with this apportionment structure.
    But when we run ckmlcp ML/actual costing doesn't distribute raw material's price differences and Semifinished good's price differences according with this apportionment structure.
    What can we do here?
    Best regards,
    Kamila.

  • Session Status is in processing with one error

    Hi All,
    While doing session processing user canceled the session. Now session status is in processing and it is showing one error.
    How can i process again. Please guide me regarding again i want process session .  It is very very urgent
    Thanks in Advance.
    Krishna

    Hi Krishna,
    Are you referring to SM35 session? If so release (flag icon or  SHIFT+F4) your session and process it again.
    Rgds
    Nadini

  • How can I deny write access to datalog files for all but one process in LV8?

    In LabVIEW 7.1, wiring the deny mode terminal of Open File.vi with a Deny Write Only enum constant was an effective means for ensuring that only one process could write to a datalog file at a time.  In LabVIEW 8.0, Open File.vi is no longer available and the new Open/Create/Replace Datalog vi does not provide a deny mode terminal.  Also, the new Deny Access vi does not support datalog files.  Furthermore, the Set Permissions vi is an unsatisfactory solution because under the Windows operating system, it simply sets the Read Only file attribute.  This is inadequate because I have demonstrated that it is still possible for two processes to open a datalog file with read/write access before either one has had a chance to set the Read Only file attribute in order to lock out the file.  If a process sets the Read Only file attribute first, then it can't open the file with read/write access for itself.
    Does anyone understand the file mechanism by which deny mode used to work with the old Open File.vi?  I wish to restore the functionality I had in LV 7.1 in my LV 8 programs.
    Thanks!
    Larry

    Larry Stanos wrote:
    I appreciate the
    empathy from Rolf, but I'm hoping that someone may have written one or
    more vi's containing CINs that call Windows 2000/XP file access control
    library routines.  At least I'm assuming that is how the deny mode
    input to Open File.vi used to work in LV7.1.  The Microsoft
    Developers Network on-line documentation on Access Control http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/access_control.as... is
    daunting to put it mildly.  But even if a set of CINs has not
    already been coded, perhaps someone could point me to the specific set
    of calls I need to make to absolutely guarantee that no two
    clients can simultaneously open the same file with write privileges.   Unfortunately
    the elimination of deny mode functionality for datalog files in
    LV8 has sabotaged my commitment to a March 1 release date because it
    would also be impractical to convert everything back to LV7.1 at
    this point.   Sincere thanks to anyone who can help me out here!
    Unfortunately
    the functionality you mention does not work in the way the deny mode in
    the LabVIEW nodes works. Basically that deny mode is converted to an
    according FILE_SHARE_READ/FILE_SHARE_WRITE value and passed to the
    Win32 API CreateFile function. This is more or less the only place
    where you can define a global share (or deny) access to a file. That is
    also why the Deny Access node online help is talking about that the
    file is reopened.
    But I just retried what you had tried to do, and low and behold it
    works with wiring a datalog refnum to Deny Access. What is important
    here however is that you do need to wire a datatype to the record type
    input of the Open/Create/Replace Datalog node. Otherwise you can't
    connect the resulting datalog refnum to any other file function, since
    it is an incomplete datatype.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Logging for one session

    I'm using java.util.Logging mechanism for logging in my web application. I always use logger via class name - e.g. Logger.getLogger(MyClass.class.getName()).log(....)Now, I wonder if there is a technique or best practice to show only log records for one user session.
    For example.. I have a servlet that after receiving request creates one thread, which creates n-threads to get some data from different web services. Naturally there can be many concurrent users using this servlet. I would like to use logging mechanism to show log records only for particular user (session).
    The only solution that came on my mind is to put sessionId into all threads names, create custom Logging handler that puts thread name as record parameter and then filter out records that contain parameter with chosen sessionId.
    Is there a better solution?
    Thanks.

    Hi Gus,
    One of the things getting logged is the session id.Do you mean the database session id or the Apex session? The database session id changes when a different session is used in the pool. The Apex session doesn't change until the user logs out.
    So we set an application item to the value of the session id during authentication.You don't need to do this. The database session can be found in the user context using SYS_CONTEXT('USERENV', 'SESSIONID'). The Apex session is available using V('SESSION'), it is also can be found in the user context, together with the Apex username using SYS_CONTEXT('USERENV', 'CLIENT_IDENTIFIER'). So you can get the session ids from the context when you log information.
    Rod West

  • Lightroom 5 slowdown, my post processing times have tripled and the develop tasks take multiple seconds for one adjustment, Please Help. . . .

    my post processing times have tripeled and the develop tasks take multiple seconds for one adjustment, Please Help. . . .

    my post processing times have tripeled and the develop tasks take multiple seconds for one adjustment, Please Help. . . .

Maybe you are looking for