SQL trace only on a single node of RAC

Hello

I try to do a SQL Trace...

But if I activate the Trace, only the first node is drawn. But I want to find the second node.

I tried things a.

exec dbms_monitor. DATABASE_TRACE_ENABLE (instance_name = > 'C2DB06S1I2');

or

ALTER SYSTEM SET sql_trace = TRUE SCOPE = memory sid ='* ';

or

ALTER SYSTEM SET sql_trace = TRUE SCOPE = memory sid = "c2db06s1i2";

But there is no Tracefiles or Tracefiles are only on the first node.

We use the Oracle on Oracle Linux 6.3 11.2.0.3 database

BECAUSE with two nodes

Any ideas?

Thanks for your help

Jens

Hello

Thanks for all your replies.

Everything is fine. Oracle has done right.

I was stupid to realize that I was in the right folder.

On the second node, I looked in the diag_dest to a different database.

Thank you

Jens

Tags: Database

Similar Questions

  • Scan IP is configured only in a single node

    Hello

    I configure Oracle 11 GR 2 (11.2.0.1) RAC in my VMware. When I checked the listener to ip and CT scan it shows that it is only set in 2nd node to the first node. The nslookup command works fine as indicated below, and when I checked the srvctl status scan_listener and scan of srvctl status it shows that it is running only in the second node. I checked in a few places where the srvctl status scan_listener and scan srvctl status command shows output of all nodes. Can anyone help me on what could be the problem or how to configure the ip address scan and scan listener in 1 node.

    *********************

    file/etc/hosts

    *********************

    # Do not remove the next line, or various programs

    # requiring a network functionality will fail.

    127.0.0.1 localhost.localdomain localhost

    #: 1 localhost6.localdomain6 localhost6

    #public

    192.168.32.142 brand mark.oracle.com

    192.168.32.152 nike.oracle.com nike

    #private

    10.0.0.56 brand brand - prv.oracle.com - prv

    10.0.0.57 prv.oracle.com nike nike-prv

    #vip

    192.168.32.20 brand brand - vip.oracle.com - vip

    192.168.32.21 vip.oracle.com nike nike-vip

    #scan

    192.168.32.153 db1 - scan.oracle.com db1-scan

    192.168.32.154 db1 - scan.oracle.com db1-scan

    192.168.32.155 db1 - scan.oracle.com db1-scan

    ****************************************

    srvctl command output

    ***************************************

    [oracle@nike bin] $. / srvctl status scan_listener

    LISTENER_SCAN1 listener to SCAN is enabled

    SCAN LISTENER_SCAN1 listener is running on the node nike

    [oracle@nike bin] $. / srvctl scan status

    VIP scan1 SCAN is enabled

    VIP SCAN scan1 runs on the nike node

    ***********************************

    NS lookup command output

    ***********************************

    [oracle@mark bin] $ nslookup db1-scan

    Server: 192.168.32.142

    Address: 192.168.32.142 #53

    Name: db1-scan

    Address: 192.168.32.155

    Name: db1-scan

    Address: 192.168.32.153

    Name: db1-scan

    Address: 192.168.32.154

    [oracle@mark bin] $

    [oracle@mark bin] $

    [oracle@mark bin] $ nslookup db1-scan

    Server: 192.168.32.142

    Address: 192.168.32.142 #53

    Name: db1-scan

    Address: 192.168.32.153

    Name: db1-scan

    Address: 192.168.32.154

    Name: db1-scan

    Address: 192.168.32.155

    [oracle@mark bin] $

    [oracle@mark bin] $ nslookup db1-scan

    Server: 192.168.32.142

    Address: 192.168.32.142 #53

    Name: db1-scan

    Address: 192.168.32.154

    Name: db1-scan

    Address: 192.168.32.155

    Name: db1-scan

    Address: 192.168.32.153

    ****************************************************************************************

    Kind regards

    007

    Hello

    This is the behavior expected if you use the file/etc/hosts instead of DNS/GNS. It is documented on the note ' RAC: frequently asked Questions (Doc ID 220970.1).

    If you want to have more than one listener to scan, and then start using DNS for name of scanning resolution.

    Kind regards.

    Nelson

  • with RMAN to create ensures only one instance of node 2 rac

    Any advice on the RMAN command to take a rman full catalog not saving a rac two node 11 GR 2 and use it to create the single instance of the day BEFORE.

    The two-node RAC instance is in ASM (Linux)
    The physics of the day before is Normal (Linux) file system

    The command I get from Metalink suggests:
    RMAN target sys/passwd@primary catalog RMAN/RMAN@RMAN auxiliary sys/passwd
    RMAN > run {}
    allocate auxiliary channel C1 device type disk;
    target database duplicate for standby;
    }

    When I took the rman backup I did not catalog. Please suggest how to accomplish the same task without a catalog. Thank you

    ORA-19870: error while restoring the backup +FRA/kemetrac/autobackup/2012_01_15/s_772671393.343.7 piece
    Cannot open file + FRA/kemetrac/autobackup/2012_01_15/s_772671393.343.
    There is no such thing as "FRA".

    This isn't a connectivity problem. This error indicates that there is no such thing as the required backup file.

    First of all, it looks like you do a double normal to RMAN. In order to follow this, you should take backup of the primary database before and later, copy it to the standby server and mention the exact path in the db_file_name_convert and log_file_name_convert database settings waiting.

    You can see MOS * no step-by-step Guide to creating a physical document Eve on Normal file system for ASM primary with RMAN [838828.1 ID] *.

    Second, since you are on 11.2, you can make use of the active database feature of Oracle 11 g 2, which does not require you to initially last backup of the primary database create standby database.

  • Routing connections via a single node in a cluster 2 node RAC

    Hello world

    My client has the following requirement: a RAC cluster active/active (for example/node1 node2), but with only one of the nodes being used (node1) and the other sitting there just in case.

    For things like services, I'm sure it's pretty simple - just have the value preferred on node1 and available on node 2.

    For connections, I guess I'd just the VIP in order in the file of tns, but with LOAD_BALANCING = OFF, so they go through tns entries in the order (ie the node 1 and node 2), then this would allow even the vip failover if node 1 is out of service.

    What sounds right? Did I miss something?

    Thank you very much
    ORS

    user573914 wrote:

    My client has the following requirement: a RAC cluster active/active (for example/node1 node2), but with only one of the nodes being used (node1) and the other sitting there just in case.

    Why? What is the reason for a node ' + just in case + '- and how and when is "turned on" when this situation of just-in-case?

    It is not much any sort of sense of sight high availability or redundancy.

    For connections, I guess I'd just the VIP in order in the file of tns, but with LOAD_BALANCING = OFF, so they go through tns entries in the order (ie the node 1 and node 2), then this would allow even the vip failover if node 1 is out of service.

    What sounds right? Did I miss something?

    Does not work on 10g - may not work on 11g. The listener can and don't transfer connections, according to what say the TNS connect string. If you do connect not via a SID entry but through a SERVICE entrance, and this service is available on several nodes, you can't (and won't often) be connected to instantiate on only one IP address that you have used in your connection to TNS.

    Basic example:

    // note that this TEST-RAC alias refers to a single specific IP of a cluster, and use
    // SERVICE_NAME as the request
    /home/billy> tnsping test-rac
    
    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 18-JAN-2011 09:06:33
    
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    
    Used parameter files:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/sqlnet.ora
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS=(PROTOCOL=TCP)(HOST= 196.1.83.116)(PORT=1521)) (LOAD_BALANCE=no) (CONNECT_DATA=(SERVER=shared)(SERVICE_NAME=myservicename)))
    OK (50 msec)
    
    // now connecting to the cluster using this TEST-RAC TNS alias - and despite we listing a single
    // IP in our TNS connection, we are handed off to a different RAC node (as the service is available
    // on all nodes)
    // and this also happens despite our TNS connection explicitly requesting no load balancing
    /home/billy> sqlplus scott/tiger@test-rac
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 18 09:06:38 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options
    
    SQL> !lsof -n -p $PPID | grep TCP
    sqlplus 5432 billy    8u  IPv4 2199967      0t0     TCP 10.251.93.58:33220->196.1.83.127:37031 (ESTABLISHED)
    
    SQL> 
    

    So we have connected to the node RAC 196.1.83.116 - and this listener we handed over to node RAC 196.1.83.127. The GR 11 2 earpiece seems to behave differently - it does not have a transfer of work (based on a quick test, I did on a RAC 11.2.0.1) in the above scenario.

    This question-how do you deal with just-in-case situation? How do you get the clients to connect to node 2 when node 1 is out of service? Do you rely on the virtual IP address of the node 1 be set on node 2? It's a safe and 100% guaranteed method?

    It may take a while (minutes, maybe more) for an address virtual IP switch to another node. Meanwhile, any client using this virtual IP address connection will fail. Is this acceptable?

    I don't know - I don't like this concept of your customer to treat the RAC nodes as a sort of database waiting for a situation of just-in-case . I don't see any logic in this approach.

  • Problem with subscribing to a single node through Server API

    Hello

    I use your <>- server API to subscribe to a node in the collection.  I want only the updates for a particular node, so I'm including that in the call to subscribeCollection.  However, I unexpectedly get updates for all other nodes in the node collection.

    My call looks like this (in Ruby):

    am.subscribeCollection ("'room', 'UserManager', ' UserList")

    In the low-COST airlines server code, this translates a URL that includes the following in the query string:

    ... & collection = UserManager & node = UserList...

    My questions are:

    (1) just to double check, is the 'node' the correct parameter on the query string? (I wanted to just make sure that it isn't something like "nodeNames" instead since that is what is used in the ActionScript API).

    (2) is there anything else I need to do to receive only UserList updated and does not receive many updates for all other nodes in the UserManager?

    Thank you.  Kind regards

    -Trace

    To subscribe to a single node is currently not implemented in the back. The language he exhibited at the front end, but the value is ignored.

    I suggest that you extend your "receiver" class to ignore the values of the nodes, you don't care.

  • too many return values for a single node

    I have a table with two columns

    the table structure
    ----------------------
    string school_name type
    xmltype obj_xml

    Row1
    ----------
    abc_school,
    < student >
    < student >
    < id > 101 / < ID >
    < teacher > CBA < / teacher >
    < / student >
    < student >
    < id > 102 / < ID >
    XYZ < teacher > < / teacher >
    ONP < teacher > < / teacher >
    RSM < teacher > < / teacher >
    < / student >
    < / students >

    row2
    -----------
    def_school,
    < student >
    < student >
    < id > 301 / < ID >
    pqr < teacher > < / teacher >
    < / student >
    < student >
    < id > 302 / < ID >
    XYZ < teacher > < / teacher >
    < / student >
    < / students >


    is it possible to display data in the format using a query oracle below.
    ---------------------------------------------------------------------------------------------------
    teacher id school_name
    --------------------- ------- ------------
    abc_school 101 abc
    abc_school 102 xyz
    abc_school 102 onp
    RSM abc_school 102


    I used the slot request, throwing an error - too many return values for a single node

    SELECT school_name, teacher
    ExtractValue (value (x), ' / / key ') like student_id
    extractValue (value (x), ' / / value ') AS teacher
    SCHOOL t,.
    TABLE)
    XMLSequence (extract (obj_xml, ' / students/pupils '))
    ) x

    Please post How can I modify this query, the teacher tags may vary for each student

    Published by: user7955917 on May 8, 2012 04:00

    As mentioned in your other thread today, it would be helpful if you could post your exact version of db.
    Samples of work would be appreciated too, the XML data, you gave are not correct.

    I would do it with two XMLTables, like this:

    SQL> SELECT school_name
      2       , x1.id
      3       , x2.teacher
      4  FROM school t
      5     , XMLTable('/students/student'
      6         passing t.obj_xml
      7         columns id       number   path 'id'
      8               , teachers xmltype  path 'teacher'
      9       ) x1
     10     , XMLTable('/teacher'
     11         passing x1.teachers
     12         columns teacher  varchar2(30) path '.'
     13       ) x2
     14  ;
    
    SCHOOL_NAME                            ID TEACHER
    ------------------------------ ---------- ------------------------------
    abc_school                            101 abc
    abc_school                            102 xyz
    abc_school                            102 onp
    abc_school                            102 rsm
    def_school                            301 pqr
    def_school                            302 xyz
    
    6 rows selected
     
    
  • XML - ORA-19025: EXTRACTVALUE returns the value of a single node

    Hello

    I'm new to XML DB. Can someone help me with the below XML

    I use the following XML... (I pasted a part only of it coz I need data only up to this article)

    XML
    --------------------

    <? XML version = "1.0" encoding = "UTF-8"? > < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-."
    example"container ="http://www.w3.org/2001/XMLSchema"> < SOAP - ENV:Body >
    < ns:PicklistWS_GetPicklistValues_Output xmlns:ns = "urn: crmondemand/ws/list dropdown /" >
    < ListOfParentPicklistValue xmlns = "urn: / xml/crmondemand/list of choices" >
    < ParentPicklistValue >
    < language > ENU < / language >
    < ParentFieldName > plProduct_Team < / ParentFieldName >
    < ParentDisplayValue > Marketing On Demand < / ParentDisplayValue >
    < ParentCode > Marketing On Demand < / ParentCode >
    < Disabled > N < / disabled >
    < ListOfPicklistValue >
    < PicklistValue >
    Escalation of OCP/SME < code > < code >
    Escalation of OCP/SME < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >
    < PicklistValue >
    Ask fusion < code > < code >
    Merge request < DisplayValue > < / DisplayValue >
    < Disabled > N < / disabled >
    < / PicklistValue >



    Code
    ---------




    SELECT distinct
    EXTRACTVALUE (value (SR), ' / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code ','xmlns = "urn: / crmondemand/xml/list of choices"') AS display.
    Return EXTRACTVALUE (value (SR),'/ ParentPicklistValue/ListOfPicklistValue/PicklistValue/DisplayValue ',' xmlns = "urn: / crmondemand/XML/picklist"'),.
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentDisplayValue','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_display,
    EXTRACTVALUE (value (SR), '/ ParentPicklistValue/ParentCode','xmlns = "urn: / crmondemand/XML/picklist"') AS parent_return
    TABLE (XMLSEQUENCE ((EXCERPT)
    WEB_SERVICE (' <? xml version = "1.0" encoding = "UTF - 8" standalone = "no"? > < envelope soap: xmlns:soap = "http://schemas.xmlsoap.org/soap/envelope/")
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >
    < soap: Body >
    < PicklistWS_GetPicklistValues_Input xmlns = "urn: crmondemand/ws/list dropdown /" >
    Type < FieldName > < / FieldName >
    Service request < RecordType > < / RecordType >
    < / PicklistWS_GetPicklistValues_Input >
    < / soap: Body >
    "< / envelope soap: >.
    (' document / urn: crmondemand/ws/list dropdown /: ' GetPicklistValues, Id_de_la_session).
    "/: soap envelope / soap: Body / * / * / * ',' xmlns:soap ="(http://schemas.xmlsoap.org/soap/envelope/'))) SR "


    ERROR
    ---------

    ORA-19025: EXTRACTVALUE returns the value of a single node


    UNDERSTANDING
    ---------------------------

    As my Xpath only points until the node - ParentPicklistValue and not the child nodes under it. That's why, when I try to interview the child nodes - / ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code, I get the error mentioned above.

    REQUIREMENT
    -----------------------

    Can someone help me to receive the values of the mother and child values based on xml and query above.

    Hello

    It's a classic ;)

    You need a second XMLSequence who shreds the collection of PicklistValue in relational lines:

    select extractvalue(value(sr2), '/PicklistValue/Code', 'xmlns="urn:/crmondemand/xml/picklist"') AS Display
         , extractvalue(value(sr2), '/PicklistValue/DisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS Return
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentDisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_display
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentCode', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    from table(
           xmlsequence(
             extract( WEB_SERVICE( ... )
                    , '/soap:Envelope/soap:Body/ns:PicklistWS_GetPicklistValues_Output/ListOfParentPicklistValue/ParentPicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"
                       xmlns:ns="urn:crmondemand/ws/picklist/"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' )
           )
         ) sr1
       , table(
           xmlsequence(
             extract( value(sr1)
                    , '/ParentPicklistValue/ListOfPicklistValue/PicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"' )
           )
         ) sr2
    ;
    

    What is your version of the database BTW?
    10.2 and upward, you can use the XMLTable.

  • 11g Question: Stand alone database vs single node cluster

    We are about to create a new 11.2.0.3 database that will eventually become a 11.2.0.3 in cluster database. Our host servers are hardware IBM pSeries AIX 6.1 running. We will use just Oracle Clusterware and not IBM HACMP. We also plan to use ASM for database storage. The plan is ultimately to have a 2 or a 3-node cluster, but currently, we have only an AIX server available to us.

    My question concerns our initial approach to the installation.

    It is preferable to install the Oracle database as a stand-alone database first and then convert the database to a RAC cluster as soon as we have the material for the second node? Or would it be better to create the cluster with a single node and install and configure grid Clusterware for a single node cluster and then add the second node when the material becomes available?

    I apologize if my explanation is not very clear. Any notice will be considered and appreciated. Thank you.

    Hello

    We are about to create a new 11.2.0.3 database that will eventually become a 11.2.0.3 in cluster database. Our host servers are hardware IBM pSeries AIX 6.1 running. We will use just Oracle Clusterware and not IBM HACMP. We also plan to use ASM for database storage. The plan is ultimately to have a 2 or a 3-node cluster, but currently, we have only an AIX server available to us.

    My question concerns our initial approach to the installation.

    It is preferable to install the Oracle database as a stand-alone database first and then convert the database to a RAC cluster as soon as we have the material for the second node? Or would it be better to create the cluster with a single node and install and configure grid Clusterware for a single node cluster and then add the second node when the material becomes available?

    If you are planning to ACTIVE/PASSIVE here database my option:
    {message: id = 10138477}

    If you are planning in the future use a RAC database:
    {message: id = 10142640}

    If you plan use CARS in the future, you can install Oracle Clusterware without worry about licenses.
    Oracle Clusterware can serve to protect any application (reboot or otherwise on the application failure), free of charge, if one or more of the following conditions are met:

  • At least one of the servers in the cluster is allowed for the Oracle database (SE or EE)
    http://docs.Oracle.com/CD/E11882_01/license.112/e10594/editions.htm#CJAHFHBJ

    If you ARE database Oracle or EA (i.e., not one SE), you can install the product Oracle Clusterware and Oracle RAC (EE to buy the RAC Option) in a node later you can stretch clusterware adding additional nodes, and more database instance.

    You do not need to create a RAC database, you can create a single database (i.e. Non-RAC) on OH software Oracle RAC using DBCA.

    Although I prefer that you create a database of CAR Policy-Managed database... which makes the dynamics and the automatic (i.e. managed by Clusterware) creation/deletion of instances. You will use a POOL with a knot... later you can add more nodes in that POOL... Oracle Clusterware/PAP automatically create undo/redo/instances on the new nodes added to this POOL.
    All this is transparent to your customers of Oracle.

    Oracle Grid Infrastructure for a stand-alone server (Oracle Restart) is an option only if you plan used to one node. If you are using more than one node... Start with Oracle Grid Infrastructure for a Cluster (Oracle Clusterware).

    Hope this helps,
    Levi Pereira

    Published by: Levi Pereira on March 12, 2012 13:58

  • Install a network infrastructure for a single-node Windows Server cluster

    Hello

    Can you suggest me how to install a single-node RAC Oracle 11 g on a Windows Server 2008 x 64-bit? It's for testing purposes and I do not need two nodes. I know that Linux is better, but my company uses only Windows servers. Our former consultant has been able to do, but doesn't tell us how to, this server has been lost.

    I know that to install the first grid Infrastructure. Run the installation program "Oracle Grid Infrastructure", I could install a "Grid Infrastructure for a stand-alone server" successfully. But this Grill is not a RAC database. When you try to install the database software, which is available to me to install only "single-instance database", not "Real Application Cluster installation".

    Run the installation program "Oracle Grid Infrastructure", I have tried select the option:
    'Install and configure a Cluster Network Infrastructure'-> typical Installation:
    The name of the SCAN: SRVORAC-cluster
    Validation of ANALYSIS information
    INS-40922 SCAN invalid name - insoluble in IP address.

    Is it possible to install a network infrastructure for a cluster to a single node or a node on Windows Server?

    Published by: user521219 on January 30, 2012 12:46

    Hello
    You probably misunderstanding about single-node RAC. This feature didn't need that you have only one physical machine in a RAC, this in fact means that in a CCR environment (2 or more nodes), you can run your database on a single node (single instance), and then later you can move this single instance to another node of the RAC (so that you can make some fixes on this node making your database available all the time). It also has a few other advantages, see below.

    http://www.Oracle.com/technetwork/database/clustering/overview/UG-raconenode-2009-130760.PDF

    http://docs.Oracle.com/CD/E11882_01/install.112/e25666/whatsnew.htm#sthref8

    Salman

  • stop the cluster, database and the listener on the single node

    Salvation of DBA

    Database: 11.2.0.1
    Operating system: Solaris 10
    The RAC configuration: Multi node.

    I want to stop cluster on one node only, which query to use stop single node cluster?

    Concerning
    SG

    I want to stop cluster on one node only, which query to use stop single node cluster?

    To stop the battery Oracle Clusterware on a particular server:

    # crsctl stop cluster - n

    http://download.Oracle.com/docs/CD/E11882_01/RAC.112/e16794/crsref.htm#CHEHGGAA
    http://download.Oracle.com/docs/CD/E11882_01/RAC.112/e16795/srvctladmin.htm#i1009416

    Thank you
    Hussein

  • The vi below opens a new data file every time new data of the visa arrived. I only want a single file of data for registration period!

    The vi below opens a new data file every time new data of the visa arrived. I only want a single file of data for registration period!

    Can someone bring me (Labview is new to me) in the right direction?

    John

    See attached the amendment. I made a change to my suggestions and possess the top-level VI for the null refnum. See if it makes sense.

  • HP LaserJet Pro CM1415: Printer will only print a single document. Bloggy queue and I need to restart the computer to print

    Printer will only print a single document. Bloggy queue and I have to restart my computer to print more than a single and repeat for each print job... very annoying. She's been doing this for printing the PDF, chrome, Word document, etc.

    Hello.

    Please, try the suggestions you find here:

    http://support.HP.com/us-en/document/c022054777

    Dovid

  • SQL trace

    Hello

    I know how to generate sql trace of user session that follows.

    SQL > ALTER SESSION SET EVENTS 10046 trace name forever, context level 12';

    SQL > alter session set tracefile_identifier = "xyz";

    I want to know how to generate sql trace system (or any other account) from different machine when working some of the user databases with SQL and PLSQL on another computer and access the database.

    concerning

    EXEC DBMS_SYSTEM.set_sql_trace_in_session (211, 23084, TRUE);

    EXEC DBMS_SYSTEM.set_ev (211, 23084, 10046, 12, 'test');

    You do not use both.  Use set_sql_trace_in_session (preferred) or set_ev (not officially supported).

    But I want to find other user sessions.

    Yes, an account with EXECUTE on DBMS_SYSTEM (for example with the DBA role) can use dbms_system.set_sql_trace_in_session to enable tracing to another session.

    Note that the name of the trace file is by processID of BONES of the dedicated server process (i.e. the SPID in V$ PROCESS for this session)

    Hemant K Collette

  • SQL query to retrieve a single record for each employee of the following table?

    Hi all

    Help me on the writing of SQL query to retrieve a single record for each employee of the following table? preferably a standard SQL.

    CREATE TABLE xxc_contact)

    empnum NUMBER,

    alternatecontact VARCHAR2 (100),

    relationship VARCHAR2 (10),

    phtype VARCHAR2 (10),

    Phone NUMBER

    );

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Work', 8888888888)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Work', 7777777777)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Home', 3333333333)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Home', 9999999999)

    expected result:

    EmpNum AlternateContact Relationship PhType Phone       

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Thanks in advance.

    994122 wrote:

    Thank you all, that I got a result

    http://www.orafaq.com/Forum/m/620305/#msg_620305

    By Lalit Kumar B...

    Specifically, the two simple solutions provided were:

    1 using the row_number, entitled Oracle ranking based on descending order of the inside telephone each empnum group. And finally selects the lines which has least rank (of least since that order is descending for phone).

    SQL > column alternatecontact format A20;

    SQL >

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 from (SELECT a.*, row_number() over r (PARTITION BY empnum ORDER BY phone / / DESC))

    3 FROM xxc_contact one)

    4. WHEN r = 1

    /

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

    ---------- -------------------- ---------- ---------- ----------

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    2. with the help of MAX, Oracle automatically assigns the maximum phone for all the rows in each group of empnum. And finally selects the rows with the maximum phone. Order by clause is omitted here intentionally. You can find out why.

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 (SELECT a.*, MAX (phone) over (PARTITION BY empnum) rn FROM xxc_contact one)

    3 WHERE phone = rn

    4.

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

    ---------- -------------------- ---------- ---------- ----------

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Kind regards

    Lalit

  • CARS on a single node

    Hello

    y at - it an option to install oracle on a single node grid infrastructure?

    just like a knot of oracle database

    Once you have a second node stretch cluster at 2 knots and perhaps move the database on the other node?

    or even go for complete cluster 2 nodes?

    your help is appreciated

    You are welcome!

    Please mark as answered your thread for much of forums!

    Concerning

    Mr. Mahir Quluzade

Maybe you are looking for