Join V$SQLAREA and V$Session

hi all,
which column i need to use to join V$session and V$sqlarea?
My main aim is to find top 5 queries with most disk_reads and generate a report containing relevant information.
Thanks

i use to check active queries like this from both tables
select
     substr(sid || ',' || serial#,0,15) sid,
     USERNAME,
     PROGRAM,
     MACHINE,
     OSUSER,
     LOGON_TIME,
     TERMINAL,
     sql_text Query
from
     v$sqltext,
     v$session
where
     address=sql_address
     and hash_value=sql_hash_value
     and status='ACTIVE'
order by LOGON_TIME,sid,piece

Similar Messages

  • Join v$sql and v$session

    Hi All,
    I want following columns from both v$sql(last_active_time) and v$session(username,status ,program)
    Cud anyone guide me how to what is the sql that joins both views so that i get above column info ?
    Thanks a lot

    sybrand_b wrote:
    Yep but that is a 9i response and it won't work, IIRC, in 10g and higher.
    Sybrand,
    Why it won't work in 10g or higher?
    SQL> /
    Enter value for sid: 138
    old   6:    and ses.sid=&&sid
    new   6:    and ses.sid=138
    SQL_TEXT
    select /*+ ORDERED USE_NL(st) */ sql_text   from v$session ses,
           v$sqltext st   where st.address = ses.sql_address    and
    st.hash_value=ses.sql_hash_value    and ses.sid=138 order by pie
    ce
    SQL> l
      1  select /*+ ORDERED USE_NL(st) */ sql_text
      2    from v$session ses,
      3         v$sqltext st
      4    where st.address = ses.sql_address
      5     and st.hash_value=ses.sql_hash_value
      6     and ses.sid=&&sid
      7* order by piece
    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>Regards
    Aman....

  • V$BGPROCESS and V$SESSION

    This is on 10g.
    V$BGPROCESS displays information about background processes
    V$SESSION has some rows representing background processes.
    What is the difference between two ?
    Am I correct in understanding that ; v$bgprocess contains total allocated processes whereas, v$session represents total runtime processes on that instance?
    That being said, for example, if there are 10 sessions, all 10 sessions will have same number of bacground processes. Is that true?
    To explain further, say if v$session displays DBW0 and DBW1, it means two instance of DBWR processes are running for this instance. But if v$bgprocess has DBW0.. DBW9 processes, that means, you can maximum have 9 DBWR processes on that instance.
    Please concur if above is correct.
    Thanks
    R
    t

    it gives 157 rows, but in production it gives only 70 rows. Does this mean that maximum number of bg processes allowed are less on prod box than dev box?Your production database has 70 BG process, so its showing you this value.
    The BG process can differ instance to instance, such as ARCH process, if archiving is enable for an instance, then you will have this one from your query, and you will not have this one where the archiving is not enabled.
    You can set the PROCESSES parameter in DB, there is no parameter relate to BG process solely.
    you would have the value of PADDR=00 for the inactive BG processes.
    Those BG processes are active will have a value of PADDR which is the address of the process state object.
    Look at below :
    you will find that PADDR !='00' from v$bgprocess retrieve the same columns as querying the v$process and v$session by joining and have the PADDR=value/not 00, that is the active BG processes
    SQL> ed
    Wrote file afiedt.buf
    1 select a.name,a.paddr,b.program,b.status,b.user#,b.username
    2 from v$bgprocess a
    3 join v$session b
    4* on (a.paddr = b.paddr)
    SQL> /
    NAME PADDR PROGRAM STATUS USER# USERNAME
    MMNL 2ECF1944 ORACLE.EXE (MMNL) ACTIVE 0
    MMON 2ECF14C4 ORACLE.EXE (MMON) ACTIVE 0
    QMNC 2ECF0744 ORACLE.EXE (QMNC) ACTIVE 0
    CJQ0 2ECEF0C4 ORACLE.EXE (CJQ0) ACTIVE 0
    RECO 2ECEEC44 ORACLE.EXE (RECO) ACTIVE 0
    SMON 2ECEE7C4 ORACLE.EXE (SMON) ACTIVE 0
    CKPT 2ECEE344 ORACLE.EXE (CKPT) ACTIVE 0
    LGWR 2ECEDEC4 ORACLE.EXE (LGWR) ACTIVE 0
    DBW0 2ECEDA44 ORACLE.EXE (DBW0) ACTIVE 0
    MMAN 2ECED5C4 ORACLE.EXE (MMAN) ACTIVE 0
    PMON 2ECED144 ORACLE.EXE (PMON) ACTIVE 0
    11 rows selected.
    SQL> select * from v$bgprocess where paddr!=00;
    select * from v$bgprocess where paddr!=00
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected BINARY got NUMBER
    SQL> select * from v$bgprocess where paddr!='00';
    PADDR PSERIAL# NAME DESCRIPTION ERROR
    2ECED144 1 PMON process cleanup ##########
    2ECED5C4 1 MMAN Memory Manager ##########
    2ECEDA44 1 DBW0 db writer process 0 ##########
    2ECEDEC4 1 LGWR Redo etc. ##########
    2ECEE344 1 CKPT checkpoint ##########
    2ECEE7C4 1 SMON System Monitor Process ##########
    2ECEEC44 1 RECO distributed recovery ##########
    2ECEF0C4 1 CJQ0 Job Queue Coordinator ##########
    2ECF0744 1 QMNC AQ Coordinator ##########
    2ECF14C4 1 MMON Manageability Monitor Process ##########
    2ECF1944 1 MMNL Manageability Monitor Process 2 ##########
    11 rows selected.

  • What is the difference between Session timeout and Short Session timeout Under Excel Service Application -- session management?

    Under Excel Service Application --> session management; what is the difference between Session timeout and Short Session timeout?

    Any call made from the API will automatically be set to the “Session Timeout” period, no matter
    what. Calls made from EWA (Excel Web Access) will get the “Short Session Timeout” period assigned to it initially.
    Short Session Timeout and Session Timeout in Excel Services
    Short Session Timeout and Session Timeout in Excel Services - Part 2
    Sessions and session time-outs in Excel Services
    above links are from old version but still applies to all.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Problem with Frameset and page session

    All,
    I am having a problem with Framesets and page session attributes. I
    have a client who's application uses a three frame frameset. They
    have a requirement on several pages that when a button is pushed two
    different pages load into the right and left frames. The way they
    are accomplishing this is that on the pages were this is required,
    they are adding target="_top" to the form declaration in their JSP.
    Then they store the page names they want to display in session,
    forward the request to the frameset, the frameset then determines
    which pages to display based on the session variables. This works
    exactly how they want it to.
    Here is our problem. We need to store some information in page
    session attributes. We have tried to get a handle to the desired
    view bean and call the setPageSessionAttribute method. However,
    since we are forwarding to the frame and the frame handles displaying
    the desired JSP, that view bean we had the handle to is not the one
    that is created to hand the display of the JSP.
    The next thing I tried was to use the request object. In the
    handleBtnRequest method, I set an attribute in the request object. I
    then query the request object in the beginDisplay event of the view
    bean. When the frame is reset the request object does not contain
    the attribute that I have set. I'm confused by this because I
    thought the request object would be available to me throughout the
    life of the request.
    Given the above information, does anyone have any suggestions? Also,
    am I going about this in the wrong manner.
    The client had been storing this information in user session, which
    seemed to work. However, since the data being stored dealt
    specifically with data for the requested page, we felt that storing
    it as page session was more appropriate.
    Thanks,

    The script on your page web page has some obvious bugs.. Best
    fix those
    first before looking to blame Flash.
    Jeckyl

  • How to share the same session between JNLP Application and browser session

    How to share the same session between JNLP Application and browser session using BasicService.showDocument(url) method? It appears whenever i launch any URL from within a JNLP application using BasicService.showDocument(url) , it creates new instance of browser and session even after i used cooke handlers to restore JSESSIONID and Ltpa token etc.
    public static int showDocument(String urlToOpen)
    BasicService obj = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
    obj.showDocument(urlToOpen);
    }

    Try using Reflection

  • Screen Sharing and SSH sessions freeze occasionally on multiple mac minis

    I have 28 Mac Minis at work. With such a large number of minis, I obviously can't have a monitor attached to each of them so I've got them plugged into a network switch and access them via Screen Sharing (both via regular Screen Sharing and ARD) and SSH sessions.
    A few of them seem to suffer from intermittent problems however. I'll be using Screen Sharing when the session freezes. It may unfreeze eventually, but I can also usually just quit out and re-connect and it will be unfrozen. The same thing happens when I'm connected via SSH, it will freeze and I won't be able to type in any more commands.
    I need help troubleshooting (or if anyone knows what could be causing this, that'd be cool too).
    I've tried connecting from both a Mac Pro on the wired network and a MacBook Pro on the wireless network. The freezing seems to only happen on certain Mac Minis as well.
    I've tried switching network cables from a Mac Mini that doesn't suffer from this problem with one that does and nothing changed.
    I also thought it might be a bandwidth issue at first, despite being a gigabit switch connected via cat6 to the rest of our gigabit network, but even when no significant bandwidth is being used, the freezing still occurs.
    One more thing I want to test is the connection between the switch all these Mac Minis is plugged into and one of the other switches that all our other network traffic goes through. I didn't set it up myself so I fear that it might be an old, damaged cable or something. Failing that, I have no idea what the problem could be, which is why I'm posting here.
    So, does anyone have any idea what the problem could be? Or any other ideas for troubleshooting the problem? Thanks.
    (They're all running 10.6.8, and range from Mid-2007 to 2009 models).

    It would be in the system log. However, the next step would be to safe-boot in order to eliminate third-party system modifications. That goes for both client and server. If you can reproduce the problem in safe mode, then you probably have a network issue. Take everything offline except one client and one server, and test.

  • How to get stateful and stateless session bean in second jsp

    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the second jsp? I find that somebody store the bean in HttpSession.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, both stateful and stateless can maintain the state in the second jsp. What is the difference between stateful and stateless session bean in this case ?
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use session bean. Can anyone provide sample jsp to show difference of stateful and stateless? How the stateful session bean can maintain the state for the client?

    Greetings,
    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the
    second jsp? I find that somebody store the bean in HttpSession.Which is the correct scope for sharing client-specific data when 'request' scope is insufficient.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is
    that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, bothWhy is that a "problem"? Does your application not require the stateless bean to be shared? If so, then don't store the EJBObject reference in the session...
    stateful and stateless can maintain the state in the second jsp. What is the difference betweenWhat do you mean by this exactly?..
    stateful and stateless session bean in this case ?Statefulness of session beans is in regard to maintaining client state (er, in all cases). If your "stateless" bean is receiving information from the client (i.e. its caller) - either through a create method or a business method - and that information is available (retrievable from the bean) on subsequent method calls, then that bean is, in fact, stateful - regardless of how it is deployed.
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use
    session bean.The correct question, it here seems, is "when" to use which type... Use a "stateful" bean when information about (from) the client (i.e. the caller) must be maintained across method calls of the bean. Use a "stateless" bean for general business methods that do not depend on "prior knowledge" of the client (i.e. the caller).
    Can anyone provide sample jsp to show difference of stateful and stateless? How the statefulA "sample JSP" would yield nothing additional... The semantics of calling, using, and "persisting", bean references are always the same - regardless of type or class. However, the reason(s) for using one over the other depends entirely on the needs of your application.
    session bean can maintain the state for the client?I recommend that you spend more time learning about EJBs generally. In particular, it seems you require more fundamental understanding of their scope and lifecycle. Refer to sections 4, 6, and 7 of the EJB 2.0 Specification.
    Regards,
    Tony "Vee Schade" Cook

  • I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    I bought yesterday my macbook pro and I want to join the FaceTime and I just can´t... It said that is not working and try it later... but since yesterday said that .. What should I do?

    Here's a previous discussions that seems to have solved a similar issue in the past:
    https://discussions.apple.com/message/12209861#12209861

  • Where is iTunes Match content stored on apple TV? I recently joined itunes match and it is working on my ios devices, but I can't find my music on Apple TV

    Where is iTunes Match content stored on apple TV? I recently joined itunes match and it is working on my ios devices, but I can't find my uploaded music on Apple TV

    It isn't actually stored anywhere, it needs to be downloaded from the internet before any content can be played.
    iTunes Match content is accessed through the 'Music' icon on the main screen though, it needs turning on though in settings first.

  • Code to set and destroy session variables in Java Server Pages(JSP)

    code to set and destroy session variables in Java Server Pages(JSP)
    we have use following statement to set session variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session variable
    session.setAttribute("userClient","");
    and
    the session.invalidate() is not working
    Plz. solve this probem

    code to set and destroy session variables in Java
    Server Pages(JSP)
    we have use following statement to set session
    variable
    session.setAttribute("userClient",id);
    we have use following statement to destroy session
    variable
    session.setAttribute("userClient","");Perhaps if you tried using
    session.setAttribute("userClient", null);
    or
    session.removeAttribute("userClient");
    and
    the session.invalidate() is not workingNot working how?
    >
    Plz. solve this probem

  • HT200169 Having a problem with Logic 9 on a Mac Pro.Working on a lenghty song and apparently session got corrupted.Doesnt let me export tracks,program crashes.Already tried start brand new session with the tracks imported into it but still wont export.Sug

    Hello,having a problem with Logic 9 on a Mac Pro.Working on a lenghty song and apparently session got corrupted.Doesnt let me export tracks,program crashes.Already tried start brand new session with the tracks imported into it but still wont export.Suggestions?

    Thanks, Ian. Yeah, that's how I do it now...or with the controls in the left side pane. Still, I would have liked that quick on-the-spot edit capability...especially while sketching.
    Ian Turner wrote:
    Sorry Mark, you are out of luck as it does not do that - it works the same as L8. The way I would achieve that with more accuracy and control would be to route all the tracks you want to fade to a Bus then use volume automation on the bus. To do this you will need to add a standard audio track, then re-assign it using (Control Click on the track header) to the Bus track. You can then automate volume/plugins etc on the Bus track.
    Ian

  • Urgent - How to join multiple facts and dimensions in OBIEE rpd??

    Hi,
    In my RPD I have 3 facts and 4 dimensions and the joins defined are as below
    Physical layer - All joins are FK and inner (1:N)
    FACTA-------------- DIM_TIME, DIM_CUST,DIM_CAL
    FACTB-------------- DIM_TIME, DIM_CUST,DIM_CAL
    FACTC-------------- DIM_TIME, DIM_CUST,DIM_CAL, DIM_XYZ
    BM layer - All joins are complex, inner
    The logical table F1 pulls columns from FACTA, FACTB and FACTC . Complex join exists between all 4 dimensions DIM_TIME, DIM_CUST,DIM_CAL, DIM_XYZ to logical table F1.
    Issue: I need to build a report with $ column from FACTA, FACTB and FACTC and need to add filter conditions using columns from DIM_TIME, DIM_CUST,DIM_CAL, DIM_XYZ.
    However when ever I add a filter condition from DIM_XYZ the physical query generated is not generating code to access data from FACTA and FACTB. Instead it is subsituting a NULL and just pulls data frm FACTC.
    My Questions: What is the best way to build the physical and BMM layer using FACTA, FACTB,FACTC, DIM_TIME, DIM_CUST,DIM_CAL and DIM_XYZ??
    I need to resolve this issue ASAP so any help is appreciated. Thanks
    Edited by: user11935561 on Feb 10, 2010 6:27 AM
    Edited by: user11935561 on Feb 10, 2010 6:28 AM

    You can find the same issue in
    Logic of queries in OBIEE
    or
    Connection between 2 fact tables
    Follow the link
    http://there-n-back-again.blogspot.com/2009/04/oracle-analytics-how-to-report-over-non.html
    Put 'All' or 'Total' at levels for dim_xxx for those facts you need in your report from facta and factb
    Regards
    Nicolae

  • Joining DB VIEW and Command result in cartesian product

    hello,
    My SQL query is joining a DB view and a Command(=ad hoc query).
    Nonetheless from the results it appears that CR didn't join the views correctly, it returns a cartesian product.
    Any idea what the issue could be, I'm using very simple queries.
    Thanks in advance

    #1  make sure you are linking everything together properly in the "Links" tab of the Database Expert
    #2  In my experience, it's just a bad idea to join SQL commands and other tables.  I had poor performance issues in my case.  (It prevents server side filtering and grouping)  My suggestion is to write out the entire thing in the command.  If you are pulling from multiple database, write a separate command for each database and link them.

  • TS3991 I organazied my contacts by the address of my tenants. I just joined to Icloud and I am not able to find my tenants in the directory in the computer at all. I could search when I am using my phone but they do not show at first.how can correct this?

    I am a landlord and I organazied my contacts by the address of my tenants. I just joined to Icloud and I am not able to find my tenants in the directory in the computer at all. I could search when I am using my phone but they do not show at first.how can correct this? as an example 37 31 1 and when i type this nothing is showing.

    I am a landlord and I organazied my contacts by the address of my tenants. I just joined to Icloud and I am not able to find my tenants in the directory in the computer at all. I could search when I am using my phone but they do not show at first.how can correct this? as an example 37 31 1 and when i type this nothing is showing.

Maybe you are looking for

  • BasicTx and BasicRx daughter boards compatibility with USRP2920 and LabView

    I want to know that BasicTx and Basic Rx daughter boards from Ettus research are compatible with USRP2920 and Labview or not. Also do these boards supports variable gain or not? Please confirm  Thanks JK Solved! Go to Solution.

  • No pictures in Versamail

    My emails show no pictures in Versamail.  I have HTML checked.  Has anyone had this problem? Post relates to: Treo 700p (Verizon)

  • 10.4.7 and Mail Attachment problem

    The 10.4.7 update has caused major problems for me, on several different Macs. When I send an email to a Windows user, they tell me that the attachment didn´t come through. I had this problem with some Outlook users before, but now it seems to affect

  • Problems when printing Report in Windows XP

    Hello Guys, I have a report that works normally in Windows 7, then I installed the Report in a Client Machine with Windows XP System Operation but when he try to print the report, the letters show totally crazy like a japonese letter. Wait for answer

  • Compatibility Mode

    Hi I have a Dell 8200 desktop with pentium 4 1.8 ghz 256mb ram and 64mb nvidia gforce2 80gb drive. When I start up itunes 7.0 I get a message box that tells me that my itunesexe is set up on a slower version of windows. Turn off the compatibility mod