failure of the value of the node... very easy to 'replace' on an attribute

Hello

(Working on DBXML 2.5.13. on Windows Server 2003)

The next document in a container:

< xmlns = "carrapateira.info village" >
< quantity of images = "124" / >
< / village >

When you try to replace the value of the attribute 'quantity' with the dbxml shell, using the following commands:

dbXML > sending ' ' 'carrapateira.info '.
Link-> carrapateira.info

dbXML > cquery/village/photos
1 objects returned for eager expression "/ village/images".

dbXML > print
< xmlns = "images carrapateira.info" quantity = "124" / > "

dbXML > contextQ @quantity
1 objects returned for the expression '@quantity '.

dbXML > print
{amount = "124".

dbXML > contextQ 'replace the value of the node. with 222 "
stdin:7: contextQuery failed

I always get this last message, whatever I try.

What is fundamentally wrong in my approach? Or is it a problem of shell?

Thank you
Koen

Koen,

It's your query - you must cite the '222'

Kind regards
George

Tags: Database

Similar Questions

  • How to change the value of string clustered, to implement using the node value of property instead of writing directly on the flow of data or using the variable

    new to labview :-) and I have a problem when I want to change the value of a string in bunches, and I want to implement this using the node value of property instead of writing directly to the stream or by using the variable, enclosed is the picture.   No matter, I have change in cluster (control) or value of Popery out (indicator) cluster, the value (sensor 7) dataflow keeps unchanged even I gave the new value by value of property node. Thank you to give me some advice about this.

    Hi GerdW

    Thanks a lot for your answer. The reason I'm stubbornly tring to break the flow of DATA is: we have a test system that have about 100 screws, they have a few connected flow, some of them will be unbundling a cluster dataflow chain to check the value in order to make the different cases.  Now I want to insert user event by changing the control and influential cases during run time.

    As I initially uses a global variable (to control cases) instead of unbundle string data flow, it works well.  But then, I found there are a lot of screws that are using the string unbundle.  One of the 'lazy' means, I tried is to change the value via the property node (because that way, I did not need to find all the places where using the unbundle string and replace them with the global variable), then I noticed a problem with "dataflow", the value in the stream of cluster in fact will not be changed by changing the value of the property node.

    I did a test with VI simple (like the picture in last post), and after reading your advice, I tell myself that I need to understand the concept of "DATAFLOW" in labview, it seems that my "lazy" way can not work in this scenario.

    I have attached the criterion VI here, have you furthur suggestions on what I can do in this case?

    Mant thanks!

    Minyi

  • Read the nodes that have the same value as the subnodes - XML

    It is more of a general JAVA / XML problem, but given that it is going into my BlackBerry app I thought I'd see if anyone knows.

    Consider a simple XML document:

                        Whatever 1                   Whatever 2               Whatever 3       
    

    Using the standard org.w3c.dom, I can get the nodes in X by the practice...

    NodeList fullnodelist = doc.getElementsByTagName ("x");

    But if I want to go to the next set of 'e', I try to use something like...

    Element element = (Element) fullnodelist.item(0);NodeList nodes = pelement.getElementsByTagName("e");
    

    EXPECTED back '3' nodes (because there are 3 series of 'e'), but it returns '9' - because it gets all entries including the 'e' apperently.

    It would be nice in the above case, because I could probably go through and find what I'm looking for. The problem I have is that when the XML file looks like the following:

                whatever              Something Else                    whatever              Something Else            
    

    When I ask 'e' value, it returns 4, instead of (what I want) 2.

    I am simply not understand how DOM parsing works? Generally, in the past I used my own XML documents so I name never articles like this, but unfortunately this isn't my XML file and I don't have the choice to work like this.

    What I thought I would do, it is write a loop knots "drills down" so that I can combine each node...

      public static NodeList getNodeList(Element pelement, String find)
        {
            String[] nodesfind = Utilities.Split(find, "/");
            NodeList nodeList = null;
    
            for (int i = 0 ; i <= nodesfind.length - 1; i++ )
            {
                nodeList = pelement.getElementsByTagName( nodesfind[i] );
                pelement = (Element)nodeList.item(i);
            }
    
            // value of the nod we are looking for
            return nodeList;
        }
    

    .. While if adopted you ' s/e' in the service, he would return the 2 nodes I'm looking (or elements, perhaps I'm using the wrong terminology?). on the contrary, it returns all the 'e' nodes in this node.

    Anyway, if anyone is still with me and has a suggestion, it would be appreciated.

    Well, there is no doubt that there is a learning curve robust for XML programming. You can take an hour or two and go through one of the tutorials that are circulating on the net. (Like that of w3schools.com.)

    Basically, almost everything in XML is a node, the Document that returns the parser. The API for node tells you that you can test the node type you have by calling getNodeType, which returns one of the constants of type node (Node.ELEMENT_NODE, Node.TEXT_NODE, etc..) If necessary, you can then convert the variable to the corresponding interface (element, text, etc.).

    Similarly, the API documentation say you for any node, calling getChildNodes (or for an element node or Document getElementsByTagName) will give you a NodeList (a little non-types of nodes in the XML API), while calling getFirstChild and getNextSibling to any node will give you another node (or null ).

    Once you learn the API, writing logic of course is not all that hard. For example, if the only 'e' interest tags are those directly under the element root of the document (as shown in your example) you can simply go to them directly:

    Vector getTopENodes(Document doc) {  Vector vec = new Vector();  NodeList nodes = doc.getDocumentElement().getChildNodes();  int n = nodes.getLength();  for (int i = 0; i < n; ++i) {    Node node = nodes.item(i);    if (node.getNodeType() == Node.ELEMENT_NODE &&        "e".equals(node.getNodeName()))    {      vec.addElement(node);    }  }  return vec;}
    

    Note that this example does not assume that all children are nodes of element 'e '. the document could have comments, white space or something else that makes it into the DOM as comment, text or any other type of node.

    On the other hand, if you want to capture every "e" tag which is directly under the ' tag, no matter the level, then you need to do something a little more complicated (it's on the top of my head - no guarantee):

    static class NodeListImp implements NodeList {  private Vector nodes = new Vector();  public int getLength() {    return nodes.size();  }  public Node item(int index) {    return (Node) nodes.elementAt(index);  }  public add(Node node) {    nodes.addElement(node);  }}
    
    NodeList getTargetNodes(Document doc) {  NodeListImp list = new NodeListImp();  getTargetnodes(list, doc.getDocumentElement(), false);  return list;}
    
    void getTargetNodes(NodeListImp list, Node node, boolean parentIsS) {  if (node.getNodeType() == Node.ELEMENT_NODE) {    // node name is tag name for element nodes    String name = node.getNodeName();    if (parentIsS && "e".equals(name)) {      list.add(node);    }    parentIsS = "s".equals(name);    for (Node child = node.getFirstChild();         child != null;         child = child.getNextSibling())    {      getTargetNodes(list, child, parentIsS);    }  }}
    

    I hope that it gets the idea across.

  • [INS-32148] - the failure of executing the script "Install IM" on the nodes - RAC 12 c on Windows Server 2012

    I get this question during the Oracle 12 c Installer (Windows Server 2012) Network Infrastructure:

    [INS 32148] The execution of the script "Install IM" on the nodes failed: [node2]

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

    Action - review the log to the file "C:\Program Files\Oracle\Inventory\logs\installActions2016-02-16_02-19-24AM.log" and 'C:\App\12.1.0\grid\cfgtoollogs\crsconfig\rootcrs_ < nodename > _ < timestamp > .log' for more details if an error occurs.  More details

    Execution of the IM installation script is successful on the nodes: the GI run script install [nodeX1] is has failed on the nodes: [nodeX2] - PRCZ-2014 Exception details: cannot run the "C:\App\12.1.0\grid\crs\config\gridconfig.bat" command on the nodes 'nodeX2 '.

    The execution status of the node failed: nodeX2

    Errors

    : Using the configuration settings file: C:\App\12.1.0\grid\crs\install\crsconfig_params|2016/02/18 05:08:54 CLSRSC-4000: Oracle Trace File Analyzer (TFA) collector is not supported on this platform. | [0 m: 2016/02/18 05:08:59 CLSRSC-363: prerequisite user during installation ignorered |] [0 m | 5:09:04 > Started | 5:09:04 > arguments 2 | 5:09:04 > C:\App\12.1.0\grid\bin\crssetup.exe | 5:09:04 > installFence | 5:09:04 > WARNING: failed to remove imagePath, continues.] The operation completed successfully. | | 5:09:04 > return 0 x 02016/02/18 05:10:42 CLSRSC-507: the root script cannot continue on this nodeX2 node because node operations have not completed the nodeX1 node or there was an error in obtaining the status of the operations of the first node. | [0 m |] D. in C:\App\12.1.0\grid\crs\install/crsutils.pm line 3691.

    Standard output

    : Using the configuration settings file: C:\App\12.1.0\grid\crs\install\crsconfig_params2016/02/18 05:08:54 CLSRSC-4000: Oracle Trace File Analyzer (TFA) collector is not supported on this platform. [0 m 18/02/2016 05:08:59 CLSRSC-363: prerequisite ignorered user during installation [0 m 05:09:04 > started at 05:09:04 > arguments 2 05:09:04 > C:\App\12.1.0\grid\bin\crssetup.exe 05:09:04 > installFence 05:09:04 > WARNING: delete imagePath, continuous failed.]] The operation completed successfully. 05:09:04 > return 0 x 02016/02/18 05:10:42 CLSRSC-507: the root script cannot continue on this nodeX2 node because node operations have not completed the nodeX1 node or there was an error in obtaining the status of the operations of the first node.  [0 m died at C:\App\12.1.0\grid\crs\install/crsutils.pm line 3691.

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

    Anyone know?

    Thank you very much in advance

    Hello

    Why do you have the disks with different names and of different sizes?

    Node1:

    C:\Users\Administrator\Desktop\grid\asmtool>asmtool-Liste

    ORCLDISK1 \Device\Harddisk1\Partition1 51197 M

    ORCLDISKDATA0 \Device\Harddisk2\Partition1 M 30717

    ORCLDISK3 \Device\Harddisk3\Partition1 M 30717

    Node2:

    C:\Users\Administrator\Desktop\grid>asmtool-Liste

    ORCLDISK1 \Device\Harddisk1\Partition1 51197 M

    ORCLDISK2 \Device\Harddisk2\Partition1 M 51197

    ORCLDISK3 \Device\Harddisk3\Partition1 M 51197

    People should be equal disks are shared, aren't they?

    Kind regards

    Marco

  • Extract the value of the node with multiple namespace xml

    Hello

    I have to extract values in xml that includes several namepspaces. a single namespace has value of xmlns. I managed to get the value of the node for tag event where as info tag returns null.

    experrts need help.

    <? XML version = "1.0" encoding = "utf-8"? >

    < event xmlns = " " http://www.w3.org/2001/XMLSchema-instance ' >

    < data xmlns = ">

    < object >

    < eventtype > 110 < / eventtype >

    < result > < / result >

    < / object > < / data >

    < xmlns = info "> < jref > JREF < / jref >

    < / info >

    < / event >

    SELECT

    TMX.eventtype,

    TMX.result,

    TMX.jref

    of EXAMPLE_MESSAGES1.

    XMLTABLE (XMLNAMESPACES (DEFAULT 'http://www.w3.org/2001/XMLSchema-instance'), )

    ' for $i in/event/data/object

    Returns the local item: r {$i / eventtype,}

    $i / result.

    {$i / jref}'

    EXAMPLE_MESSAGES1 OF PASSAGE. XML_MESSAGE

    COLUMNS

    EVENTTYPE VARCHAR2 (30) PATH "eventtype"

    RESULT VARCHAR2 (30) PATH 'result ',.

    TMX JREF PATH VARCHAR2 (30) 'jref');

    Version of the database is 11.2.0.3.0

    Hello

    I have to extract values in xml that includes several namepspaces.

    There is only one workspace names in fact (the default value).

    Normally, an empty xmlns UN-declare a default namespace declaration is inherited from the parent node.

    So, in your example, only node belongs to the default namespace.

    In this case, when you have to walk through the nodes belonging to some namespaces and others in any namespace, do not use the DEFAULT option in the WITH XMLNAMESPACES.

    Instead, declare a prefix and use it as needed for qualify of nodes.

    Another thing:

    Returns the local item: r {$i / eventtype,}

    What what do you want with "local:" here?

    The following should give the expected results:

    SELECT TMX.*

    of EXAMPLE_MESSAGES1

    XMLTABLE)

    XMLNAMESPACES ("http://www.w3.org/2001/XMLSchema-instance" as "ns0")

    , ' / ns0:event'

    EXAMPLE_MESSAGES1 OF PASSAGE. XML_MESSAGE

    COLUMNS

    EVENTTYPE VARCHAR2 (30) PATH 'data, object, eventtype.

    , RESULT VARCHAR2 (30) PATH ' object/data/result '.

    , PATH of VARCHAR2 (30) JREF ' info/jref.

    ) TMX;

  • The accessibility of the node node verification failure

    Hello

    I try to install Oracle 10.2.0.1 RAC in my vmware. I have configured public IP, private IP and VIP on both nodes and configured ssh too. I'm able to reach the nodes between them through ping and ssh with hostnames, but before you start the installation of my cluster, I checked the request of pre with ./runcluvfy.sh stage pre - crsinst - n, Rhel52.localdomain.com, rhel5.localdomain.com - verbose command and he raises me the below mentioned error. I have no idea why I get this error despite the right configuration of the OS.

    [oracle@rhel5 cluvfy] stage pre - crsinst - Rhel52.localdomain.com, rhel5.localdomain.com n - verbose $./runcluvfy.sh


    Conducting due diligence to install cluster services


    Audit accessibility of node...

    RHEL5.localdomain: rhel5.localdomain

    Check: Accessibility of node of the node 'null '.

    Accessible destination node?

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

    rhel5                                 no

    Rhel52                                no

    Result: Failure of verification of accessibility node of the node 'null '.

    ERROR:

    Unable to reach one of the nodes.

    Check cannot continue.

    Kind regards

    007

    Local hosts are defined in the hosts file?

    cat/etc/hosts

  • XML: How to get the value of the node when the node of pasing as a parameter name

    Hello

    I've got some xml:

    var xmlData:XML = 
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    

    So, I want to read the value of specific node based on a value passed to a function. .

    var buttonID = new Button;
    
    var imageID = new Image;
    
    var labelID = new Label;
    
    
    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    
    trace (xmlData.nodeName)                      //doesn't work
    
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    
    }
    

    I don't know how to get the value when the name of the node is changed dynamically.

    use:

    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])
    }
    
    
  • Display the names and values of the parameters in the node parameter of forms

    Hello

    Is it possible to loopback programmatically via the node parameter forms get the name and value of each parameter. I don't know the name of the individual parameters in advance. I want to display the parameter names and values on a help screen generic as each of our reference forms.

    I could do somewhat similar code to display all names of block in a first_block get_form_property property and nextblock property get_block_property is formed. I can't think in the same way as the parameter names and the values of the list if.

    Any suggestions would be welcome.

    Thank you

    Neil

    No, there is no standard built-in to browse Forms settings.

    François

  • Extract the value of the node only using XQuery

    Hello

    I have a xml as XMLType stored in the table. XML is,

    < ocaStatus xmlns = "http://xmlbeans.apache.org/ocastatus" >
    < status >
    < > 990 statusCode < / statusCode >
    < statusDate > 2010 - 01 - 19 < / statusDate >
    < user name > OcaNimsAcf < / userId >
    < comment > DocumentnotinNIMS < / comment >
    < / status >
    < status >
    < > 990 statusCode < / statusCode >
    < statusDate > 2010 - 01 - 19 < / statusDate >
    < user name > OcaNimsAcf < / userId >
    < comment > DocumentnotinNIMS < / comment >
    < / status >
    < / ocaStatus >

    I use a combination of normal SQL and XQuery queries to extract data from table.
    I have a requirement where I have to shoot only value of XML node as only * 990 * without tags < statusCode >.
    I wonder if it's possible ass I've tried with two or three combinations of function extract().

    Thank you.

    Hello

    Different ways to do it, assuming you want the results in a relational table.

    XMLTable using:

    WITH t as (
     select xmltype('
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    ') doc
     from dual
    )
    SELECT x.*
    FROM t, xmltable(
     xmlnamespaces(default 'http://xmlbeans.apache.org/ocastatus'),
     'ocaStatus/status'
     passing t.doc
     columns
      status_code number path 'statusCode'
    ) x;
    

    Using the 'old' (and obsolete) XMLSequence:

    WITH t as (
     SELECT xmltype('
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    ') doc
     FROM dual
    )
    SELECT extractvalue( x.column_value,
                         'status/statusCode',
                         'xmlns="http://xmlbeans.apache.org/ocastatus"' ) as status_code
    FROM t, table(
     xmlsequence(
      extract(t.doc, 'ocaStatus/status', 'xmlns="http://xmlbeans.apache.org/ocastatus"')
     )
    ) x;
    

    Otherwise, targeting a specific node:

    WITH t as (
     select xmltype('
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    
    990
    2010-01-19
    OcaNimsAcf
    DocumentnotinNIMS
    
    ') doc
     from dual
    )
    SELECT extractvalue( t.doc,
                         'ocaStatus/status[1]/statusCode',
                         'xmlns="http://xmlbeans.apache.org/ocastatus"' ) as status_code_1
    FROM t;
    
  • Failure to the final control of Oracle CRS stack. 10 on the first node.

    Hello world

    I tried to install a RAC Oracle 10 g on Oracle Enterprise Linux AS release 4 2 (October 7 update), but I'm having this problem

    root@fporn01 crs #./root.sh
    Check to see if Oracle CRS stack is already configured

    Set the permissions on OCR backup directory
    Setting up NS directories
    Configuration of the Oracle Cluster registry upgraded successfully
    clscfg: version Setup detected EXISTING 3.
    clscfg: version 3 is 10 G Release 2.
    Award of fporn01 default hostname for node 1.
    Award of fporn02 default hostname for node 2.
    Successfully accumulated necessary OCR keys.
    Using the ports: CSS = 49895 49896 EVMC = SRC = 49898 and EVMR = 49897.
    < nodenumber > node: nodename > < private interconnection name > < hostname >
    node 1: fporn01 fporn01-priv fporn01
    node 2: fporn02 fporn02-priv fporn02
    clscfg: Arguments help you get success.

    NO KEYS WERE WRITTEN. Power - setting force to override.
    -force is destructive and will destroy any previous cluster
    Configuration.
    Oracle Cluster registry cluster has already been initialized
    Startup will be queued to init within 90 seconds.
    Adding to inittab demons
    Expected CRS demons to be in place within 600 seconds.
    Failure to the final control of Oracle CRS stack.
    + 10 +.

    Forget the names!

    but on the second node everything went well, so I don't know that this is not a connectivity problem.
    the iptables service is stopped and disabled
    check the results after you run the root.sh script

    root@fporn02 ~ # /u01/app/crs/root.sh
    Check to see if Oracle CRS stack is already configured
    + / etc/oracle does not exist. Create now. +

    Set the permissions on OCR backup directory
    Setting up NS directories
    Configuration of the Oracle Cluster registry upgraded successfully
    clscfg: version Setup detected EXISTING 3.
    clscfg: version 3 is 10 G Release 2.
    Award of fporn01 default hostname for node 1.
    Award of fporn02 default hostname for node 2.
    Successfully accumulated necessary OCR keys.
    Using the ports: CSS = 49895 49896 EVMC = SRC = 49898 and EVMR = 49897.
    < nodenumber > node: nodename > < private interconnection name > < hostname >
    node 1: fporn01 fporn01-priv fporn01
    node 2: fporn02 fporn02-priv fporn02
    clscfg: Arguments help you get success.

    NO KEYS WERE WRITTEN. Power - setting force to override.
    -force is destructive and will destroy any previous cluster
    Configuration.
    Oracle Cluster registry cluster has already been initialized
    Startup will be queued to init within 90 seconds.
    Adding to inittab demons
    Expected CRS demons to be in place within 600 seconds.
    CSS is active on these nodes.
    fporn02
    CSS is not active on these nodes.
    fporn01
    Node local verification.
    Run the root.sh on the remaining nodes script to start the demons of the CRS.

    It is the newspaper of crs on the first node

    root@fporn01 bin # cat /u01/app/crs/log/fporn01/alertfporn01.log
    + 17:27:37.695 + 2009-06-24
    customer (9045) CRS-1006: / u02/oradata/orcl/OCRFile_mirror location of the OCR is inaccessible. Details in u01/app/crs/log/fporn01/client/ocrconfig_9045.log.
    + 17:27:37.741 + 2009-06-24
    customer (9045) CRS-1001: OCR has been formatted using version 2.
    + 17:28:24.544 + 2009-06-24
    customer (9092) CRS - APB - rac configured with nodes fporn01 fporn02 1801:Cluster.

    It is the newspaper of crs on the second node

    root@fporn02 ~ # cat /u01/app/crs/log/fporn02/alertfporn02.log
    + 18:09:09.307 + 2009-06-24
    CSSD (16991) CRS - 1605:CSSD file to vote is online: / u02/oradata/orcl/CSSFile. Details in u01/app/crs/log/fporn02/cssd/ocssd.log.
    + 18:09:09.307 + 2009-06-24
    CSSD (16991) CRS - 1605:CSSD file to vote is online: / u02/oradata/orcl/CSSFile_mirror1. Details in u01/app/crs/log/fporn02/cssd/ocssd.log.
    + 18:09:09.310 + 2009-06-24
    CSSD (16991) CRS - 1605:CSSD file to vote is online: / u02/oradata/orcl/CSSFile_mirror2. Details in u01/app/crs/log/fporn02/cssd/ocssd.log.
    + 18:09:12.441 + 2009-06-24
    CSSD (16991) CRS - 1601:CSSD complete Reconfiguration. Active nodes are fporn02.

    I rechecked the remote access / user equivalence

    After execution of the command here OCRCHECK have this information

    root@fporn01 bin #. / ocrcheck
    Status of the Oracle Cluster registry is:
    Version: 2
    Total space (in kilobytes): 262144
    Used space (in kilobytes): 312
    Amount of available space (KB): 261832
    ID: 255880615
    Device/file name: / u02/oradata/orcl/OCRFile
    Verifying the integrity of file/device succeeded
    Device/file name: / u02/oradata/orcl/OCRFile_mirror
    Verifying the integrity of file/device succeeded

    Checking cluster registry integrity succeeded

    on the second node, I get the same result

    root@fporn02 bin #. / ocrcheck
    Status of the Oracle Cluster registry is:
    Version: 2
    Total space (in kilobytes): 262144
    Used space (in kilobytes): 312
    Amount of available space (KB): 261832
    ID: 255880615
    Device/file name: / u02/oradata/orcl/OCRFile
    Verifying the integrity of file/device succeeded
    Device/file name: / u02/oradata/orcl/OCRFile_mirror
    Verifying the integrity of file/device succeeded

    Checking cluster registry integrity succeeded

    I have reviewed the following metalink notes, but none of them seem to solve my problem

    * 344994.1*
    * 240001.1*
    * 725878.1*
    * 329450.1*
    * 734221.1*

    I made a low of research from many forums, but failure is always on the second node, but my failure is on the first node.
    I hope someone could help me.

    It's the output of cluvfy

    Conducting due diligence to install cluster services

    Audit accessibility of node...

    Check: Accessibility of node of the node 'fporn01 '.
    Accessible destination node?
    ------------------------------------ ------------------------
    fporn01 Yes
    fporn02 Yes
    Result: Check accessibility node from node 'fporn01 '.

    Verify the equivalence of the user...

    Check: Equivalence of the user for the user 'oracle '.
    Comment by node name
    ------------------------------------ ------------------------
    fporn02 spent
    fporn01 spent
    Result: Use equivalence CONTROL passed to user 'oracle '.

    Checking administrative privileges...

    Check: Existence of user 'oracle '.
    User name of node are comments
    ------------ ------------------------
    fporn02 Yes
    fporn01 Yes
    Result: Use CONTROL existence increased for 'oracle '.

    Check: Existence of group 'oinstall '.
    Name of node status group ID
    ------------ ------------------------
    fporn02 is 501
    fporn01 is 501
    Result: Check existence for "oinstall" group

    Check: The user 'oracle' in group 'oinstall' primary members
    Name of node user is group is user in the main group comment
    ---------------- ------------
    fporn02 Yes Yes Yes Yes past
    fporn01 Yes Yes Yes Yes past
    Result: Membership check for user 'oracle' in group 'oinstall' as primary past.

    Past check administrator privileges.

    Verify node connectivity...

    Interface of the node information to "fporn02".
    IP address subnet of the interface name
    ------------------------------ ----------------
    eth0 10.218.108.245 10.218.108.0
    eth1 192.168.1.2 192.168.1.0

    Interface of the node information to "fporn01".
    IP address subnet of the interface name
    ------------------------------ ----------------
    eth0 10.218.108.244 10.218.108.0
    eth1 192.168.1.1 192.168.1.0
    eth2 172.16.9.210 172.16.9.0

    Check: Subnet node connectivity "10.218.108.0."
    Source Destination connected?
    ------------------------------ ----------------
    fporn02:eth0 fporn01:eth0 Yes
    Result: Verification of node connectivity for subnet "10.218.108.0" with one or more nodes fporn02, fporn01.

    Check: Subnet node connectivity "192.168.1.0.
    Source Destination connected?
    ------------------------------ ----------------
    fporn02:eth1 fporn01:eth1 Yes
    Result: Verification of node connectivity for subnet "192.168.1.0" with one or more nodes fporn02, fporn01.

    Check: Subnet node connectivity "172.16.9.0."
    Result: Verification of node connectivity for subnet "172.16.9.0" with one or more nodes fporn01.

    Interfaces adapted for private interconnection on the subnet "10.218.108.0":
    fporn02 eth0:10.218.108.245
    fporn01 eth0:10.218.108.244

    Interfaces adapted for private interconnection on the subnet "192.168.1.0":
    fporn02 eth1:192.168.1.2
    fporn01 eth1:192.168.1.1

    ERROR:
    Could not find an appropriate interface for the VIP range.

    Result: The node connectivity test failed.

    Check the system requirements for 'Sir '...

    Check: Total memory
    Name of node available comment required
    ------------ ----------
    fporn02 7,93 GB (8310276 KB) 512 MB (524288 k) transmitted
    fporn01 7,93 GB (8310276 KB) 512 MB (524288 k) transmitted
    Result: The total past memory check.

    Check: Disk space in "/ tmp" dir
    Name of node available comment required
    ------------ ----------
    fporn02 9.57 GB (10037300 KB) 400 MB (409600 KB) transmitted
    transmitted fporn01 GB 9.55 (10012168 KB) 400 MB (409600 KB)
    Result: Check the free space on the disc passed.

    Check: Swap space
    Name of node available comment required
    ------------ ----------
    fporn02 from 1 GB (1048576KB) of 8,81 GB (9240568KB)
    fporn01 from 1 GB (1048576KB) of 8,81 GB (9240568KB)
    Result: Checking space last Swap.

    Control: System Architecture
    Name of node available comment required
    ------------ ----------
    fporn02 i686 i686 spent
    fporn01 i686 i686 spent
    Result: Audit had system architecture.

    Control: Kernel Version
    Name of node available comment required
    ------------ ----------
    2.6.9 - 2.4.21 - 15EL spent 78.0.0.0.1.ELhugemem fporn02
    2.6.9 - 2.4.21 - 15EL spent 78.0.0.0.1.ELhugemem fporn01
    Result: Last kernel version control.

    Check: Existence of package for 'do-3, 79 '.
    Name of State comment node
    ------------------------------ ----------------
    fporn02 make-3, 80 - 7.EL4 spent
    fporn01 make-3, 80 - 7.EL4 spent
    Result: Package checking for 'do-3, 79 '.

    Check: Existence of package for ' binutils - 2.14.
    Name of State comment node
    ------------------------------ ----------------
    binutils - 2.15.92.0.2 - 25 fporn02 spent
    binutils - 2.15.92.0.2 - 25 fporn01 spent
    Result: Package checking for ' binutils - 2.14.

    Check: Existence of package for "gcc - 3.2.
    Name of State comment node
    ------------------------------ ----------------
    fporn02 gcc - 3.4.6 - 10.0.1 spent
    fporn01 gcc - 3.4.6 - 10.0.1 spent
    Result: Package checking for "gcc - 3.2.

    Check: Existence of package for ' glibc - 2.3.2 - 95.27.
    Name of State comment node
    ------------------------------ ----------------
    fporn02 glibc - 2.3.4 - 2.41 spent
    fporn01 glibc - 2.3.4 - 2.41 spent
    Result: Package checking for ' glibc - 2.3.2 - 95.27.

    Check: Existence of package for "compat-db - 4.0.14 - 5.
    Name of State comment node
    ------------------------------ ----------------
    past fporn02 compat - 4.1.25 - DB9
    past fporn01 compat - 4.1.25 - DB9
    Result: Package checking for "compat-db - 4.0.14 - 5.

    Check: Existence of package for "compat-gcc-7, 3 - 2.96.128.
    Name of State comment node
    ------------------------------ ----------------
    lack of fporn02 failed
    lack of fporn01 failed
    Result: Failure of the existence Package control for "compat-gcc-7, 3 - 2.96.128.

    ++ Check: package of existence "compat-gcc-c++ - 7.3 - 2.96.128" ++
    Name of State comment node
    ------------------------------ ----------------
    lack of fporn02 failed
    lack of fporn01 failed
    ++ Result: failure of packet existence check for "compat-gcc-c++-7, 3 - 2.96.128. ++

    ++ Check: package of existence "compat-libstdc ++ - 7, 3 - 2.96.128" ++
    Name of State comment node
    ------------------------------ ----------------
    lack of fporn02 failed
    lack of fporn01 failed
    ++ Result: failure of packet existence check for "compat-libstdc ++ - 7, 3 - 2.96.128. ++

    ++ Check: package of existence "compat-libstdc ++ - devel-7, 3 - 2.96.128" ++
    Name of State comment node
    ------------------------------ ----------------
    lack of fporn02 failed
    lack of fporn01 failed
    ++ Result: failure of packet existence check for "compat-libstdc ++ - devel-7, 3 - 2.96.128. ++

    Check: Existence of package for "openmotif - 2.2.3.
    Name of State comment node
    ------------------------------ ----------------
    openmotif - 2.2.3 - 10.2.el4 spent fporn02
    openmotif - 2.2.3 - 10.2.el4 spent fporn01
    Result: Package checking for "openmotif - 2.2.3.

    Check: Existence of package for "setarch - 1.3 - 1.
    Name of State comment node
    ------------------------------ ----------------
    fporn02 setarch-1, 6-1 adopted
    fporn01 setarch-1, 6-1 adopted
    Result: Package checking for "setarch - 1.3 - 1.

    Check: Existence of group for "dba".
    Name of State comment node
    ------------ ------------------------
    fporn02 are past
    fporn01 are past
    Result: Check group existence for "dba".

    Check: Existence of group 'oinstall '.
    Name of State comment node
    ------------ ------------------------
    fporn02 are past
    fporn01 are past
    Result: Check existence for "oinstall" group

    Check: Existence of user "nobody".
    Name of State comment node
    ------------ ------------------------
    fporn02 are past
    fporn01 are past
    Result: Use existence CONTROL passed to "nobody".

    Failure of the system requirements for 'Sir '.

    Check prior to the installation of cluster service failed on all nodes.

    We thank you for your comments ;)

    If you advise/etc/inittab file... don't ' forget to uncomment (that's run when the system starts)

    #h1:35:respawn:/etc/init.d/init.evmd run > / dev/null 2 > & 1
    fatal #h2:35:respawn:/etc/init.d/init.cssd > / dev/null 2 > & 1
    #h3:35:respawn:/etc/init.d/init.crsd run > / dev/null 2 > & 1

    TO

    H1:35:respawn:/etc/init.d/init.evmd run > / dev/null 2 > & 1
    H2:35:respawn:/etc/init.d/init. Fatal CSSD > / dev/null 2 > & 1
    H3:35:respawn:/etc/init.d/init.crsd run > / dev/null 2 > & 1

    By the way... Have fun and take advantage of Oracle RAC ;)

  • Recovery of the values of the nodes

    I am facing this problem when trying to get the values of xml file, it's received orders from third-party customer file, need to load in our data base and data updates according to this file.

    This is the example of the file

    <? XML version = "1.0" encoding = "utf-8"? >
    "< RegistrationFile xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="file:///lrb.xsd ">
    < header >
    LRB_33h43k3j_281020080944.XML < Filename > < / name of the file >
    < OrganisationRef > 33h43k3j < / OrganisationRef >
    < LearnerRecordCount > 6 < / LearnerRecordCount >
    < / header >
    the learner < MISIdentifier > 5 > < < / MISIdentifier > < title > MISS < / Title > < GivenName > MARGARET < / GivenName > < PreferredGivenName > MARGARET < / PreferredGivenName > < FamilyName > O'BRIEN < / FamilyName > < FamilyNameAt16 > O & apos; BRIEN < / FamilyNameAt16 > < LastKnownAddressLine1 > 121 ST STEPHENS GREEN < / LastKnownAddressLine1 > < LastKnownAddressLine2 > DUBLIN 2 < / LastKnownAddressLine2 > < LastKnownAddressTown > CO DUBLIN < / LastKnownAddressTown > < LastKnownAddressCountyorCity > IRELAND < / LastKnownAddressCountyorCity > < DateOfAddressCapture > 2003-04-25T 11:47:18 < / DateOfAddressCapture > < DateOfBirth > 1980 - 01-01 T 00: 00:00 < / DateOfBirth > < EmailAddress > [email protected] < / EmailAddress > < sex > 2 < / kind > < / learning >
    learner < MISIdentifier > 7 > < < / MISIdentifier > < title > Mr. < / title > < GivenName > TOBY < / GivenName > < James MiddleOtherName > < / MiddleOtherName > < FamilyName > LANHAM < / FamilyName > < DateOfBirth > 1979-05-23T 00: 00:00 < / DateOfBirth > < sex > 0 < / Type > < / learner >
    learner < MISIdentifier > 80 > < < / MISIdentifier > < GivenName > HASSAN < / GivenName > < FamilyName > AHMED < / FamilyName > < sex > 9 < / Type > < / learning >
    the learner <>< MISIdentifier > 86 < / MISIdentifier > < GivenName > BOAKYE < / GivenName > < FamilyName > AMPONSAH < / FamilyName > < sex > 9 < / Type > < / learner >
    learner < MISIdentifier > 93 > < < / MISIdentifier > < title > MS < / title > < GivenName > LIZ < / GivenName > < FamilyName > ARKLESS < / FamilyName > < DateOfAddressCapture > 2008-08-17T 16: 51:55 < / DateOfAddressCapture > < sex > 9 < / Type > < / learner >
    learner < MISIdentifier > 100 > < < / MISIdentifier > < GivenName > JOHN < / GivenName > < FamilyName > BRISCOE < / FamilyName > < sex > 9 < / Type > < / learning >
    < / RegistrationFile >

    After running this code:

    declare
    l_xml xmltype.
    l_doc dbms_xmldom. DOMDocument;
    doc_node dbms_xmldom. DOMNode;
    l_elem DBMS_XMLDOM. DOMElement.
    l_nodeList dbms_xmldom. DOMNodeList;
    l_node dbms_xmldom. DOMNode;
    l_childNode dbms_xmldom. DOMNode;
    l_nodeValue varchar2 (100);
    number of l_num;
    Start
    Select imported_xml from l_xml
    of miap_export_header
    Where object_id = 77891310;

    l_doc: = dbms_xmldom.newDOMDocument (l_xml);
    doc_node: = DBMS_XMLDOM.makeNode (l_doc);
    l_elem: = DBMS_XMLDOM.getDocumentElement (l_doc);

    l_nodeList: = dbms_xmldom.getElementsByTagName (l_elem, 'Head');
    l_node: = dbms_xmldom.item (l_nodeList, 0);
    l_childNode: = dbms_xmldom.getLastChild (l_node);
    l_num: = dbms_xmldom.getNodeValue (l_childNode);

    dbms_output.put_line (' number of learners: ' | l_num);

    l_nodeList: = dbms_xmldom.getElementsByTagName (l_elem, 'Learner');

    l_node: = dbms_xmldom.item (l_nodeList, 0);
    loop
    l_childNode: = dbms_xmldom.getFirstChild (l_node);
    l_nodeValue: = dbms_xmldom.getNodeName (l_childNode);
    l_num: = dbms_xmldom.getNodeValue (l_childNode);

    dbms_output.put_line (' node name: ' | l_nodeValue |' value: ' | l_num);

    l_node: = dbms_xmldom.getNextSibling (l_node);

    When the output dbms_xmldom.isNull (l_node);
    end loop;

    DBMS_XMLDOM.freeDocument (l_doc);
    end;

    I have this output:

    Number of students:
    Name of the node: MISIdentifier value:
    Name of the node: MISIdentifier value:
    Name of the node: MISIdentifier value:
    Name of the node: MISIdentifier value:
    Name of the node: MISIdentifier value:
    Name of the node: MISIdentifier value:

    There's no value, only a white space in each line. Why? And how do I retrieve these values, perhaps I should take a different approach?
    All responses are much appreciated, because I'm going out right now.

    An A_Non mentions, DOMElement have no value. You must first get his DOMText child to get the data of the item.

  • Error 1 has occurred to the node invoke in openvi.vi

    Hi, openvi.vi, I use Invoke node to run showchannel2.vi, I encountered the problem about error 1. refer to the attachment file.

    Absolutely, this problem have been described below.

    Error 1 has occurred to the node invoke in openvi.vi

    Possible reasons:

    LabVIEW: An input parameter is not valid.
    ---
    NOR-488: Command requires controller GPIB be in Charge.

    I don't know why? How can I overcome this issue?

    Thank you very much

    The data types of your controls do not match. In the Subvi you have a U8. In the VI parent cursor is data type of DBL. change the cursor to a U8. You must also make sure that you have a valid range on your cursor. In the Subvi you subtract the input value 8, so it seems you're wanting a control with a minimum value of 8.

  • failure of the system, looking for answers

    Need help for the guys. Had a major failure of the system last week, and I'm a bit confused as to what happened and why I was unable to get free. I lost a bit of my confidence in Vsphere, and I'd like to renew that.

    A bit on the environment, esxi 5.0 U1, with servers HP Gen 8 3 node cluster running. HP P4500 SAN iscsi for vmfs data storage. ESXi is installed on HP's CF cards in servers. This cluster has been upward and running for about 6 months, not a single hiccup before that.

    Wednesday we have migrated 2 of our vm (SQL and progress) to this cluster 5.0 database, the virtual machine went on different hosts in the cluster. The virtual machine was running on a cluster 2 older nodes with esxi 4.1 U2. Machines migrated fine, fine tools updates, reboot, everything seemed fine.

    About 2 hours after that the migration, we started to receive calls that our Progress database is down, users could not connect. Then we started getting more calls, other machines were inaccessible. Glancing from vcenter I could see all the virtual machines in question were on the same host, and I was unable to open the console in vsphere for VMs on that host. The host showed he was connected, showed all the vm connected, but I could not open the console or the desktop remotely to one of the VMs on that host. I started studying, and of course this host fell all the SAN Iscsi network connections. The railways have shown dead. Ports of nic card viewed active, the switch ports showed activity, but the connections were down. I could always ping the address of management for the host however, and ports for vmotion were in place.

    At this point, I started to try and vmotion VMs on that host data base progress, he would not migrate, just sat at 8% prepare to migrate. I tried other virtual machines with the same result. I started to wonder why HA had not kicked, and why I couldn't move anything. At this stage the host started disconnecting from the cluster. I could always ping on the host, but vsphere showed as disconnected. I couldn't move my VM, and I couldn't go to the host via vcenter, via the vsphere client pointed directly to the host, or by using the DCUI.

    So I called VMware support, got an engineer on the line with me, and it became clear we were going to have to power cycle that host and crash all virtual machine running on it. It wasn't a very pleasant for me answer because this database of progress is our main production system, and I was afraid of corruption. We had no choice, so we did. When the host came back upward, fortunately the virtual machine came very well. VMware engineer digging in the newspapers and said that this was with a particular NIC card driver with known issues. He showed me the KB on this issue, and it seemed to be a known issue. We have updated these drivers on all hosts, and that's all.

    My problem with this is that, how is the cluster ran fine for 6 months without problem, and how come the redundant path to the SAN did not keep the connection active when with the path with the bad nic card driver failed? I have 2 different, with 2 NICs different paths for the Iscsi SAN. The other card had no known driver issue. Why both paths failed not just in cause of a driver on one of the cards problem? More worrying is also how is it that I could not immigrate anything, and why no HA kick in?

    Sorry for the novel here, but without all the details is not part of a story. My biggest concern, that's why I couldn't move anything? In the event of a host failure, what you're supposed to do in order to migrate the machines if they don't migrate via vsphere client? We were down for about 2.5 hours, and a lot of questions were thrown on me the senior management as to why my "system available, redundant high" took hours to retrieve...

    Guys here any ideas, thoughts on how I would have handled it differently, reasons why I should be confident everything is fine now?

    Thanks for your time

    Kevin

    trink408 wrote:

    Thanks Matt.

    I guess some of the problem is not completely understand how the HA or Vmotion. I was under the impression once that the virtual machine was not reachable HA wouldn't kick and move the virtual machine? The virtual machine was not to ping requests or accessible by the Office remotely. I couldn't get their power off or do anything through vcenter either.

    If they had no link usable storage, this seems possible.  HA simply does not address the failures of storage.  Not at all.  It IS possible to activate at the level of the VM HA, but it isn't on by default - must be activated on a per-VM basis.  You should read the book by Duncan Epping on this - it's the bible of the AH.

    So in case something happens with the connection of storage, you have really no way to vmotion anything right here, and your only option is to kill the host / VM running on it, and then migrate or leave HA move them?

    Fix.

    I didn't know that I wouldn't be able to vmotion virtual machine if the host has lost its connection to storage. The other hosts in the cluster saw storage.

    The source host is controlling these VMDK, as far as the other guests are concerned (they see a lock on the file) and when they ask the host if its still alive, he answers (because it has not powered the network lost or down, which are the failure mode THAT HA is designed to handle). So they take charge.

    The reason why it took so long was because I didn't kill the host with my concerns for the database. I was hoping that the VMware engineer may have a way to gracefully close things down. So he spent some time looking around and trying to determine what was going on. Ultimately we just power cycle the host, so I could have done much earlier, and if we are facing this again in the future, I would.

    As long as you follow the seller advised for more decent databases (keeping the transaction logs, etc.), don't have good backups, theres no real risk of data corruption.  VMware does not significantly change the i/o path, in order to have the same exposure than on a physical host.

    I still do not understand why the two paths were marked as dead and the host completely lost connection to the SAN, as well as to show finally disconnected in vcenter.

    Well the host went offline because it got stuck in an all-paths-down scenario, which is common for 5.0.  5.1 solves this problem a little.  I don't know why all roads fell, but I suspect that you have a misconfig somewhere... normally you expect at least 4 paths in a system set up correctly on the left.  Check with HP to ensure that you follow best practices.

    Maybe all the IP stack has been corrupted or something?

    Possible, of course, but unlikely.  Never heard before.

    I appreciate the help and the preview, I thought that the problem was a lack of understanding on my part and fully accept it.

    HA and vMotion are complex.  At least now you can go back to mgmt and tell them why he fell more (because it was a failure outside the scope of the software scenario) and may ask for money to build a proper SQL cluster.  Definitely recommend the book of Duncan Epping: http://www.amazon.com/VMware-vSphere-Clustering-Technical-Deepdive/dp/1463658133/ref=la_B002YJMRCY_1_2?ie=UTF8&qid=1363622697&sr=1-2

  • Validations not working not to when the node type is assigned

    I am facing a validation of w.r.t. strange question. I created the validations and successfully tested. For example, I created a "V1" validation that verifies the "P1" property to a value of "False" to determine whether validation is to the success or failure. If the value of the property is set to True, it should not throw any validation error.

    The property P1 is derived the value properly and validations are works fine with assign them the node type. When I assign the node type, the property P1 is derived from the 'False' value, but the node is getting added without lifting a validation error.

    Any suggestions would be helpful.

    Thank you and best regards,

    GK.

    The first check - see if validation is included in the applicable node Type/s

    Thank you

    Denzz

  • Replacement of the nodes with duplicates

    I can't find out how to write an XQuery query which can essentially 'jump' a replacement when I said to. I don't know who makes no sense, so here's a better explanation.

    I have an XML file that is stored in an Oracle XML DB that looks like this:
    <bookstore>
        <book title="Analytical Chemistry" publish_date="198710">
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Particle Physics" publish_date="199202">
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Applied Biophysics" publish_date="201005">
           <author>...
           <publisher>....
           <etc.>
        </book>
    </bookstore>
    We get the update commands that look like the same thing, with a 'command' attached to add the book to the store or drop:
    <bookstore>
        <book title="Analytical Chemistry" publish_date="199210">
           <order>merge</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Particle Physics" publish_date="199202">
           <order>drop</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Chaos Theory" publish_date="199102">
           <order>merge</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
    </bookstore>
    The rule is should I replace or add a book in the store if I have a book of the same title, and the order is "merge", or drop it if the order is to 'drop '. I have a request XQuery Update function now makes what looks like this:
    declare updating function local:book_merge($old, $book_merge)
    {
         for $orderEntr in $book_merge/book
         let $chgCd := $orderEntr/order
         let $orderTitle := $orderEntr/@title
            let $oldBooks := $old/bookstore
         let $oldBookEntr := $oldBooks/book[@title=$orderTitle]
         return
            if( $chgCd = "drop" and exists($oldBookEntr) )
            then delete node $oldBookEntr
            else if( exists($oldBookEntr) )
            then replace node $oldBookEntr with $orderEntr
            else insert node $orderEntr into $oldBooks
    };
    This works very well for commands like above, but once from time to time, we receive a command like this:
    <bookstore>
       <book title="Analytical Chemistry" publish_date="199210">
           <order>merge</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Analytical Chemistry" publish_date="199210">
           <order>merge</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Particle Physics" publish_date="199202">
           <order>drop</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
        <book title="Chaos Theory" publish_date="199102">
           <order>merge</order>
           <author>...
           <publisher>....
           <etc.>
        </book>
    </bookstore>
    Notice how the first entry is duplicated. In this case, the requirement must only enter the book in the library once. Can someone give me an idea of how I would go about implementing that? I am struggling to understand how to ask the right question, so please forgive me.

    You can add a predicate that will filter the next (or previous) duplicates of a given input:

    where not($orderEntr/following-sibling::book[@title = $orderTitle])
    

    Full test case:

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> create table tmp_xml of xmltype;
    
    Table created.
    
    SQL> insert into tmp_xml values (
      2  xmltype('
      3      
      4         XXX
      5         
      6      
      7      
      8         YYY
      9         
     10      
     11      
     12         ZZZ
     13         
     14      
     15  ')
     16  );
    
    1 row created.
    
    SQL> var orders clob
    SQL> begin
      2
      3   :orders := '
      4      
      5         merge
      6         XXX
      7         123
      8      
      9      
     10         merge
     11         XXX
     12         123
     13      
     14      
     15         drop
     16         YYY
     17         
     18      
     19      
     20         merge
     21         ZZZ-2
     22         
     23      
     24  ';
     25
     26  end;
     27  /
    
    PL/SQL procedure successfully completed.
    
    SQL> set long 5000
    SQL> set pages 100
    SQL>
    SQL> select /*+ no_xml_query_rewrite */
      2         xmlserialize(document
      3           xmlquery(
      4           'copy $d := $old
      5            modify (
      6              for $orderEntr in $orders/bookstore/book
      7              let $chgCd := $orderEntr/order
      8              let $orderTitle := $orderEntr/@title
      9              let $oldBooks := $d/bookstore
     10              let $oldBookEntr := $oldBooks/book[@title = $orderTitle]
     11              where not($orderEntr/following-sibling::book[@title = $orderTitle])
     12              return
     13                 if( $chgCd = "drop" and exists($oldBookEntr) )
     14                   then delete node $oldBookEntr
     15                 else if( exists($oldBookEntr) )
     16                        then replace node $oldBookEntr with $orderEntr
     17                      else insert node $orderEntr into $oldBooks
     18            )
     19            return $d'
     20           passing object_value as "old"
     21                 , xmlparse(document :orders) as "orders"
     22           returning content
     23           )
     24           indent
     25         ) as result
     26  from tmp_xml ;
    
    RESULT
    --------------------------------------------------------------------------------
    
      
        merge
        XXX
        123
      
      
        ZZZ
        
      
      
        merge
        ZZZ-2
        
      
    
    

    It's another question, you probably already have the answer: I guess you must also remove the nodes of the newly merged books?

Maybe you are looking for