Path table

The problem I have is with array of paths. I included a folder zipped a few directories with a vi that I use to retrieve information in the records. The vi continues his return two cells with empty path no reason I can think. I tried several solution but not of their work yet. The problem affects another section of my project.

Please any idea on what is causing this problem?

Advertisement

Hello

See the solution attached, you had a missing registry change in the inner loop, so all the one you were setting up paths have not been passed around, only the last would not consider a path on each line.

Concerning

Paul Rawlinson
TBG solutions
UK

Tags: NI Software

Similar Questions

  • Path to XML index table is full table scan

    Hi all

    I have a version of oracle 11.2.0.4.6 database

    Try to implement partitioning on XML indexes.

    Creates a table and index partitioned by time stamp as below.

    Whenever I'm trying to find the path table makes a full table scan.

    I have applied the fix as indicated ( Doc ID 13522189.8 ).

    So the recovery is quite slow and partition pruning does not not on XML indexes.

    Wondering if anyone has experienced the same problem?

    CREATE TABLE INCIDENT

    (

    INCIDENT_PK NUMBER (14.5).

    INCIDENTGROUPING_PK NUMBER (14.5).

    INCIDENTTYPE_PK NUMBER (14.5).

    SECURITYCLASS_PK NUMBER (14.5).

    STAMP OF INCIDENT_DATE,

    SYS INCIDENT_DETAIL. XMLTYPE

    )

    TABLESPACE DATA_TBS_INCIDENT

    PCTUSED 0

    PCTFREE 10

    INITRANS 1

    MAXTRANS 255

    STORAGE)

    64K INITIALS

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    )

    LOGGING

    NOCOMPRESS

    PARTITION BY RANGE (INCIDENT_DATE)

    (PARTITION SEP2013_WEEK1 VALUES LESS THAN (to_timestamp (' 00:00:00.00 2013-09-08 ',' YYYY-MM-DD HH24:MI:SS.))) FF2')),

    PARTITION SEP2013_WEEK2 VALUES LESS THAN (to_timestamp ('2013-09-15 00:00:00.00 ',' YYYY-MM-DD HH24:MI:SS.)) FF2')),

    PARTITION SEP2013_WEEK3 VALUES LESS THAN (to_timestamp ('2013-09-22 00:00:00.00 ',' YYYY-MM-DD HH24:MI:SS.)) FF2')),

    ..........);

    CREATE the INDEX INCIDENTxdb_idx

    ON corpaudlive. INCIDENT (INCIDENT_detail) INDEXTYPE IS XDB. LOCAL XMLINDEX 10 PARALLEL

    PARAMETERS (' PATH TABLE INCIDENT_PATHTABLE (TABLESPACE DATA_TBS_INCIDENT))

    PIKEY INDEX INCIDENT_PATHTABLE_PIKEY_IX (TABLESPACE IDX_TBS_INCIDENT)

    PATH ID INDEX INCIDENT_PATHTABLE_ID_IX (TABLESPACE IDX_TBS_INCIDENT)

    INCIDENT_PATHTABLE_VALUE_IX VALUE INDEX (TABLESPACE IDX_TBS_INCIDENT)

    ORDER KEY INDEX INCIDENT_PATHTABLE_KEY_IX (TABLESPACE IDX_TBS_INCIDENT)

    Paths (INCLUDE (//forename //surname //postcode //dateofbirth //street //town))');

    SQL > explain the plan for

    2 Select INCIDENT_pk in INCIDENT where XMLEXISTS ('/ / name [text () = 'john']' by the way of INCIDENT_detail)

    3 and XMLEXISTS ("/ / name [text () 'clark' =]' by the way of INCIDENT_detail")

    4 and a.INCIDENT_date between TO_TIMESTAMP (January 10, 2014 ',' DD/MM/YYYY "")

    5 and TO_TIMESTAMP (September 10, 2014 ',' DD/MM/YYYY ');

    He explained.

    Elapsed time: 00:00:02.77

    SQL > select * from table (dbms_xplan.display);

    PLAN_TABLE_OUTPUT

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

    Hash value of plan: 123057549

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

    | ID | Operation                                       | Name                           | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |    TQ | IN-OUT | PQ Distrib.

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

    |   0 | SELECT STATEMENT |                                |     1.    70.  1803 (5) | 00:00:22 |       |       |        |      |            |

    |   1.  COORDINATOR OF PX |                                |       |       |            |          |       |       |        |      |            |

    |   2.   PX SEND QC (RANDOM). : TQ10003 |     1.    70.  1803 (5) | 00:00:22 |       |       |  Q1, 03 | P > S | QC (RAND) |

    |   3.    SEMI NESTED LOOPS.                                |     1.    70.  1803 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    |   4.     NESTED LOOPS |                                |     1.    57.  1800 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    |   5.      VIEW                                       | VW_SQ_1                        |   239.  5975 |  1773 (5) | 00:00:22 |       |       |  Q1, 03 | SVCP |            |

    PLAN_TABLE_OUTPUT

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

    |   6.       UNIQUE HASH |                                |   239. 25334 |            |          |       |       |  Q1, 03 | SVCP |            |

    |   7.        RECEIVE PX |                                |   239. 25334 |            |          |       |       |  Q1, 03 | SVCP |            |

    |   8.         PX SEND HASH | : TQ10002 |   239. 25334 |            |          |       |       |  Q1, 02 | P > P | HASH |

    |   9.          UNIQUE HASH |                                |   239. 25334 |            |          |       |       |  Q1, 02 | SVCP |            |

    | * 10 |           HASH JOIN |                                |   239. 25334 |  1773 (5) | 00:00:22 |       |       |  Q1, 02 | SVCP |            |

    |  11.            KIND OF BUFFER.                                |       |       |            |          |       |       |  Q1, 02 | ISSUE |            |

    |  12.             RECEIVE PX |                                |     1.    22.     3 (0) | 00:00:01 |       |       |  Q1, 02 | SVCP |            |

    |  13.              PX SEND BROADCAST | : TQ10000 |     1.    22.     3 (0) | 00:00:01 |       |       |        | S > P | BROADCAST |

    |  14.               TABLE ACCESS BY INDEX ROWID | X$ PT74MSS0WBH028JE0GUCLBK0LHM4 |     1.    22.     3 (0) | 00:00:01 |       |       |        |      |            |

    | * 15 |                INDEX RANGE SCAN | X$ PR74MSS0WBH028JE0GUCLBK0LHM4 |     1.       |     2 (0) | 00:00:01 |       |       |        |      |            |

    | * 16.            HASH JOIN |                                | 12077 |   990K |  1770 (5) | 00:00:22 |       |       |  Q1, 02 | SVCP |            |

    PLAN_TABLE_OUTPUT

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

    |  17.             RECEIVE PX |                                |   250K |    10 M |    39 (0) | 00:00:01 |       |       |  Q1, 02 | SVCP |            |

    |  18.              PX SEND BROADCAST | : TQ10001 |   250K |    10 M |    39 (0) | 00:00:01 |       |       |  Q1, 01 | P > P | BROADCAST |

    |  19.               SYSTEM PARTITION ALL |                                |   250K |    10 M |    39 (0) | 00:00:01 |     1.   112.  Q1, 01 | ISSUE |            |

    | * 20.                TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |   250K |    10 M |    39 (0) | 00:00:01 |     1.   112.  Q1, 01 | SVCP |            |

    | * 21.                 INDEX RANGE SCAN | INCIDENT_PATHTABLE_VALUE_IX |   161.       |    25 (0) | 00:00:01 |     1.   112.  Q1, 01 | SVCP |            |

    |  22.             ITERATOR BLOCK PX |                                |   221 M |  8865M |  1671 (1) | 00:00:21 |    53.    54.  Q1, 02 | ISSUE |            |

    | * 23.              TABLE ACCESS FULL | INCIDENT_PATHTABLE |   221 M |  8865M |  1671 (1) | 00:00:21 |    53.    54.  Q1, 02 | SVCP |            |

    | * 24.      TABLE ACCESS BY ROWID USER | INCIDENT |     1.    32.     1 (0) | 00:00:01 | ROWID | ROWID |  Q1, 03 | SVCP |            |

    | * 25.     SEE PUSHED PREDICATE. VW_SQ_2                        |     1.    13.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  26.      NESTED LOOPS |                                |     1.   106.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  27.       NESTED LOOPS |                                |     4.   106.    20 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    PLAN_TABLE_OUTPUT

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

    |  28.        NESTED LOOPS |                                |     4.   256.     8 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  29.         TABLE ACCESS BY INDEX ROWID | X$ PT74MSS0WBH028JE0GUCLBK0LHM4 |     1.    22.     3 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    | * 30 |          INDEX RANGE SCAN | X$ PR74MSS0WBH028JE0GUCLBK0LHM4 |     1.       |     2 (0) | 00:00:01 |       |       |  Q1, 03 | SVCP |            |

    |  31.         ITERATOR SYSTEM PARTITION.                                |     4.   168.     5 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    | * 32 |          TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |     4.   168.     5 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    | * 33 |           INDEX RANGE SCAN | INCIDENT_PATHTABLE_PIKEY_IX |     4.       |     4 (0) | 00:00:01 |    53.    54.  Q1, 03 | SVCP |            |

    |  34.        ITERATOR SYSTEM PARTITION.                                |     1.       |     2 (0) | 00:00:01 |   KEY |   KEY |  Q1, 03 | SVCP |            |

    | * 35 |         INDEX RANGE SCAN | INCIDENT_PATHTABLE_KEY_IX |     1.       |     2 (0) | 00:00:01 |   KEY |   KEY |  Q1, 03 | SVCP |            |

    | * 36 |       TABLE ACCESS BY LOCAL INDEX ROWID | INCIDENT_PATHTABLE |     1.    42.     3 (0) | 00:00:01 |     1.     1.  Q1, 03 | SVCP |            |

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

    PLAN_TABLE_OUTPUT

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

    Information of predicates (identified by the operation identity card):

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

    10 - access("SYS_P9".") PATHID '=' ID')

    Access (SYS_PATH_REVERSE ("PATH") 15 - > = HEXTORAW ('02582E') AND SYS_PATH_REVERSE ("PATH") < HEXTORAW ('02582EFF'))

    16 - access("SYS_P11".") RID "IS 'SYS_P9'." GET RID OF"AND TBL$ OR$ IDX$ PART$ NUM ("CORPAUDLIVE". "THE INCIDENT", 0,7,65535, "SYS_P9" "." " "RID") = TBL$ OR$ IDX$ PART$ NUM ("CORPAUDLIVE". "INCIDENT_PATHTAB

    THE', 0,7,65535, ROWID))

    filter ("SYS_P9". "ORDER_KEY" < = 'SYS_P11' "." " ORDER_KEY' AND 'SYS_P11 '. "" ORDER_KEY "< SYS_ORDERKEY_MAXCHILD ("SYS_P9". "ORDER_KEY")) "

    20 filter (SYS_XMLI_LOC_ISTEXT ("SYS_P11". "LOCATOR", "SYS_P11" "." " PATHID') = 1)

    21 - access("SYS_P11".") The VALUE "= 'John')

    23 filter (SYS_XMLI_LOC_ISNODE ("SYS_P9". "LOCATOR") = 1 AND SYS_OP_BLOOM_FILTER (: BF0000, "SYS_P9".) " PATHID'))

    PLAN_TABLE_OUTPUT

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

    24 - filter("A".") INCIDENT_DATE' > = TIMESTAMP' 2014 - 10 - 01 00:00:00.000000000 "AND"A"". "" INCIDENT_DATE"< = TIMESTAMP' 2014 - 10 - 09 00:00:00.000000000' AND

    "ITEM_2" = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT", 0,7,65535, "A". ROWID))

    25 filter ("ITEM_4" = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT", 0,7,65535, "A".) ROWID))

    30 - access (SYS_PATH_REVERSE ("PATH") > = HEXTORAW('027FF9') AND SYS_PATH_REVERSE ("PATH") < HEXTORAW ('027FF9FF'))

    32 filter (SYS_XMLI_LOC_ISNODE ("SYS_P2". "LOCATOR") = 1) "

    33 - access("SYS_P2".") GET RID OF"="A ". ROWID AND 'SYS_P2 '. ("' PATHID '=' ID ')

    35 - access("SYS_P4".") GET RID OF"="A ". ROWID AND 'SYS_P2 '. "" ORDER_KEY "< ="SYS_P4. " "" ORDER_KEY "AND"SYS_P4 ". "" ORDER_KEY "< SYS_ORDERKEY_MAXCHILD ("SYS_P2". "ORDER_KEY")) "

    filter ("SYS_P4". "RID"IS "SYS_P2"." GET RID OF"AND TBL$ OR$ IDX$ PART$ NUM("INCIDENT",0,7,65535,"SYS_P2".") "RID") = TBL$ OR$ IDX$ PART$ NUM ("INCIDENT_PATHTABL

    E «(, 0,7,65535, ROWID)).

    36 - filter("SYS_P4".") The VALUE '= 'clark' AND SYS_XMLI_LOC_ISTEXT ("SYS_P4".' LOCATOR', 'SYS_P4 '. (("" PATHID ') = 1).

    PLAN_TABLE_OUTPUT

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

    Note

    -----

    -dynamic sample used for this survey (level = 6)

    69 selected lines.

    Elapsed time: 00:00:00.47

    SQL > spool off

    Thank you

    CenterB

    You must create a XMLIndex with two groups:

    create table actionnew)

    number of action_pk

    action_date timestamp

    action_detail xmltype

    )

    partition by (range (action_date)

    partition values before_2015 less (timestamp ' 2015-01-01 00:00:00 ')

    , partition values jan_2015 less (timestamp ' 2015-02-01 00:00:00 ')

    , partition values feb_2015 less (timestamp ' 2015-03-01 00:00:00 ')

    );

    create index actionnew_sxi on actionnew (action_detail)

    indexType is xdb.xmlindex

    local

    parameters (q'~)

    Group my_group_1

    XMLTable actionnew_xt1

    "/ audit/action_details/screen_data/tables/table/row.

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    Group my_group_2

    XMLTable actionnew_xt2

    "/ audit/action_details/fields.

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    ~'

    );

    Select x.*

    to actionnew t

    xmltable)

    "/ audit/action_details/screen_data/tables/table/row.

    in passing t.action_detail

    path of varchar2 (100) the columns "name".

    , path of surname varchar2 (100) "first name".

    ) x

    where t.action_date between timestamp ' 2015-02-01 00:00:00 '

    and timestamp ' 2015-03-01 00:00:00 '

    and x.forename = 'anwardo. '

    and x.surname = 'gram '.

    ;

  • Table 1 d Split in 2d

    Hello

    I want to divide a table 1 d of paths in a 2d array. Attached, I have a copy of my path-table 1 d. The aim should be that all the filenames without extensions are in a line. For example: 1st row: .bst 00124241-, 00124241 - .dat, 00124241 - .by 2nd row: .dat .by 00124244-, 00124244-- and so on. My static solution for those who can't handle a file type missing due to the modulo function of file types.

    Someone at - it an idea?

    Kind regards

    --
    Joachim

    Try something like that. Modify if needed.

  • How to read the .txt adfLib pot file to the model layer by using the relative path

    Hello

    In my application, I use the ExtendedDynamicFldTbl (extends weblogic.wtc.jatmi.DynamicFldTbl), which the manufacturer requires the field file path table as a parameter.

    In the API, it is said that this name of path can be an absolute path, a relative path to the directory where Java has started, or a relative path that can be found as a resource on the classpath.

    I have created this ExtendedDynamicFldTbl to the model layer project, placed the fild_tbl.txt in a separate package and pass the path relative to the DynamicFldTbl constructor.

    Given my code below to get the instance of ExtendedDynamicFldTbl
    package model.tuxedo;
    
    public class ExtendedFldTbl  extends DynamicFldTbl
    {
    
        private static ExtendedFldTbl extendedFldTblinstance = null;
        
        public ExtendedFldTbl(String tablePath, boolean flag)
        {
            super(tablePath, flag);
        }
        
        public static ExtendedFldTbl getInstance()
        {
            if (extendedFldTblInstance == null)
            {
                URL url = extendedFldTblInstance.class.getResource("resource/fldtbl.txt");
                if (url == null)
                {
                    throw new RuntimeException("Tuxedo Service : fldtbl.txt is not found in the path 'model.tuxedo.resource' ");
                }
                extendedFldTblInstance = new ExtendedFldTbl (url.getPath(), true);
                String[] list = extendedFldTblInstance .getFldNames();
                System.err.println("fldtbl loaded. Total FML entries loaded = " + list.length);
            }
            return extendedFldTblInstance ;
        }
    }
    I just added the output of the build of the layer model to view the project of the layer and tested. It works fine and I am able to get the ExtendedFldTbl instance with all loaded fields. But rather than add dependencies, if I create an adfLibJar for the layer model project and you add to view the project of the layer, it does not work. It is not ablt to read the file of adf lib jar file.

    Issues related to the:

    1. How can I solve this?
    2. Although I have kept the field text file table in the source of the project itself, when I read the url, it is
    "C:/Documents and Settings/raguramanv/Application Data/JDeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/tmp/_WL_user/SampleWtc/3gkmt9/war/WEB-INF/lib/SampleWtc_Model_adflibSampleWtc1.jar!/model/tuxedo/resource/fldtbl.txt"
    Instead of the physical directory, how can I use application in model layer context?


    Thanks in advance

    Rambeau

    Hello

    Try /adf/ or /afr/ in the URL. Then includes the ADF resource loader which is used to get the contents of a lib of the ADF. Take a look at the structure of ADF library where the file is located in. It should be in a directory with /adf in the folder structure

    Frank

  • Geometry of the path / display

    I work with java api (oracle.spatial.network.lod) to perform a network analysis and had a slight problem with the result defined by analysis features. The results of the analysis functions (most anyway) are LogicalSubPath and I wonder how I can show these results (e.g.: the shortest path between two nodes) because they do not understand the information of geometry? SpatialPath has a function getGeometry, but it seems not all methods to transform the LogicalSubPath of a SpatialPath. I use the link_ids to retrieve the geometry of the DB and then make them, but it of a bit difficult to handle and seems inefficient (especially for the great bond games). I'm guessing there's a much better way to do it. I do not have an array of path associated with the network, simply links and nodes, so this is a constraint. Thank you.

    You can convert a LogicalSubPath to SpatialPath by using the readSpatialPath method.

    A segment of example code that illustrates the transformation is given below. It also shows how to write a path and a subpath into tables (tables of path and the subpath of the network) database using writePath and writeSubPath methods.

    The network needs to be registered as space and path tables and the subpath must be stored in the metadata.

    The following code segment writes two way of reference geometry
    and tables sous-tracé in PATH and subpath$, respectively.
    RefPath LogicalLightPath = null;
    If (sous-tracé instanceof LogicalSubPath)
    refPath = ((LogicalSubPath) subPath) .getReferencePath ();
    on the other
    refPath = subPath.getReferenceLightPath ();
    LogicalPath path = refPath (LogicalPath);
    SPath = networkIO.readSpatialPath (path) SpatialPath;
    SpatialSubPath spatialSubPath = networkIO.readSpatialSubPath (subPath);
    networkIO.writePath (sPath, "resultPath", null);
    networkIO.writeSubPath(spatialSubPath,1,"resSubPath",null);

    In the segment of code, the variable subpath is the LogicalSubPath and networkIO is being output.

  • How to remove lines of 2D array in this case...

    Hello. I'm just begging adventure with labview so please patient. I created a whitch program assumes that the work following the path:

    2D entry table is table created by FOLDER NAVIGATION Subvi. It works this way, browse by folder and looking for txt files which contanins measurment data. In my case Subvi based 4 files and their headers read information on what types of data are in file also their the path. 2D Array Input is created in this way. Subvi named TRACES OF PATHS TABLE make photo with polar/XY trace. Is to only create these plots and legends about a picture as many files (their paths) is installed to the program by the output array. I did this Subvi this way and I wouldn't change it.

    My problem is that in the same loop program (witch check any changes by the user) supposed to relay anly these rows (files) for that checkbox is marked, for example marking anly 1 and 4 box, the program should choose between the row of table 1 and 4 only input and passes the results matrix, then the Subvi pathnames TABLE PLOTS makes an image only with 1 to 4 of plot and legend only for the parcel 1 and 4. The best solution would be that a witch relay is avtivated by logic signal. He lost to me ideas how to fix it, I'm just around the corner from blaind...

    I tried using delete in the table, but I don't know how to use it properly in this program, becease it can be only before or after for loop. This is the scan of the front panel and main problem. Please settle down somehow to solve this problem.

    Concerning

    I have attached a vi. Is this the one you need?

  • How to create XMLIndex in the specific tablespace

    Hi all I am using 12 c

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics,
    Oracle Database Vault and Real Application Testing options
    

    IM creating a XMLIndex that goes to the default tablespace

    15:34:40 SQL> CREATE INDEX TEST_IX ON dummy_table (xcontent)
    15:34:40   2  INDEXTYPE IS XDB.XMLINDEX
    15:34:40   3* PARAMETERS ('PATHS (INCLUDE (//DEFINITION/*) )')
    15:34:40  /
    Index created.
    15:34:40 SQL> 
    
    


    But when I try to specify a tablespace it error, what is the correct clause to specify a storage space for this type of index? I tried to follow doc Oracle but can't do work


    15:46:53 SQL>
      1  CREATE INDEX TEST_IX ON dummy_table (xcontent)
      2  INDEXTYPE IS XDB.XMLINDEX
      3  PARAMETERS ('PATHS (INCLUDE (//DEFINITION/*) )')
      4* TABLESPACE MEDIUM_INDEXES
    15:46:58 SQL> /
    TABLESPACE MEDIUM_INDEXES
    *
    ERROR at line 4:
    ORA-29850: invalid option for creation of domain indexes
    
    

    Thanks in advance

    SQL> CREATE INDEX XIDX_TEST_01
      2    ON TEST(XMLDOC)
      3    INDEXTYPE IS XDB.XMLINDEX
      4    LOCAL
      5    PARAMETERS
      6        ('PATHS (INCLUDE (/Employees/SSN /Employees/DateOfBirth)
      7                NAMESPACE MAPPING (xmlns="http://www.myserver.com/schema.v1.xsd")
      8              )
      9         PATH TABLE XDIX_TEST_PATHTABLE     (TABLESPACE USERS)
    10          PIKEY      INDEX XDIX_TEST_PIKEY   (TABLESPACE USERS)
    11          PATH ID    INDEX XDIX_TEST_PATH_ID (TABLESPACE USERS)
    12          ORDER KEY  INDEX XDIX_TEST_KEY     (TABLESPACE USERS)
    13          VALUE      INDEX XDIX_TEST_VALUE   (TABLESPACE USERS)
    14          ASYNC (SYNC ALWAYS) STALE (FALSE)'
    15         );

    Exercise in Range Partitioning, Structured and Unstructured XMLIndexes

    It is in the syntax / flow diagrams in the Oracle XMLDB, Developer's Guide index XML chapter... (not in the reference guide)


  • Excel XML format

    Hi, I have an excel XML file that is downloaded from SAP as below, and I use the method in

    https://odieweblog.WordPress.com/2012/02/12/how-to-read-and-write-Office-2003-Excel-XML-files/

    to read the data in the xml file, but some columns eg.Component Req Qty (cell 22) was not read correctly.

    y does it have that no XML Guru can help see something wrong with the SQL?

    (Attached XML file)

    Thank you

    Vincent

    Here is the SQL code, I used to read the xml data.

    Select x1.sheetname

    x 2. PO

    x2.plant

    x 2. WH

    x2.fgpn

    x 2. PO_QTY

    x 2. PN

    x2.sortstring

    x2.q1, x2.q2, x2.q3, x2.q4, x2.q5, x2.q6, x2.q7, x2.q8, x2.q9, x2.q10, x2.q11

    of cust_tmp_xml t

    xmltable)

    XmlNamespaces (default ' urn: schemas-microsoft - com:office:spreadsheet')

    "urn: schemas-microsoft - com:office:spreadsheet" as "ss") "."

    , "/ Workbook/worksheet.

    in passing t.object_value

    path of sheetname varchar2 columns (31) ' @ss: name '

    , lines xmltype path ' Table/Row.

    ) x 1

    xmltable)

    XmlNamespaces (default ' urn: schemas-microsoft - com:office:spreadsheet')

    "' /Row [position () > 1]"

    in passing x1.rowset

    "path of varchar2 (20) column IN. ' Cell [1] / data"

    ", path of varchar2 (20) plant ' Cell [2] / data"

    ", Path of varchar2 (20) WH ' cell [3] / data"

    ", Path of varchar2 (20) FGPN ' cell [4] / data"

    ", Path of the PO_QTY NUMBER ' cell [7] / data"

    ", Path of varchar2 (30) PN ' cell [8] / data"

    ", sortstring varchar2 (10) path ' [11] cell / data"

    , path of varchar2 (20) T1 ' cell [15] / data '

    , path of varchar2 (20) q2 ' cell [16] / data '

    , path of varchar2 (20) q3 ' cell [17] / data '

    , path of varchar2 (20) q4 ' cell [18] / data '

    ", path number q5 ' cell [19] / data"

    ", q6 varchar2 (20) path ' cell [20] / data"

    ", path of varchar2 (20) q7 ' cell [21] / data"

    , path of varchar2 (20) q8 "[22] cellular / data"

    ", path of varchar2 (20) q9 ' cell [23] / data"

    ", path of varchar2 (20) q10 ' cell [24] / data"

    , path of varchar2 (20) q11 ' cell [25] / data '

    ) x 2

    where x1.sheetname = "Sheet1".

    SQL> with cells (r_num, c_data, c_pos) as (
      2      select /*+ no_merge(x1) */
      3             x2.r_num
      4           , x3.c_data
      5           , x3.c_num
      6             + nvl(
      7                 last_value(x3.c_idx - x3.c_num ignore nulls)
      8                 over(partition by x2.r_num order by x3.c_num)
      9               , 0
     10               )
     11      from gtt_xml t
     12         , xmltable(
     13             xmlnamespaces(
     14               default 'urn:schemas-microsoft-com:office:spreadsheet'
     15             , 'urn:schemas-microsoft-com:office:spreadsheet' as "ss"
     16             )
     17           , '/Workbook/Worksheet'
     18             passing t.object_value
     19             columns sheetname varchar2(4000) path '@ss:Name'
     20                   , rowset    xmltype        path 'Table/Row'
     21           ) x1
     22         , xmltable(
     23             xmlnamespaces(default 'urn:schemas-microsoft-com:office:spreadsheet')
     24           , '/Row'
     25             passing x1.rowset
     26             columns r_num for ordinality
     27                   , cells xmltype path 'Cell'
     28           ) x2
     29         , xmltable(
     30             xmlnamespaces(
     31               default 'urn:schemas-microsoft-com:office:spreadsheet'
     32             , 'urn:schemas-microsoft-com:office:spreadsheet' as "ss"
     33             )
     34           , '/Cell'
     35             passing x2.cells
     36             columns c_num  for ordinality
     37                   , c_data varchar2(4000) path 'Data/text()'
     38                   , c_idx  number         path '@ss:Index'
     39           ) x3
     40      where x1.sheetname = 'Sheet1'
     41      and x2.r_num > 1
     42  )
     43  select *
     44  from cells
     45  pivot (
     46    min(c_data)
     47    for c_pos in (
     48      1    as PO
     49    , 2    as plant
     50    , 3    as WH
     51    , 4    as FGPN
     52    , 7    as PO_QTY
     53    , 8    as PN
     54    , 11   as sortstring
     55    , 15   as q1
     56    , 16   as q2
     57    , 17   as q3
     58    , 18   as q4
     59    , 19   as q5
     60    , 20   as q6
     61    , 21   as q7
     62    , 22   as q8
     63    , 23   as q9
     64    , 24   as q10
     65    , 25   as q11
     66    )
     67  );
    
         R_NUM PO             PLANT     WH     FGPN           PO_QTY   PN             SORTSTRING   Q1    Q2          Q3    Q4           Q5                        Q6    Q7                        Q8      Q9      Q10      Q11
    ---------- -------------- --------- ------ -------------- -------- -------------- ------------ ----- ----------- ----- ------------ ------------------------- ----- ------------------------- ------- ------- -------- ------
             2 100002343123   2010      201    P19314-01OOS   69       P19315-01OOS                                                     2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
             3 100002343123   2010      201    P19314-01OOS   69       P00069-01OOS                230   R030702D01  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   276     276     585      276
             4 100002343123   2010      201    P19314-01OOS   69       P00070-01OOS                260   F010506A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   414     414     650      414
             5 100002343123   2010      201    P19314-01OOS   69       P00074-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   966     0       0        0
             6 100002343123   2010      201    P19314-01OOS   69       P00074-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   2208    0       0        0
             7 100002343123   2010      201    P19314-01OOS   69       P00075-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   483     0       0        0
             8 100002343123   2010      201    P19314-01OOS   69       P00079-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     0       0        0
             9 100002343123   2010      201    P19314-01OOS   69       P00079-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   276     0       0        0
            10 100002343123   2010      201    P19314-01OOS   69       P00080-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   1311    0       0        0
            11 100002343123   2010      201    P19314-01OOS   69       P00080-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   138     0       0        0
            12 100002343123   2010      201    P19314-01OOS   69       P00081-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   897     0       0        0
            13 100002343123   2010      201    P19314-01OOS   69       P00081-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   483     0       0        0
            14 100002343123   2010      201    P19314-01OOS   69       P00212-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   690     0       0        0
            15 100002343123   2010      201    P19314-01OOS   69       P00221-01OOS                200   S101401A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   138     138     138      138
            16 100002343123   2010      201    P19314-01OOS   69       P00226-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   759     0       0        0
            17 100002343123   2010      201    P19314-01OOS   69       P00227-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   759     0       0        0
            18 100002343123   2010      201    P19314-01OOS   69       P00227-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   483     0       0        0
            19 100002343123   2010      201    P19314-01OOS   69       P00228-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   138     0       0        0
            20 100002343123   2010      201    P19314-01OOS   69       P00233-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     0       0        0
            21 100002343123   2010      201    P19314-01OOS   69       P00233-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   828     0       0        0
            22 100002343123   2010      201    P19314-01OOS   69       P00244-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   276     0       0        0
            23 100002343123   2010      201    P19314-01OOS   69       P00244-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     0       0        0
            24 100002343123   2010      201    P19314-01OOS   69       P00279-01OOS                210   P020806E    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   552     552     552      552
            25 100002343123   2010      201    P19314-01OOS   69       P00394-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            26 100002343123   2010      201    P19314-01OOS   69       P00397-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     0       0        0
            27 100002343123   2010      201    P19314-01OOS   69       P00420-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            28 100002343123   2010      201    P19314-01OOS   69       P00421-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   552     0       0        0
            29 100002343123   2010      201    P19314-01OOS   69       P00811-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            30 100002343123   2010      201    P19314-01OOS   69       P01127-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   414     0       0        0
            31 100002343123   2010      201    P19314-01OOS   69       P01169-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   138     138     0        138
            32 100002343123   2010      201    P19314-01OOS   69       P01333-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            33 100002343123   2010      201    P19314-01OOS   69       P01333-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            34 100002343123   2010      201    P19314-01OOS   69       P01423-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      69      0        69
            35 100002343123   2010      201    P19314-01OOS   69       P02310-01OOS                200   S101403B    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   2070    2070    3000     2070
            36 100002343123   2010      201    P19314-01OOS   69       P02373-01OOS                200   S101404B    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   4899    4899    5000     4899
            37 100002343123   2010      201    P19314-01OOS   69       P03184-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      69      0        69
            38 100002343123   2010      201    P19314-01OOS   69       P03490-01OOS                260   F010502A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   414     414     847      414
            39 100002343123   2010      201    P19314-01OOS   69       P03670-01OOS                200   S100202B    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   138     138     138      138
            40 100002343123   2010      201    P19314-01OOS   69       P03695-01OOS                230   SS BIN 1    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     207     639      207
            41 100002343123   2010      201    P19314-01OOS   69       P03742-01OOS                230   SS BIN 1    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      69      381      69
            42 100002343123   2010      201    P19314-01OOS   69       P03848-01OOS                260   F030400A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   9108    9108    9108     9108
            43 100002343123   2010      201    P19314-01OOS   69       P03954-01OOS                230   SS BIN 1    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   690     454     454      454
            44 100002343123   2010      201    P19314-01OOS   69       P04097-01OOS                260   F040306C    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   483     483     500      483
            45 100002343123   2010      201    P19314-01OOS   69       P05120-01OOS                260   F020303B    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   483     483     483      483
            46 100002343123   2010      201    P19314-01OOS   69       P03316-02OOS                210   P020104A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      69      5        69
            47 100002343123   2010      201    P19314-01OOS   69       1400-0617YJY                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   207     0       0        0
            48 100002343123   2010      201    P19314-01OOS   69       8110-0002YJS                210   P020606A    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   27.6    27.6    0        27.6
            49 100002343123   2010      201    P19314-01OOS   69       345300CYJS                  200   S090406B    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      69      69       69
            50 100002343123   2010      201    P19314-01OOS   69       345301CYJS                                    525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   13.8    0       0        0
            51 100002343123   2010      201    P19314-01OOS   69       3508-0133YJS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   0       0       0        0
            52 100002343123   2010      201    P19314-01OOS   69       P00271-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
            53 100002343123   2010      201    P19314-01OOS   69       P00544-01OOS                                  525   PRODSUPPLY   2015-04-09T00:00:00.000   69    2015-04-09T00:00:00.000   69      0       0        0
    
    52 rows selected.
    
  • XmlIndex subsetting question


    I have a table EMP that contains an xmltype column called empinfo

    CREATE TABLE EMP
    (
    DATE EVENT_DATE,
    empinfo SYS. XMLTYPE
    )
    XMLTYPE XML STORE AS BINARY XML NAVIGATION

    This pass of xmltype contains xml unstructured documents. I am interested in indexing on 'empno '.
    I am able to create an index, but it will be only works on the first level.


    CREATE INDEX subset_xmlindex ON emp (empinfo)
    indexType IS xdb.xmlindex
    parameters ("PATHS (INCLUDE (//empno))
    path table subset_pathtable (undesirable tablespace)');

    When I do the next xmlexists, he found all the empno, but it does not use the index.

    XMLExists ('/ / * [empno = 171943270] ' from empinfo)

    When I do that it finds the empno in the fitrst level and use the index. but it does not find the empno < empinfo > level.
    and xmlexists ('/ person / * [empno = 1073630546]' from empinfo)


    question: How can I use the index on all the elements 'empno' wherever they are in the doc.
    is it still possible? the table contains millions of records.

    doc suggest using //empno in the index include the will of the index on the regradless of all the empno hence they are.

    -xml1

    < person >
    < personrecord >
    < name >
    .....
    < empno >
    ...
    < / personrecord >
    < / person >


    -xml2
    < person >
    < personinfo >
    < name >
    ....
    < empinfo >
    < empno >
    ....
    < / empinfo >
    ....
    < / personrecord >
    < / person >

    Version database please?

    And question: is there still a single node "empno" by the document?

    The following works for me.

    Make sure you pass the link as string variable, no number (unless you create an additional digital index on the VALUE of path):

    SQL> select *
      2  from emp
      3  where xmlexists('//empno[.=$empno]'
      4          passing empinfo
      5                , '7777' as "empno"
      6        )
      7  ;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1962240707
    
    -------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                        | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                 |                                |     1 |   145 |     5  (20)| 00:00:01 |
    |   1 |  NESTED LOOPS                    |                                |     1 |   145 |     5  (20)| 00:00:01 |
    |   2 |   VIEW                           | VW_SQ_1                        |     1 |    12 |     3   (0)| 00:00:01 |
    |   3 |    HASH UNIQUE                   |                                |     1 |    47 |            |          |
    |   4 |     NESTED LOOPS                 |                                |       |       |            |          |
    |   5 |      NESTED LOOPS                |                                |     1 |    47 |     3   (0)| 00:00:01 |
    |   6 |       TABLE ACCESS BY INDEX ROWID| X$PT72R2I5S5V9A9VE0GOACG0GKWIG |     1 |    12 |     2   (0)| 00:00:01 |
    |*  7 |        INDEX RANGE SCAN          | X$PR72R2I5S5V9A9VE0GOACG0GKWIG |     1 |       |     1   (0)| 00:00:01 |
    |*  8 |       INDEX RANGE SCAN           | SYS166546_SUBSET_XM_VALUE_IX   |     7 |       |     0   (0)| 00:00:01 |
    |*  9 |      TABLE ACCESS BY INDEX ROWID | SYS166546_SUBSET_XM_PATH_TABLE |     1 |    35 |     1   (0)| 00:00:01 |
    |  10 |   TABLE ACCESS BY USER ROWID     | EMP                            |     1 |   133 |     1   (0)| 00:00:01 |
    -------------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       7 - access(SYS_PATH_REVERSE("PATH")>=HEXTORAW('021FD8')  AND
                  SYS_PATH_REVERSE("PATH")
    

    Alternatively, if each doc contains at most one occurrence of 'empno', you can add a virtual column that retrieves and create an index on this column:

    SQL> alter table emp add empno number generated always as (
      2    xmlcast(xmlquery('//empno' passing empinfo returning content) as number)
      3  )
      4  virtual ;
    
    Table altered.
    
    SQL>
    SQL> create index emp_empno_i on emp (empno);
    
    Index created.
    
    SQL> select * from emp where empno = 7777;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1114809652
    
    -------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |             |     1 |   133 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP         |     1 |   133 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | EMP_EMPNO_I |     1 |       |     1   (0)| 00:00:01 |
    -------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("EMPNO"=7777)
    
  • FBI and XMLINDEX not use by the optimizer

    Hello

    I've created a function based index but optimizer is never using my index and found for BINARYXML FBI is not suggested rather THAN XMLINDEX is good, it seems does not work for me, but even.

    I tried to use tips but doesn't help me at all. Any suggestions would be really useful.

    SQL > show parameter index

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    optimizer_index_caching integer 0
    OPTIMIZER_INDEX_COST_ADJ integer 1
    optimizer_use_invisible_indexes boolean FALSE
    skip_unusable_indexes Boolean TRUE
    SQL >

    SQL > desc FXXX_SEC_POS_FB
    Name                                                                                  Null?    Type
    ------------------------------------------------------------------------------------- -------- ----------------------------------------------------------
    RECID A NOT NULL VARCHAR2 (255)
    XMLRECORD                                                                                      SYS. XMLTYPE BINARY STORAGE

    SQL >

    SQL * more: Production release 11.2.0.4.0 Wed Feb 11 06:34:39 2015

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    INDEX_NAME INDEX_TYPE VISIBILITY FUNCIDX_ DOMIDX_MANAGEM
    ------------------------------ --------------------------- --------- -------- --------------
    SYS_IL0000174507C00003$ $ LOB VISIBLE
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C2
    BASED ON A NORMAL VISIBLE ENABLED FUNCTION IX_FBNK_SEC_POS_FB_C81

    SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists ("$xmlrecvar/row [c81/text () ="US0010001"]' by the WAY ')

    XMLRECORD AS 'xmlrecvar')

    The higher the SQL statement execution Plan:

    Hash value of plan: 4259655978

    --------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    --------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |   1.  SEMI NESTED LOOPS.                 |   361K |   738 M |   197K (2) | 00:39:31 |
    |*  2 |   TABLE ACCESS FULL | FBNK_SEC_POS_FB |  4427 |  9247K |  75786 (1) | 00:15:10 |
    |*  3 |   XPATH EVALUATION.                 |       |       |            |          |
    --------------------------------------------------------------------------------------

    Name of the query block / Alias object (identified by the operation identity card):
    -------------------------------------------------------------

    1 SALT$ BCF67709
    2 SALT$ BCF67709 / [email protected]$1

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - filter("SECURITY_NUMBER"='000566-000')
    3 - filter("P".") C_01$ "= 'US0010001')

    Projection of the column information (identified by the operation identity card):
    -----------------------------------------------------------

    1 (#keys = 0) "T". "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    2 - « T ». "RECID" [VARCHAR2, 255], "T" "." " SYS_NC00003$ '[LOB, 4000],
    "SECURITY_NUMBER" [VARCHAR2, 12]
    3 VALUE (A0) [4000]

    Note
    -----
    -dynamic sample used for this survey (level = 2)
    LETTER: SQL: 2:Full: SELECT t.RECID FROM FBNK_SEC_POS_FB WHERE SECURITY_NUMBER = t'000566-000' and xmlexists (' $xmlrecvar/row [c81 / text ()])

    (= "US0010001"]' in PASSING XMLRECORD AS 'xmlrecvar')

    4096 selected records

    You probably won't see the difference in approach...

    I have NOT used and not STRUCTURED XML, but a STRUCTURED index rather XML index...

    • Index unstructured XML when introduced in 11.1 and use an ARRAY of path. Unstructured XML indexes are mainly used for research "blurred".
    • Structured XML indexes where introduced in 11.2 and make use of one or more TABLES of CONTENTS that contain, must contain content of the structured parts in the XML document

    So I have not used

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
    ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
    PARAMETERS ('  PATH TABLE IX_PATH_TABLE
                    PATHS (  INCLUDE ( /row/c2 /row/c81 ))'
                );
    

    but instead I used a XML structured, based on the function XMLTABLE index

    CREATE INDEX IX_FXXX_AAA_BBB_FB_FB
      ON FXXX_AAA_BBB_FB (XMLRECORD)
    INDEXTYPE IS XDB.XMLINDEX
      PARAMETERS (q'# GROUP SXI_GROUP
                      XMLTABLE SXI_CONTENT_TABLE
                      '/row'
                      COLUMNS
                        C2  VARCHAR2(100)     PATH 'c2'
                      , C81 VARCHAR2(100)     PATH 'c81'
                    #');
    

    On those, I also created EXTRA build secondary indexes on the columns of the TABLE CONTENT with the name 'SXI_CONTENT_TABLE '.

    create index SEC_FXXX_C2_FB on SXI_CONTENT_TABLE(C2);
    create index SEC_FXXX_C81_FB on SXI_CONTENT_TABLE(C81);
    create unique index SEC_FXXX_RIDC2C81_FB on SXI_CONTENT_TABLE(RID, C2, C81);
    

    ...

  • SQL Code Analyzer

    Hi all

    My requirement is analysis a query and find out what are the tables and the columns involved.

    We have columns Source and the only table names in a query.

    Query can be any format as sub, with clause query...

    There are 1000's of queries that analysis must...

    Is there a simple way... ???

    Thank you

    Elayaperumal S

    Yes.

    The following approach can be used (does any syntax, but does the basics):

    SQL> create or replace function XmlParse( dynamicSQL varchar2 ) return XmlType is
      2          c       clob;
      3          xml     XmlType;
      4  begin
      5          dbms_lob.CreateTemporary( c, true );
      6          sys.utl_xml.ParseQuery(
      7                  user,
      8                  dynamicSQL,
      9                  c
     10          );
     11
     12          xml := new XmlType(c);
     13          dbms_lob.FreeTemporary(c);
     14          return( xml );
     15  end;
     16  /
    
    SQL>
    SQL> with xml_parse( xml ) as(
      2          select XmlParse( 'select sysdate as day, e.*, d.* from emp e, dept d where e.deptno = d.deptno and empno = :1' ) from dual
      3  )
      4  select
      5          t.*
      6  from       xml_parse p,
      7          XmlTable( '/QUERY/SELECT/SELECT_LIST/SELECT_LIST_ITEM/COLUMN_REF'
      8                  passing p.xml
      9                  columns
     10                          table_name varchar2(30) path 'TABLE',
     11                          column_name varchar2(30) path 'COLUMN'
     12          ) t
     13  /
    
    TABLE_NAME                     COLUMN_NAME
    ------------------------------ ------------------------------
    EMP                            EMPNO
    EMP                            ENAME
    EMP                            JOB
    EMP                            MGR
    EMP                            HIREDATE
    EMP                            SAL
    EMP                            COMM
    EMP                            DEPTNO
    DEPT                           DEPTNO
    DEPT                           DNAME
    DEPT                           LOC
    
    11 rows selected.
    
    SQL>
    
  • ORA-29874: caution in the performance of routine ODCIINDEXALTER

    Hello

    I'm on Oracle 11.2.0.3

    [code]

    drop table test;

    create table test of xmltype.

    Insert in the test

    values (')

    < employee

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: noNamespaceSchemaLocation =" "> ".

    < location >

    < joiningDate id = "on site" >

    2012 06-18 of < hireDate > < / hireDate >

    < / joiningDate >

    < joiningDate id = "offshore" >

    2011 07-8 < hireDate > < / hireDate >

    < / joiningDate >

    < / location >

    (< / employee > ');

    commit;

    exec ('myprop') DBMS_XMLINDEX.dropParameter;

    CREATE INDEX test_xml_index ON test (OBJECT_VALUE)

    INDEXTYPE IS XDB. PARAMETERS XMLIndex ("test_dates_tab WAY of TABLE");

    BEGIN

    () DBMS_XMLINDEX.registerParameter

    "myprop",.

    ' ADD_GROUP GROUP test_dates

    XMLTable test_dates_tab "/ employee"

    XMLNAMESPACES ("http://www.w3.org/2001/XMLSchema-instance" AS "xsi")

    COLUMNS on the spot date PATH ".//*[@id="onsite"]/hiredate/text ()"

    ');

    END;

    /

    ALTER INDEX SETTINGS ('myprop PARAM') test_xml_index;

    [/ code]

    When I run the alter index below I get the error.

    I'm following the documentation to the Indexation of the XMLType data example 6-20

    [code]

    SQL > test_xml_index ALTER INDEX SETTINGS ('myprop PARAM');

    ALTER INDEX SETTINGS ('myprop PARAM') test_xml_index

    *

    ERROR on line 1:

    ORA-29874: caution in the performance of routine ODCIINDEXALTER

    [/ code]

    ORA-29960: line 1, ORA-02000: lack of keyword

    Hello

    The example you're referring to creates an index informal first, and then add a structured component.

    Unless it's really what you want to do, simply create a structured index directly:

    CREATE INDEX test_xml_index ON test (OBJECT_VALUE)

    INDEXTYPE IS XDB. XMLIndex SETTINGS (q'~)

    Test_dates_tab XMLTable ' / employees '

    COLUMNS on the spot date PATH 'location/joiningDate[@id="onsite"]/hireDate '.

    ~'

    );

    If you want to use two components, and then specify a different XMLTABLE name of the path table.

    See my response here for more tips:

    Re: oracle xml db looking to extract the date year

  • Multipathing with SW iSCSI initiators

    Hi all

    Just curious about the multiple and iSCSI paths. Summer hope to clarify a certain number of things.

    Taking an example of a single ESXi 4.0 host to connect to a device iSCSI via a network using a software initiator.


    A vSwitch was created on the host with two rising vmnic (two assets), which are connected to the storage network. A unique VMkernel port group was created on the vSwitch with an IP address on the storage network.

    Issues related to the:

    1 have I reason to think that the configuration above do not use the two vmnic for redundancy? I assume this is the case, because it shows only a single path under the storge device?

    2. assuming that the above is correct, that if I lost any vmnic is used, I'd lose access to my storage of this host?

    3. in order to provide redundancy in case of a failure vmnic, do I need to follow the steps in the configuration guide for iSCSI SAN? (http://www.vmware.com/pdf/vsphere4/r40/vsp_40_iscsi_san_cfg.pdf) That is to create two groups of ports on the vSwitch using vmnic active replacement (with the other unused) and use the CLI to create paths?

    4. If the default config is indeed only using a single VMnic, how can that be used?

    I think I already know the answer above but would like to have a validation...

    Thank you

    Chris.

    Tru Multipathing, your storage space must have at least 2 IP addresses.

    Do not confuse redundancy with multiple paths.

    While the two work together, you can have one without the other.

    To get full redundancy and multiple paths, at a minimum, your storage server needs at least two interface IP. you need to implement a vSwitch with 2 groups of VMKernel ports, as you mentioned below. #3 and port, then bind using the CLI.

    The political path roundrobin when value over (if your table is compatible).  You should then have 2 active channels.

    In your current config.

    # 1 there is redundancy, but no multipath

    # 2 No.

    #3-Oui - preferred method for many reasons with HA, path table and load balancing selection.

    #4-is not easy to find (at least not for me).  It really depends on how your political grouping vswitch is implemented.  Bad this refer to the experts.  Don't want to confuse.

  • Error ORA-29874 with XMLIndex

    So, I am creating a XMLIndex in Oracle 11.2.0.3.0 by following the instructions here:

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e16659/xdb_indexing.htm#BCGJCEAF

    I have a table defined as follows:
    CREATE TABLE book_master OF XMLTYPE XMLTYPE STORE AS SECUREFILE BINARY XML;
    I ran the following to try to create a structured index:
    CREATE INDEX my_xmlindex_ix ON book_master (OBJECT_VALUE) INDEXTYPE IS XDB.XMLIndex PARAMETERS ('PATH TABLE path_tab');
    
    BEGIN
       DBMS_XMLINDEX.registerParameter(
          'myparam',
          'ADD_GROUP GROUP gdm_record
             XMLTable gdm_idx_tab 
             XmlNamespaces(''http://www.mrbook.com/BookFormat/PropertyLicHdr'' AS "plh",
                      ''http://www.mrbrook.com/InventoryData'' AS "invtdata", 
                      ''http://www.mrbook.com/BookFormat/Identity'' AS "idty",
                      ''http://www.mrbook.com/BookFormat/LiteraryCloneReferences'' AS "lclone",
                          ''http://www.mrbook.com/TradeInfo'' AS "trd",
                      ''http://www.mrbook.com/'' AS "book"),
             ''/invtdata:inventory''
               COLUMNS
                    book_id    RAW(16)     PATH ''@BOOK_ID'',
                    title_txt  VARCHAR(64) PATH ''plh:LIC/plh:TITLE'',
                    subj_txt   VARCHAR(64) PATH ''plh:LIC/plh:SUBJ'',
                    
                    target_mkt NUMBER(13,0) PATH ''plh:LIC/plh:MKT_NBR'',
                    
                    catg NUMBER(7,0) PATH ''idty:BOOK_INFO/idty:CATG'',
                    lang_code NUMBER(7,0) PATH ''idty:BOOK_INFO/idty:lang_code'',
                    out_of_stock_reas NUMBER(7,0) PATH ''/idty:BOOK_INFO/idty:OUT_OF_STOCK_REAS'',
                    
                    sucsr_title VARCHAR2(64) PATH ''idty:BOOK_INFO/idty:SUCSR_TITLE'',
                    sucsr_subj_txt VARHCAR2(64) PATH ''idty:BOOK_INFO/idty:SUCSR_SUBJ_TXT'',
                    
                    orig_copy_ref VARCHAR2(64) PATH ''lclone:ORIG_COPY_REF/lclone:REF[child::lclone:REF_TYP_CD="160"]/lclone:TITLE'',
                    orig_subj_txt VARCHAR2(64) PATH ''lclone:ORIG_COPY_REF/lclone:REF[child::lclone:REF_TYP_CD="160"]/lclone:SUBJ_TXT'',
                    
                    last_upd_dt TIMESTAMP PATH ''node()[local-name()="LAST_UPD_DT"]'',
                    
                    catg_ref_code  NUMBER(7) PATH ''idty:BOOK_INFO/idty:BOOK_ENTR[child::idty:BOOK_REF=1]/idty:CATG_REF_CD'',
                    catg_code VARCHAR2(48) PATH ''//idty:BOOK_INFO/idty:BOOK_ENTR[child::idty:BOOK_REF=1]/idty:CATG_CODE'',
                    
                    book_trade_info  XMLType   PATH ''trd:book_trade_info'' VIRTUAL
                    
                XMLTable trd_book_ix 
             XmlNamespaces(''http://www.mrbook.com/BookFormat/PropertyLicHdr'' AS "plh",
                      ''http://www.mrbrook.com/InventoryData'' AS "invtdata", 
                      ''http://www.mrbook.com/BookFormat/Identity'' AS "idty",
                      ''http://www.mrbook.com/BookFormat/LiteraryCloneReferences'' AS "lclone",
                          ''http://www.mrbook.com/TradeInfo'' AS "trd",
                      ''http://www.mrbook.com/'' AS "book"),
                   ''/trd:TRADE_ENTR'' PASSING book_trade_info
                COLUMNS
                    trd_yrmoday  VARCHAR2(6) PATH ''@TRD_DT_YRMODAY''
            ');
    END;
    
    ALTER INDEX book_xmlindex_ix PARAMETERS('PARAM myparam3');
    When I run the present, I have the following error:
    anonymous block completed
    Error starting at line 69 in command:
    ALTER INDEX my_xmlindex_ix PARAMETERS('PARAM myparam')
    Error report:
    SQL Error: ORA-29874: warning in the execution of ODCIINDEXALTER routine
    ORA-29960: line 1, ORA-44749: Missing PATH for the COLUMN.
    29874. 00000 -  "warning in the execution of ODCIINDEXALTER routine"
    *Cause:    A waring was returned from the ODCIIndexAlter routine.
    *Action:   Check to see if the routine has been coded correctly
               Check the user defined warning log tables for greater details.
    I checked three times and I PATH statements in the XMLTable command. I also tried to search the forums for "Path missing XMLIndex column", but I don't see anything. Does anyone have an idea how to fix this?

    Thank you...

    Edited by: KnightOfBlueArmor to add the definition of the table on March 26, 2013 14:09

    See the typo on the type of data?

    sucsr_subj_txt VARHCAR2(64) PATH ''idty:BOOK_INFO/idty:SUCSR_SUBJ_TXT'',
    

    You will have after the first error correction.

    Then, you will hit it:

    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (trd:TRADE_ENTR trd='http://www.mrbook.com/TradeInfo')
    

    That one is because the element root spent the 2nd XMLTable is 'trd:book_trade_info', but you specify "/ trd:TRADE_ENTR" in the main XQuery, where the static error found.
    Specify the correct XQuery from the root node, for example

    ''/trd:book_trade_info/trd:TRADE_ENTR'' PASSING book_trade_info
    

    or what is the true XPath.

    Then it should be OK and the parameter added correctly.

    No doubt you will become a few more errors during execution, some of them because of inconsistencies in path expressions, for example

    idty:BOOK_INFO/idty:lang_code
    //idty:BOOK_INFO/idty:BOOK_ENTR[child::idty:BOOK_REF=1]/idty:CATG_CODE
    /idty:BOOK_INFO/idty:OUT_OF_STOCK_REAS
    

    I let you discover them (if any) ;)

    Published by: odie_63 on March 26, 2013 23:09

  • Problem to create Plan to explain and use XML indexes. Please follow scenario...

    Hello

    Oracle - Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Version

    I was able to reproduce the error like below:

    Run the following code to Schema1:
    CREATE TABLE TNAME1
    (
       DB_ID            VARCHAR2 (10 BYTE),
       DATA_ID          VARCHAR2 (10 BYTE),
       DATA_ID2         VARCHAR2 (10 BYTE),
       IDENTIFIER1      NUMBER (19) NOT NULL,
       ID1              NUMBER (10) NOT NULL,
       STATUS1          NUMBER (10) NOT NULL,
       TIME_STAMP       NUMBER (19) NOT NULL,
       OBJECT_ID        VARCHAR2 (40 BYTE) NOT NULL,
       OBJECT_NAME      VARCHAR2 (80 BYTE) NOT NULL,
       UNIQUE_ID        VARCHAR2 (255 BYTE),
       DATA_LIVE        CHAR (1 BYTE) NOT NULL,
       XML_MESSAGE      SYS.XMLTYPE,
       ID2              VARCHAR2 (255 BYTE) NOT NULL,
       FLAG1            CHAR (1 BYTE) NOT NULL,
       KEY1             VARCHAR2 (255 BYTE),
       HEADER1          VARCHAR2 (2000 BYTE) NOT NULL,
       VERSION2         VARCHAR2 (255 BYTE) NOT NULL,
       TYPE1            VARCHAR2 (15 BYTE),
       TIMESTAMP1   TIMESTAMP (6),
       SOURCE_NUMBER    NUMBER
    )
    XMLTYPE XML_MESSAGE STORE AS BINARY XML 
    PARTITION BY RANGE (TIMESTAMP1)
       (PARTITION MAX
           VALUES LESS THAN (MAXVALUE)
           )
    NOCOMPRESS
    NOCACHE
    ENABLE ROW MOVEMENT
    /
    
    
    
    begin
    app_utils.drop_parameter('TNAME1_PAR');
    end;
    
    
    
    BEGIN
    DBMS_XMLINDEX.REGISTERPARAMETER(
    'TNAME1_PAR',
    'PATH TABLE     TNAME1_RP_PT
                              PATHS (INCLUDE (            /abc:Msg/product/productType
                                                                    /abc:Msg/Products/Owner
      ) 
                                     NAMESPACE MAPPING (     xmlns:abc="Abc:Set"
                                                       ))
    ');
    END;
    /
    
    
    
    CREATE INDEX Indx_XPATH_TNAME1
       ON "TNAME1" (XML_MESSAGE)
       INDEXTYPE IS XDB.XMLINDEX PARAMETERS ( 'PARAM TNAME1_PAR' )
    local;
    Then in Schema2, create
    create synonym TNAME1 FOR SCHEMA1.TNAME1
    SCHEMA1:
    GRant All on TNAME1 to SCHEMA2
    Now to SCHEMA2, if we try:
    Explain Plan for 
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t
    WHERE XMLEXISTS (
    'declare namespace abc="Abc:Set";  /abc:Msg/product/productType= ("1", "2") '
    PASSING XML_MESSAGE);
    WE GET-> ORA-00942: table or view does not exist
    While this works:
    Explain Plan for 
    SELECT xmltype.getclobval (XML_MESSAGE)
    FROM TNAME1 t
    - Please tell me, what is the reason behind this and how can I overcome it. Originally all is my point of view based on this condition to fail in another schema, and not not to pick up the XMLIndexes.

    Also
     SELECT * from DBA_XML_TAB_COLS WHERE TABLE_NAME like 'TNAME1';
    Output is as:
    OWNER | TABLE_NAME | COLUMN_NAME | XMLSCHEMA. SCHEMA_OWNER | ELEMENT_NAME | STORAGE_TYPE | ANYSCHEMA | RUN
    SCHEMA1 | TNAME1 |     XML_MESSAGE |          ||          || BINARY | DON'T | YES |
    SCHEMA1 | TNAME1 |     SYS_NC00025$ |          ||          || CLOB |     ||

    -Can I change AnySchema to YES to NO for - column_name = XML_MESSAGE? Maybe that will solve my problem.
    -SYS_NC00025$ is the XML Index, why not get all the values for ANYSCHEMA, RUN on it. What is causing the problem.


    Please suggest... Thank you...

    The problem sounds familiar. Please create a SR on http://support.oracle.com for this one.

Maybe you are looking for