How to find the sid, serial # for sql in v$ sqlarea

Hello

10 gr 2
in order to dig the session that runs particular sql
say querying v$ sqlarea and get sql_id
now how to map at the session of v$

Look at the v$ active_session_history and dba_hist_sqltext and you should be able to find what you are looking for, if you have the possibility of using these views.

Tags: Database

Similar Questions

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • How to find the audio driver for HP sleekbook

    Can not find the audio driver for my HP laptop...

    I bought the new elegant book, model no HP. Elegant Pavilion book 15th-b001

    After 2-3 months, I found my laptop speakers weren't working and its got very slow. I couldn't do so I kept using headphones.
    recently, I've run the driverpack and accidentally a few update audio driver and voice my laptop has increased incredibly, I was surprised, it was very good,

    but now, I've updated my windows 8 to 10 and all the previous driver deleted and voice became too slow as it used to be.,.
    now I run the driverpack 15 which is a more up-to-date version, but they did not update this driver, and always the voice of my laptop is too slow.
    I don't know the exact name of that drivers, how do I know the name of that drivers?
    on the internet, I tried too many drivers audio, high definition, etc., but the result is zero,
    con someone help me about this?

    http://ftp.HP.com/pub/SoftPaq/sp59501-60000/sp59802.exe

  • How to find the latest diagnostics for 11i patches

    How to find the latest patches of diagnostics for 11i, all documents.

    You can find the latest patch in (Note: 167000.1 - Guide of Installation of E-Business Suite Diagnostics).

    You can also check (Note: 235307.1 - E-Business Suite Diagnostics Tools FAQ and Troubleshooting Guide for version 11i and R12).

    Thank you
    Hussein

  • NB200 - how to find the 3G module for it?

    Hello

    Pls how I find the 3G module in my NB200 - PLL20E?

    Thank you

    Hello

    What do you mean exactly?
    You want to upgrade your NB200 with a card 3G?

    If yes then you must make sure that your NB200 could be improved using this card.
    I'm not sure if this is possible.

    But don t give up boyfriend Toshiba authorized service partner in your country could provide details.
    Guys might be able to tell if this is possible and could provide a good 3G module

    If you get more details please share with us!

    See you soon

  • How to find the SID for DB Oracle 11g

    Someone installed a new database of Oracle 11 g on my machine. Now I'm opening "SQL Developer" and it asks username, password and sid. I don't know what is the SID for my case. How I know that?

    2827706 wrote:

    The guy is not available.

    I checked the list of services in my machine. There is no service windows in my system named OracleService

    You mention that you are using Windows, but if you are and that you have installed the oracle database software and NO service like OracleService , then you do not have a database. But then, why the hell you you ask about this? If you do not want the database software, why don't you just go ahead and uninstall it? And how is it, someone can come and something on your server and have no idea about it?

    Aman...

  • How to install the driver jdbc for sql server 2005 in sql developer 4.0?


    Hallo all

    I need to access the tables in a MS SQL Server 2005 database.

    The JDBC driver is possible.

    How to install this driver?

    Thanks a lot for your messages.

    Hello

    It's the documentation-

    Database: third-party JDBC Drivers

    The component drivers JDBC third party specifies drivers to use for connections to the third-party databases (non-Oracle), such as IBM DB2, MySQL, Microsoft SQL Server or Sybase Adaptive Server. (You don't need to add a driver for connections to Microsoft Access databases.) To add a driver, click Add an entry and select the path for the driver:

    For Microsoft SQL Server or Sybase Adaptive Server: jtds - 1.2.jar, which is included in the download of jtds - 1.2 - dist.zip

    To find a specific third-party driver, visit the appropriate site (for example, http://www.mysql.com for MySQL Connector/J JDBC driver for MySQL, http://jtds.sourceforge.net/ for the for Microsoft SQL Server and Sybase Adaptive Server jTDS driver, or search for Teradata JDBC driver to http://www.teradata.com/ ). For MySQL, use the driver in MySQL 5.0 not 5.1 or a later version with the version of SQL Developer 1.5.

    You must specify a third-party driver or install a driver using the check for updates feature before you can create a connection to a database to third parties of the associated type. (See the tabs to create connections to the databases of third parties in the Create/Edit/Select database connection dialog box).

    Alternative:

    As an alternative to the use of this preference, you can click Help, and then search for the updates install the for Microsoft SQL Server JTDS JDBC driver and the driver of JDBE of MySQL as extensions.

    Kind regards

    Mike

  • How to find the rank lowest for each student using a Select query?

    Hey I'm having a little trouble here

    I have this table


    Student - Grade

    John - 8
    Richard - 9
    Louis - 9
    Francis - 5
    John - 13
    Richard - 10
    Peter - 12

    Shades may vary from 0 to 20.

    Name - varchar (50)
    Grade - wide

    I'm trying to generate a SQL search to search for each rank lowest for each student.

    So far, I did:

    Select s.name, s.grade
    s student
    where s.grade = (select min (grade) of student)

    The result of this search returns me only the rank lowest of all ranks posted above, which is Francis - 5.

    I want to find the lowest rank, but not only for Francis, but for all students in the table.

    How do I do that?

    Thank you in advance.

    Ok

    Now we head into analytical SQL:

    with student as (select 'John' name, 8 grade, 'fail' result from dual union all
                     select 'John' name, 13 grade, 'pass' result from dual union all
                     select 'Francis',     5 grade,  'fail' from dual union all
                     select 'Peter', 12, 'pass' from dual)
    -- End of your test data
    SELECT   name,
             MAX (result) KEEP (DENSE_RANK FIRST ORDER BY grade) result,
             MIN (grade) min_grade
    FROM     student
    GROUP BY name
    

    Please note that I passed ;)

    Concerning
    Peter

    To learn more:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions056.htm#SQLRF00641

  • How to find the product key for pre-installed WIndows 7 Home Premium?

    I bought a laptop that was provided with Windows Home pre-installed permium.

    How can I load Windows once more, because I don't have the key? How can I find the key on my laptop?

    Look for the COA sticker, normally at the bottom or in the battery compartment:

    COA certificate of authenticity:

    http://www.Microsoft.com/howtotell/content.aspx?PG=COA

    What is the certificate of authenticity for Windows?

    http://Windows.Microsoft.com/en-us/Windows7/what-is-the-Windows-certificate-of-authenticity

  • How to find the best log of SQL in the responses of the OBI?

    While I have an error by a request of the OBI in answers page, the error message in the result tab is usually not very useful, as:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27005] Unresolved column: "Sales Facts Current Month"."Amount Sold (000) Current Month". (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Sales Facts Current Month"."Amount Sold (000) Current Month", "Sales Facts"."Amount Sold", Calendar."Calendar Month Desc", Calendar."Calendar Month Name", Products."Prod Category" FROM SH')}
    
    SQL Issued: SELECT "Sales Facts Current Month"."Amount Sold (000) Current Month", "Sales Facts"."Amount Sold", Calendar."Calendar Month Desc", Calendar."Calendar Month Name", Products."Prod Category" FROM SH
    I then go to the Session Monitor and click the view log. By doing so, sometimes, I got the complete sql statement. It is good and I can understand the problems. Sometimes, I have things like:
    -------------------- SQL Request:
    SET VARIABLE QUERY_SRC_CD='Report',SAW_SRC_PATH='/shared/sh/Learn';SELECT Times."Calendar Month Name" saw_0, Times."Calendar Month Desc" saw_1, Products."Prod Category" saw_2, Salesfacts."Amount Sold" saw_3, REPORT_SUM(saw_3 BY saw_0, saw_1), REPORT_SUM(saw_3 BY ) FROM SH WHERE (TOPN(Times."Calendar Month Id",40) <= 40) AND (Channels."Channel Desc" = 'Direct Sales') ORDER BY saw_1, saw_0, saw_2
    
    +++Administrator:13290000:1329000f:----2009/09/29 09:18:33
    -------------------- General Query Info:
    Repository: Star, Subject Area: SH, Presentation: SH
    +++Administrator:13290000:1329000f:----2009/09/29 09:18:33
    -------------------- Cache Hit on query:
    Matching Query:     SET VARIABLE QUERY_SRC_CD='Report';SELECT Times."Calendar Month Name" saw_0, Times."Calendar Month Desc" saw_1, Products."Prod Category" saw_2, Salesfacts."Amount Sold" saw_3 FROM SH WHERE (TOPN(Times."Calendar Month Id",40) <= 40) AND (Channels."Channel Desc" = 'Direct Sales') ORDER BY saw_0, saw_1, saw_2
    Created by:     Administrator
    It is not enough that the selected tables are not entirely clear on. It appears like it find OBI the sql in the cache and process the request entirely.

    Is there a way I can force return OBI demand? Is there a way to get OBI newspaper the complete sql statement? This way I can copy the SQL to SQL * more and find exactly the problem

    Thank you.

    Physical SQL is not visible because it hits the cache.
    You can:
    (1) clear RPD physical cache and run the query again.
    or
    (2) copy the SQL logic, go to web Admin - number SQL - paste the SQL logic, then just change a setting or two, so it does not hit the cache. For example, to change a filter to Jan Feb... or just add a dummy column initially as select 1 or select 'a'... .rest of sql even.

    in this way, you can avoid hitting the cache and see the sql code (at the bottom of the results - view the journal)

    Make sure that you have enabled the option to cache presentation server and define the level of logging to 4 or more to see the details.

    HTH

  • How to find the exact motherboard for Satellite P100-347 model?

    Hello
    I hope someone could help me. I'm looking for a new motherboard for my computer toshiba laptop because it replaced needs.

    I own a laptop Satellite P100-347 of pspa6e-03302cen and have not been able to find this anywhere online forum. Although I found two suppliers of many motherboards of p100, they use numbers of alternative model in which I can't find anywhere in my documents or on the computer. The model numbers they use are something like A000008350 or a number starting with k. I'm sure that the supplier I found has the motherboard, I would need but I would need a list of all the numbers of the other party for my laptop, or a way to find the exact numbers. Any help on this is appreciated...
    Thank you

    To be honest I really don't think that someone here can offer you this info. As you know, this info is for internal use and you can try to get this info from service provider authorized in your country. Sorry, but I don't see a better solution, except to wait here and hope someone can help.

    Good luck!

  • How to find the license key for WINDOWS 8.1 which was preinstalled?

    I bought a Dell Inspiron laptop 14-5447 which has 8.1 pre-installed WINDOWS. I made a recovery disk, but I could not find anywhere license key. I don't need to have a license key, if I ever need to re - install the OS? How can I find the license key? Thank you

    The key is stored in THE system BIOS, and is read automatically during a re - install if necessary.  You can see the key using one of the utilities such as Belarc Advisor free system scan.

  • How to find the product key for a game online on Steam?

    I'm playing a game that connects to live on steam. He asked my windows product key which I didn't, but I discovered how to get without going through it. I got about 5 + programs for giving me my product key number anyway. But I always get an error message. I checked it more than 10 times. Still does not work. Is it possible for a person to miscrosoft to give me or I can call and they can give me?

    Hello Elias1724,

    Steam ask the product key for the game and not your product key for the Windows operating system.

    Where did you buy the game to install it?
    You bought the game on Steam? If so, then they would need the product key.
    Have you received an email with a link to download the game?

    It is not your Windows product key.

    Sincerely,

    Marilyn

  • How to find the versions supported for Internet Explorer

    Can someone tell me please how to find which versions of Internet Explorer are supported by versions of interactive reporting. I've been hitting my head against the wall, trying to find documentation that will give me this information. I'm not so interested in someone tell me the answer that I'm finding a way to get the answer.

    Any help much appreciated.

    Dave

    This depends on the version of IR

    You can see the http://www.oracle.com/technetwork/middleware/epm/documentation/index.html support matrix

    in the above url, select the EMP and find same support matrix.

  • How to find the user oracle for a planning application search

    Hello
    I know how to take backup but I dnt seem to remember the user that I created in oracle to the planning application and there are many users that there are many applications on the sytem, how to know which is the user for a particular planning application
    Thanks in advance

    I would of thought you would name a name of data source with the same name as the planning application, it makes it a lot easier, the naming scheme of names with the same name also keeps everything the same.
    If you can not link the name of the data source for the name planning then you will need to look at the system of planning and HSPSYS_DATASOURCE and HSPSYS_APPLICATION tables, this allows linking by ID.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

Maybe you are looking for