ORA-01436: CONNECT loop in the user data when the delimited string splitting by the

I'm trying to split a string into records. The values are three characters more '-' with a limit of 12 values. The values themselves are a combination of two data, the first being two characters, a.

The following example translates: ORA-01436: CONNECT BY a loop in the user data

WITH
    Data(Code, Datum)
AS
    (
     SELECT 'VGCU3VM', '00V-YYG-BVC-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
     SELECT 'VGAU3VM', '00V-YYG-BVA-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
     SELECT 'VGLN3CM', '00V-YYG-BVL-PIN-DV3-EVC-TVM-' FROM Dual UNION ALL
     SELECT 'VGLT3PM', '00V-YYG-BVL-PIT-DV3-EVP-TVM-' FROM Dual UNION ALL
     SELECT 'VGAT3RA', '00V-YYG-BVA-PIT-DV3-EVR-TVA-' FROM Dual
    )
SELECT
    Datum,
    LEVEL,
    SUBSTR(Datum, ((LEVEL - 1) * 4) + 1, 2),
    SUBSTR(Datum, ((LEVEL - 1) * 4) + 3, 1)
FROM
    Data
CONNECT BY
    Code    = PRIOR Code
    AND    LEVEL    <= LENGTH(Datum) / 4;

Remove the 'Code = Code PREREQUISITE"clause, to avoid the error, but too many records are returned, because nothing is to limit the records in their own groups.

The following works:

WITH
    Data(Code, Datum)
AS
    (
     SELECT 'VGCU3VM', '00V-YYG-BVC-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
     SELECT 'VGAU3VM', '00V-YYG-BVA-PIU-DV3-EVV-TVM-' FROM Dual UNION ALL
     SELECT 'VGLN3CM', '00V-YYG-BVL-PIN-DV3-EVC-TVM-' FROM Dual UNION ALL
     SELECT 'VGLT3PM', '00V-YYG-BVL-PIT-DV3-EVP-TVM-' FROM Dual UNION ALL
     SELECT 'VGAT3RA', '00V-YYG-BVA-PIT-DV3-EVR-TVA-' FROM Dual
    )
SELECT
    Datum,
    SUBSTR(Datum, ((Some.Num - 1) * 4) + 1, 2) A,
    SUBSTR(Datum, ((Some.Num - 1) * 4) + 3, 1) B
FROM
    Data,
    (SELECT LEVEL Num FROM Dual CONNECT BY LEVEL <= 12) Some
WHERE
    SUBSTR(Datum, ((Some.Num - 1) * 4) + 1, 2) IS NOT NULL;

What causes ORA-01436?

Hello

Depending on your version, you can add another condition to your CONNECT BY clause.

It works in Oracle 11.2.0.3.0:

SELECT

Point of reference,

LEVEL,

SUBSTR (Datum, ((LEVEL-1) * 4) + 1, 2),

SUBSTR (Datum, ((LEVEL-1) * 4) + 3, 1)

Of

Data

CONNECT

Code = Code PRIOR

AND LEVEL<= length(datum)="">

AND PRIOR SYS_GUID () IS NOT NULL-* ADDED *.

;

Thanks for the display of the data of the sample; This is really useful!

In addition, relational databases are designed to have 1 piece of information in each column of each row, not a list delimited by up to 12 points.  It is so basic to the design of database he called the first normal form.  You're going to solve a lot of problems even before they occur if you paste to first normal form and change the table structure to resemble the result set of this query.  (Maybe that's exactly why you're doing this query.)

Tags: Database

Similar Questions

  • ORA-01436: CONNECT loop in the user data

    Hello

    I have a simple bit of SQL out details on HR supervisor strings in Oracle EBS:
    SELECT     LPAD(' ', (LEVEL - 1) * 10, ' ') || person_id level_label
             , LEVEL
             , description
          FROM applsys.fnd_user u
             , hr.per_all_assignments_f h
         WHERE u.employee_id = h.person_id
    START WITH SYSDATE BETWEEN effective_start_date AND effective_end_date
           AND person_id = :personid
    CONNECT BY PRIOR person_id = supervisor_id
           AND SYSDATE BETWEEN effective_start_date AND effective_end_date
    It will return data normally without problems - e.g. data dummy below - looks very good. The names and made up person_ids.
    LEVEL_LABEL                    LEVEL     DESCRIPTION
    000001                         1     Person Person 1
              000002               2     Harry Marry
                        000003          3     John Smith
                                  000004     4     Jenna Jones
                                  000005     4     Her Name
                                  000006     4     His Name
                                  000007     4     Joseph Coat
                                  000008     4     Les Miserables
                        000009          3     Mister Smith
                        000010          3     Miss Jones
                        000011          3     Andrew And
                                  000012     4     Claire So
                                  000013     4     Hilary Hi
              000014               2     Jenny Jones
                        000015          3     Amanda Mandy
                                  000016     4     James Jim
                                  000017     4     William Wonder
                                  000018     4     Crazy Cat
                                  000019     4     Silly Cat
                                  000020     4     Tall Hill
                                  000021     4     Amazing Grace
                        000022          3     Lovely Mountain
                                  000023     4     Joyous Spring
                                  000024     4     Anonymous Name
                                  000025     4     Brian Binky
    However, if I try for an another person_id, for which a user receives an error in one part of the Oracle EBS, I get this error:

    ORA-01436: CONNECT loop in the user data

    I'm guessing there is a loop of supervisor happening somewhere, but I don't know how to determine where it might happen.

    I was wondering if there is any way I can change the SQL code to be able to work out where the loop can be, as there are about 50 people involved in Ministry to this user and I have been through all their records and can not see a loop to look through the Oracle HR screens.

    I know it's a 'big ask' to ask a vague question about some oracle SQL, so apologies for that.

    Any advice much appreciated.

    Thank you

    Hello

    To see loops, do something like this:

    SELECT     SYS_CONNECT_BY_PATH (person_id, '/')     AS path
    FROM      applsys.fnd_user           u
    ,      hr.per_all_assignments_f      h
    WHERE      u.employee_id           = h.person_id
    AND     CONNECT_BY_ISCYCLE     = 1
    CONNECT BY NOCYCLE     PRIOR person_id = supervisor_id
         AND           SYSDATE      BETWEEN     effective_start_date
                             AND      effective_end_date
    ;
    

    If you would care to post CREATE TABLE and instructions INSERT for some samples, so I could test it.

    Note there is no START WITH clause.

    If, for example, Jones is the architect of Scott, Scott is the main contractor of Adams and Adams is the architect of Jones (much to other lines is not involved in a loop), then displays 3 rows of output, such as

    PATH
    ---------------------
    Jones/Scott/Adams
    Scott/Adams/Jones
    Adams/Jones/Scott
    

    Moreover, all the same CONNECT BY queries on these tables can be a lot faster if you've made the join and date filtering in a separate subquery first:

    WITH     combined_data     AS
    (
         SELECT     person_id, supervisor_id
         FROM      applsys.fnd_user           u
         ,      hr.per_all_assignments_f      h
         WHERE      u.employee_id      = h.person_id
         AND     SYSDATE      BETWEEN     effective_start_date
                        AND      effective_end_date
    )
    SELECT     SYS_CONNECT_BY_PATH (person_id, '/')     AS path
    FROM     combined_data
    WHERE     CONNECT_BY_ISCYCLE     = 1
    CONNECT BY NOCYCLE     PRIOR person_id = supervisor_id
    ;
    
  • ORA-01436: CONNECT loop in the user data, but CONNECT_BY_ISCYCLE is equal to ZERO all the

    Hello

    When I run query below, it always throws the below error:
    SELECT connect_by_root code AS code_root,
        CODE,
        CODE_DESC,
        UP_CODE 
      FROM DI_CODE_LEVEL
      WHERE TYPE_CODE='SP'
        CONNECT BY PRIOR CODE=UP_CODE;
    
    ORA-01436: CONNECT BY loop in user data
    01436. 00000 -  "CONNECT BY loop in user data"
    But when I use NOCLYCLE and CONNECT_BY_ISCYCLE to see which line is in question.
    It shows nothing, which means CONNECT_BY_ISCYCLE = ZERO for all rows.
    select * from (
        SELECT connect_by_root code AS code_root,
            CODE,
            CODE_DESC,
            UP_CODE ,
            CONNECT_BY_ISCYCLE AS ISCYCLE
          FROM DI_CODE_LEVEL
          WHERE TYPE_CODE='SP'
            CONNECT BY NOCYCLE PRIOR CODE=UP_CODE
        ) 
    where ISCYCLE>0;
    Is there another reason that sql would lift ORA-01436?
    If there is a loop, then will the combination of NOCYCLE, CONNECT_BY_ISCYCLE will show?

    Thank you

    Hello

    Apparently, one or more of the "SP" lines are at the origin of the problem.
    The WHERE clause is applied after the CONNECT BY is finished, saying:

    select * from (
        SELECT connect_by_root code AS code_root,
            CODE,
            CODE_DESC,
            UP_CODE ,
            CONNECT_BY_ISCYCLE AS ISCYCLE
          FROM DI_CODE_LEVEL
          WHERE TYPE_CODE='SP'
            CONNECT BY NOCYCLE PRIOR CODE=UP_CODE
        )
    where ISCYCLE>0;
    

    is equivalent to

    select * from (
        SELECT connect_by_root code AS code_root,
            CODE,
            CODE_DESC,
            UP_CODE ,
            CONNECT_BY_ISCYCLE AS ISCYCLE
          FROM DI_CODE_LEVEL
            CONNECT BY NOCYCLE PRIOR CODE=UP_CODE
        )
    WHERE    TYPE_CODE = 'SP'
    AND     ISCYCLE   > 0;
    

    To see where the loop occurs, you must include the lines where type_code = "SP".

    When you debug "ORA-01436: CONNECT IN a loop in the user data ', view SYS_CONNECT_BY_PATH (uk,...), where the United Kingdom is a unique key. That will tell you much more than just the root information. You might want this:

    SELECT  connect_by_root code                AS code_root,
            CODE,
            CODE_DESC,
            UP_CODE
    ,     SYS_CONNECCT_BY_PATH (code, '/')     AS path          -- For debugging
    ,       CONNECT_BY_ISCYCLE                AS ISCYCLE     -- For debugging
    FROM      DI_CODE_LEVEL
    -- WHERE TYPE_CODE = 'SP'     -- Commented out for debugging
    where      ISCYCLE > 0          -- For debugging
    CONNECT BY NOCYCLE      PRIOR CODE = UP_CODE
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    Explain how you get these results from these data.
    Always tell what version of Oracle you are using.

  • ORA-01436 - connect loop in the user data - only in the database 10G...

    Hello

    I'm having a problem with a query. First of all I have to say that I choose this query on the internet and has adapted to my worries... so I understand very well the "connection of level" clause... that's why I need help to find out what is happening here...

    The query is all ok in a 8i database, but if I took exactly the same query on a 10G database I got the error "ORA-01436 - connect with loop in user data.

    This query returns one row for each day between 2 dates passed as parameters. The query takes 4 parameters: a date 'from', date 'for' and 2 other parameters indicating if we want that Saturdays and Sundays (end of week) in the result set.

    This is the query:

    Select days_between.days
    de)
    SELECT & date_from + ROWNUM-1 days
    DE)
    SELECT 1 nothing
    OF THE DOUBLE
    CONNECTION OF LEVEL < = (nvl(&date_to,&date_from) - & date_from + 1)
    )
    where & date_from + ROWNUM-1 < = nvl (date_to, & date_from)
    ) days_between
    where (nvl (& exclude_saturdays, 'Y') = ' or replace (to_char (days_between.days, 'DAY'),' ') not in ('SATURDAY', 'SATURDAY'))
    and (nvl (& exclude_sundays, 'Y') = ' or replace (to_char (days_between.days, 'DAY'),' ') not in ('SUNDAY', 'SUNDAY'))

    For the parameter 'date_from' enter 'to_date('2009-01-01','yyyy-mm-dd')' as a break for the 'date_to' 'to_date('2009-01-07','yyyy-mm-dd')' as a value parameter value. For the other 2 parameters, use 'Y' to exclude this day or "N" to keep this day here in the result set.

    So I said earlier, this query runs very well on a 8i database but not on a 10G a where I got the error "ORA01436 - connect with loop in user data.

    I have search the Internet but I don't know why it runs on a 8i and not on a 10G... Can someone help me please?

    Hello

    SELECT  ROWNUM  AS n
    FROM    dual
    CONNECT BY  LEVEL <= x;
    

    is a quick and easy way to generate a table of meters containing all integers from 1 to x. You are the query, it has been changed, not for a list of consecutive integers, but a list of consecutive dates.

    This technique only works in Oracle 9 (and more). You did a mistake when you said it works in Oracle 8 but not in Oracle 10? It is the opposite, when I try.

    Here is another way to generate a table of counters:

    SELECT  ROWNUM  AS n
    FROM    all_objects
    WHERE   ROWNUM  <= x;
    

    This method works in any version of Oracle, but it is slower than the method CONNECT BY and does not work for the great values on x. (this is probably good for x<= 5000,="" depending="" on="" your="">

    If you can do this:

    select days_between.days
    from     (
         SELECT     &date_from + ROWNUM - 1          as days
         FROM     all_objects
         WHERE     ROWNUM     <= (1 + NVL (&date_to, &date_from)) - &date_from
         ) days_between
    where     (     nvl(&exclude_saturdays,'Y') = 'N'
         or     replace(to_char(days_between.days,'DAY'),' ') not in ('SAMEDI','SATURDAY')
         )
    and     (     nvl(&exclude_sundays,'Y') = 'N'
         or     replace(to_char(days_between.days,'DAY'),' ') not in ('DIMANCHE','SUNDAY')
         )
    ;
    

    in any version of Oracle.

  • Hi, do an error-ORA-01436: CONNECT BY a loop in the user data

    Hi, I am getting an error when executing the select query

    SELECT callreleasetime, calleventduration
    OF temp_med_partial_records_0001
    CONNECT BY PRIOR Callreleasetime = callreleasetime
    AND IMSI PRIOR = IMSI
    AND PRIOR connectedcallingnumber = connectedcallingnumber

    Published by: user8731258 on February 8, 2011 02:34

    example:

    drop table test;
    
    create table test(no number, IMSP number,  IMSC number,  data varchar2(10));
    
    insert into test values(1,1,2,'a');
    insert into test values(1,2,3,'a');
    insert into test values(1,2,4,'a');
    
    insert into test values(1,3,5,'b');
    insert into test values(1,4,5,'b');
    
    insert into test values(2,1,2,'c');
    insert into test values(2,2,3,'c');
    
    insert into test values(4,1,2,'d');
    insert into test values(4,2,3,'d');
    
    insert into test values(5,1,2,'e');
    insert into test values(5,2,3,'e');
    insert into test values(5,2,3,'e');
    
    insert into test values(6,1,2,'f');
    
    commit;
    
    SELECT *
    FROM test
    CONNECT BY PRIOR no=no
    AND PRIOR IMSP=IMSC
    AND PRIOR data=data;
    
    NO                     IMSP                   IMSC                   DATA
    ---------------------- ---------------------- ---------------------- ----------
    1                      1                      2                      a
    1                      2                      3                      a
    1                      1                      2                      a
    1                      2                      4                      a
    1                      1                      2                      a
    1                      3                      5                      b
    1                      4                      5                      b
    2                      1                      2                      c
    2                      2                      3                      c
    2                      1                      2                      c
    4                      1                      2                      d
    4                      2                      3                      d
    4                      1                      2                      d
    5                      1                      2                      e
    5                      2                      3                      e
    5                      1                      2                      e
    5                      2                      3                      e
    5                      1                      2                      e
    6                      1                      2                      f   
    

    Your case

    SELECT *
    FROM test
    CONNECT BY PRIOR no=no
    AND PRIOR IMSP=IMSP
    AND PRIOR data=data;
    
    ORA-01436:
    
  • Error: CONNECTION loop in the user data

    CONNECT IN a loop in the user data:

    Table X (sample data were actually lines 35K)

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

    CODE CASE OLD_ID New_id PERSON AUTH                                                           

    01 ab122 1234 0001 AU123 99393

    07 vv353 7872 0919 FV982 78282

    01 ab122 1982 9929 99393 AU123

    04 hjsss 8839 8302 JK920 32320

    01 ab122 0001 1982 AU123 99393

    05 cg899 6728 32322 IKL020 65252

    07 w353 0919 8282 FV982 78282

    now I need to order these data comparing the values of the line to old_id new_id for each combination of code, person, case

    need output like below

    Table X

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

    CODE CASE OLD_ID New_id PERSON AUTH                                                           

    01 ab122 1234 0001 AU123 99393

    01 ab122 0001 1982 AU123 99393

    01 ab122 1982 9929 99393 AU123

    04 hjsss 8839 8302 JK920 32320

    05 cg899 6728 32322 IKL020 65252

    07 vv353 7872 0919 FV982 78282

    07 w353 0919 8282 FV982 78282

    to get to what I use:

    -Request-

    Select * from table_x

    Start by old_id not in)

    Select new_id

    from table_x

    )

    CONNECT BY old_id new_id PRIOR =

    AND code = code PRIOR

    AND case EARLIER case =

    PER person = person PREREQUISITE

    -Request-

    works very well with the sample data, but the problem is when executed with actual table that has 35K record...

    Cause: The condition specified in a CONNECT BY clause caused a loop in the application, where the next record to be selected is a descendant of itself. When this happens, it may be no end to the query.

    Action: Check the CONNECT BY clause and remove the circular reference.

    Thank you

    AK

    Hello

    CONNECT_BY_ISCYCLE is a pseudo-column that you can use in a query of CONNECTION BY NOCYCLE.  It is separated from the CONNECT BY clause.

    Try this:

    Select code, "BREAKS", person

    , SYS_CONNECT_BY_PATH (old_id, "/") AS path

    from table_x

    where CONNECT_BY_ISCYCLE = 1

    Start by old_id not in)

    Select new_id

    from table_x

    )

    CONNECT BY NOCYCLE Old_id = new_id PRIOR

    AND code = code PRIOR

    AND 'CASE' = 'BOX' PRIOR

    PER person = person PREREQUISITE

    ;

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • error ORA-01436: CONNECT BY a loop in the user data

    Y is it breaks down, when the query with the data of test works well. Added the result of individual queries of the database.
    times parent_order and the order can be same.
    SELECT *
      FROM (SELECT     *
                  FROM r_brj_linkage
            START WITH order_id = 'IQBGSR20'
            CONNECT BY PRIOR parent_downstream_orderid = order_id)
     WHERE alternate_linkage_rule_flag = 'N'
    
    SELECT parent_downstream_orderid, order_id, alternate_linkage_rule_flag
      FROM r_brj_linkage
     WHERE order_id = 'IQBGSR20';
    output 
    ------------
    U206650.3     IQBGSR20   Y
    
    
    SELECT parent_downstream_orderid, order_id, alternate_linkage_rule_flag
      FROM r_brj_linkage
     WHERE order_id = 'U206650.3';
    
    U206650.3      U206650.3  N
    I tried with an example, and gives me the correct results
    SELECT *
      FROM (WITH t AS
                 (SELECT 'XXX' parent_1, 'YYY' child_1, 'Y' flag
                    FROM DUAL
                  UNION ALL
                  SELECT 'XYZ' AS parent_1, 'XXX' AS child_1, 'Y' AS flag
                    FROM DUAL
                  UNION ALL
                  SELECT 'ZZZ' AS parent_1, 'XYZ' AS child_1, 'Y' AS flag
                    FROM DUAL
                  UNION ALL
                  SELECT 'ABC' AS parent_1, 'ZZZ' AS child_1, 'N' AS flag
                    FROM DUAL)
            SELECT     *
                  FROM t
            START WITH child_1 = 'ZZZ'
            CONNECT BY PRIOR parent_1 = child_1)
     WHERE flag = 'N';
    Published by: devarade on January 21, 2010 14:56

    Published by: devarade on January 21, 2010 15:06

    Ah, see what you mean now.

    How about this:

    SELECT *
    FROM  ( WITH t AS
                 ( SELECT 'XXX' parent_1, 'YYY' child_1, 'Y' flag
                   FROM DUAL
                   UNION ALL
                   SELECT 'XYZ', 'XXX', 'Y' FROM DUAL UNION ALL
                   SELECT 'ZZZ', 'XYZ', 'Y' FROM DUAL UNION ALL
                   SELECT 'ZZZ', 'ZZZ', 'N' FROM DUAL )
            SELECT *
            FROM   t
            START WITH child_1 = 'YYY'
            CONNECT BY NOCYCLE PRIOR NULLIF(parent_1,child_1) = child_1 )
    WHERE flag = 'N';
    
  • Oracle: Connect loop in the user data

    I understand when a loop can occur in Oracle. In principle that it is said if a recording is both parent to another node and at the same time he was a child to him, then it may go into a loop.

    But I can't get why my this particular query is running in a loop.

    SELECT Empno, Ename, Job FROM Emp START WITH Empno = 7839 CONNECT BY PRIOR Job='PRESIDENT'

    Can someone please explain to me how these data can result in a loop. I did a CONNECT_BY_ISCYCLE check and found that the closure of the case is KING (Chairman). But I still don't understand how can be possible, that the KING is the President and I do not see anything in which it becomes child and parent to any record in the table.

    Please explain to me, why is it a mistake and where is the loop?

    Thanks in advance.

    Maybe if I pull on the hierarchy of your query, you will see what he is doing...

    PRESIDENT OF KING 7839<-- start="">

    PRESIDENT OF KING 7839<-- prior="" job='PRESIDENT'>

    PRESIDENT OF KING 7839<-- prior="" job='PRESIDENT'>

    .. etc.

    .. etc.

    ANALYST SCOTT 7788<-- prior="" job='PRESIDENT'>

    7902 FORD ANALYST<-- prior="" job='PRESIDENT'>

    7369 SMITH CLERK<-- prior="" job='PRESIDENT'>

    7934 MILLER CLERK<-- prior="" job='PRESIDENT'>

    7900 JAMES CLERK<-- prior="" job='PRESIDENT'>

    CLERK OF 7876 ADAMS<-- prior="" job='PRESIDENT'>

    7566 JONES MANAGER<-- prior="" job='PRESIDENT'>

    MANAGER CLARK 7782<-- prior="" job='PRESIDENT'>

    BLAKE MANAGER 7698<-- prior="" job='PRESIDENT'>

    7499 ALLEN SALESMAN<-- prior="" job='PRESIDENT'>

    7521 WARD SALESMAN<-- prior="" job='PRESIDENT'>

    7654 MARTIN SALESMAN<-- prior="" job='PRESIDENT'>

    7844 TURNER SELLER<-- prior="" job='PRESIDENT'>

    ANALYST SCOTT 7788<-- prior="" job='PRESIDENT'>

    7902 FORD ANALYST<-- prior="" job='PRESIDENT'>

    7369 SMITH CLERK<-- prior="" job='PRESIDENT'>

    7934 MILLER CLERK<-- prior="" job='PRESIDENT'>

    7900 JAMES CLERK<-- prior="" job='PRESIDENT'>

    CLERK OF 7876 ADAMS<-- prior="" job='PRESIDENT'>

    7566 JONES MANAGER<-- prior="" job='PRESIDENT'>

    MANAGER CLARK 7782<-- prior="" job='PRESIDENT'>

    BLAKE MANAGER 7698<-- prior="" job='PRESIDENT'>

    7499 ALLEN SALESMAN<-- prior="" job='PRESIDENT'>

    7521 WARD SALESMAN<-- prior="" job='PRESIDENT'>

    7654 MARTIN SALESMAN<-- prior="" job='PRESIDENT'>

    7844 TURNER SELLER<-- prior="" job='PRESIDENT'>

    Thus, in the first level of the hierarchy is your record START you WITH.

    When all folders are examined, the test of the PREREQUISITE WORK examines the top level folder, determines that he was the PRESIDENT and therefore each record matches this condition.

    Then, each of these folders are evaluated to determine the child records.  At this second level, only KING's post of PRESIDENT, he is the one who would have no record of the child and this WORK PRECONDITION = PRESIDENT will be valid for all records under the 2 KING level.

    This model keeps occurring under each folder KING indefinitely.

  • ORA-12514 connect to analyze the listener

    I have two rac nodes datase under linux.

    Here's what I got when I try to log in to analyze the listening port of the client. It connects to the vip / or scan of the IPS with no problems.
    sqlplus system/password@wxcy

    SQL * more: release 10.2.0.3.0 - Production of sea Mar 14 18:42:42 2012

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

    ERROR:
    ORA-12154: TNS: could not resolve the connect identifier specified


    But when I connect to the ip address of the listener to scan, it worked:
    sqlplus system / [email protected]:1521 / wxcy

    SQL * more: release 10.2.0.3.0 - Production of sea Mar 14 18:43:12 2012

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


    Connected to:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    With partitioning, Real Application Clusters, Automatic Storage Management, OLAP,.
    Options of Data Mining and Real Application Testing

    SQL >


    Here the tnsnames.ora on the client:

    = wxcy
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)
    (HOST = scan.com) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = wxcy)
    )
    )


    Here are the listener.ora and tnsnames.ora on the server:
    Listener = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = Listener))) # line added by Agent
    LISTENER_SCAN3 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN3))) # line added by Agent
    LISTENER_SCAN2 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN2))) # line added by Agent
    LISTENER_SCAN1 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN1))) # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON # line added by Agent

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy_DGMGRL)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy1)
    )
    )

    SID_LIST_LISTENER_SCAN1 =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy1)
    )
    )


    SID_LIST_LISTENER_SCAN3 =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy1)
    )
    )

    INBOUND_CONNECT_TIMEOUT_LISTENER = 120
    ~

    tnsnames.ora:
    = wxcy
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.com) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = wxcy)
    )
    )

    wxcy_DGMGRL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.com) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = wxcy_DGMGRL)
    )
    )


    wxcy1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.com) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED) (SERVICE_NAME = wxcy)
    (INSTANCE_NAME = wxcy1)
    )
    )

    wxcy2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan.com) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED) (SERVICE_NAME = wxcy)
    (INSTANCE_NAME = wxcy2)
    )
    )


    Node 2:
    LISTENER_SCAN2 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN2))) # line added by Agent
    LISTENER_SCAN3 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN3))) # line added by Agent
    Listener = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = Listener))) # line added by Agent
    LISTENER_SCAN1 = (Description = (ADDRESS_LIST = (Address = (Protocol = IPC) (Key = LISTENER_SCAN1))) # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3 = ON # line added by Agent
    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2 = ON # line added by Agent

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy_DGMGRL)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy1)
    )
    )


    SID_LIST_LISTENER_SCAN2 =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy2)
    )
    )

    SID_LIST_LISTENER_SCAN3 =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = wxcy)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = wxcy2)
    )
    )


    I wonder why I can connect to the IP addresses of people scan headphone but not the name of the scan.

    Thank you.

    Here the tnsnames.ora on the client:

    = wxcy
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)
    (HOST = scan.com) (PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = wxcy)
    )
    )

    incorrect syntax (support useless inside, where the entrance is not analyzed)

    wxcy =
     (DESCRIPTION =
       (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = TCP)(Host = scan.com)(Port = 1521))
       )
     (CONNECT_DATA =
       (SERVICE_NAME = wxcy)
     )
    )
    
  • CONNECT IN a loop in the user data

    Could someone help me because I can not find a solution.

    I want to build a tree of 3 tables (parent-> children-> detail)

    Everything works fine with 2 tables, but when I add the third table I get always an error ORA: ORA-01436: CONNECT BY a loop in the user data

    CREATE TABLE nineham (organisatie_id NUMBER

    (, naam VARCHAR2 (50));

    --

    CREATE TABLE seizoenen (seizoen_id NUMBER

    organisatie_id NUMBER

    (, naam VARCHAR2 (50));

    --

    CREATE TABLE competities (competitie_id NUMBER

    seizoen_id NUMBER

    (, naam VARCHAR2 (50));

    --

    INSERT INTO nineham (organisatie_id, name) VALUES (1, 'ORGANISATIE_1');

    INSERT INTO nineham (organisatie_id, name) VALUES (2, 'ORGANISATIE_2');

    --

    INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 1, 'SEIZOEN_1');

    INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 1, 'SEIZOEN_2');

    INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 2, 'SEIZOEN_3');

    INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 2, 'SEIZOEN_4');

    --

    INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (1, 1, 'COMPETITIE_1');

    INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (2, 1, 'COMPETITIE_2');

    INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (3, 2, 'COMPETITIE_3');

    INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (4, 2, "COMPETITIE_4");

    INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (5, 2, "COMPETITIE_5");

    --

    --

    --

    SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display

    LEVEL AS lvl

    DE)

    SELECT NULL AS parent

    child organisatie_id

    naam

    To nineham

    UNION ALL

    SELECT organisatie_id AS parent

    child seizoen_id

    naam

    OF seizoenen

    UNION ALL

    Seizoen_id SELECT parent

    Child AS NULL

    naam

    OF competities

    )

    START WITH parent IS NULL

    CONNECT BY PRIOR child = parent

    ;

    Hello

    When you perform a CONNECT BY query, you must have an identifier unique to each child.  You use numbers that are unique to each table, but are no longer unique when you UNION the paintings together.  When the query finds children 1, the fact that average organisatie_id = 1, or does that mean seizoen_id = 1, or does this mean competetite_id = 1?

    Etbin suggested you change data.  Which can be difficult; It might not even be possible.  In addition, you must make sure that the new IDS are unique.  When you assign advent = 10 to a node, for example, you must be sure that 10 is not an organisatie_id.

    Here is another solution that is guarranted to generate unique IDS, without changing the actual tables:

    SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display

    LEVEL AS lvl

    DE)

    SELECT NULL AS parent

    organisatie_id AS child

    , 1 AS the level of

    naam

    To nineham

    UNION ALL

    SELECT organisatie_id AS parent

    seizoen_id AS child

    , 2 AS the level of

    naam

    OF seizoenen

    UNION ALL

    SELECT seizoen_id AS parent

    Child AS NULL

    , 3 AS the level of

    naam

    OF competities

    )

    START WITH parent IS NULL

    AND level = 1

    CONNECT BY PRIOR child = parent

    AND layer = FIRST + 1

    ;

    The composite key formed by your original ID, and the new level number is unique.

    Note that the query above is exactly what you have posted, with the addition of the lines that refer to level.

  • Oracle Database Vault ORA-12578 connection error: open TNS:wallet failed (user OS to access the wallet)

    Hi all

    I create a portfolio of oracle and everything works fine until a script is launched by the OS oracle user. (same user that whoever created the store)

    I use authentication external store and inside my script, I do something like a sqlplus / @MYSECURE_TNS.

    However, when I run a script OS another user as a 'data_loading_user' I get the error: Oracle Database Vault ORA-12578 connection error: TNS:wallet open failed

    I would like to know, how I can activate any user on the local host access the portfolio safe to connect to the database.

    Here my current ENV:

    ==================

    Oracle Linux 6.5

    Oracle a Standard 11.2.0.4

    Webtier Oracle 11g

    Database and thin client SQLNET. ORA

    =============================

    SQLNET. WALLET_OVERRIDE = TRUE

    SSL_CLIENT_AUTHENTICATION = FALSE

    SSL_VERSION = 0

    WALLET_LOCATION =

    (SOURCE =

    (METHOD = FILE)

    (METHOD_DATA =

    (DIRECTORY = / u01/app/oracle/owm/wallets)

    )

    )

    Thanks in advance for any help.

    JS

    Hi all

    Tried something out of the blue, that has worked.

    I added the data_loading_user of the user to the group administrator (Group of BONES that created the wallet).

    The I added the read permission to the group, so the permission on the files below were 640:

    # > chmod 640 cwallet.sso

    # > 640ewallet.p12 chmod

    Thank you

    JS

  • Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    CREATE or REPLACE (name in varchar2) procedure Compress_tab_partition
    is
    last_mnth_var varchar2 (8);
    curr_mnth_var varchar2 (8);
    number of last_mnth;
    number of curr_mnth;
    last_partition varchar2 (8);
    high_val varchar2 (4000);
    Start

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;
    Select to_char (sysdate, 'YYYY') | TO_CHAR (sysdate, 'mm') | ' 00' in the double curr_mnth_var;
    Select to_number (last_mnth_var) in the double last_mnth;
    Select to_number (curr_mnth_var) in the double curr_mnth;

    Dbms_output.put_line ('Compression of GOLDMGR Table scores.' | table-name |) "to go". ») ;
    Dbms_output.put_line(' ');

    / * Step 1 - identify the name of the partition of the specified table must be compressed * /.
    Select high_value from high_val from user_tab_partitions where table_name = table-name;
    Select nom_partition into last_partition from user_tab_partitions where table_name = table-name and high_value = rtrim (high_val);

    / * Step 2 - Alter partition table to compress * /.

    run immediately "ALTER TABLE GOLDMGR." | table_name | ' CHANGE THE PARTITION '. last_partition | "COMPRESS by low query";

    / * Step 3 - Index rebuild step * /.

    I'm in (select index_name in user_indexes where table_name = table-name)
    loop
    run immediately "ALTER INDEX GOLDMGR." | i.index_name |' REBUILD ";
    end loop;

    Dbms_output.put_line (' COMPLETED: compress the Table partitions change.) ") ;

    end;
    /

    I'm getting an error like: Error (21,100): PL/SQL: ORA-00997: illegal use of the LONG data type

    Please resolve.

    HIGH_VALUE datatype is LONG. You may not use for a long TIME in WHERE clause expressions. You need to loop through the partitions by selecting HIGH_VALUE and then comparing. Secondly, there is no need to select double to calculate expressions. For example:

    Select to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00' in the double last_mnth_var;

    should be replaced by

    last_mnth_var: = to_char (add_months (trunc (sysdate, 'MM'),-1), 'YYYYMM') | ' 00'.

    and there is no need to add_months here:

    last_mnth_var: = to_char (trunc (sysdate, 'MM') - 1, "YYYYMM"). ' 00'.

    But the main question is simply ALTER TABLE MODIFY PARTITION COMPRESS allows compression but does not compress. You must issue ALTER TABLE MOVE PARTITION COMPRESS:

    SQL > create table tbl (n) partition by range (n)
    2 (partition p1 values less than (maxvalue))
    3. Select lpad('X',4000,'X') from dual connect by level<=>
    4.

    Table created.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. change the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    830472192

    SQL > alter table tbl
    2. move the partition p1 compress
    3.

    Modified table.

    SQL > select bytes
    2 from WHERE user_segments
    3 where nom_segment = 'TBL '.
    4 and nom_partition = 'P1 '.
    5.

    BYTES
    ----------
    8388608

    SQL >

    SY.

  • Unable to connect even after the user password reset

    Hai all,

    10.2.0.3 on Linux

    Reset a user password and the user is unable to connect as you can see below


    [oracle@testdb 10.2.0] $ sqlplus sys/Manager as sysdba

    SQL * more: release 10.2.0.3.0 - Production on Tue Nov 27 16:20:21 2012

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


    Connected to:
    Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - Production
    With partitioning, OLAP and Data Mining options

    SQL > alter user sysman identified by oracle.

    Modified user.

    SQL > disconnected from Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - Production
    With partitioning, OLAP and Data Mining options

    [oracle@testdb 10.2.0] $ sqlplus sysman/oracle

    SQL * more: release 10.2.0.3.0 - Production on Tue Nov 27 16:20:32 2012

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

    ERROR:
    ORA-01017: name of user and password invalid. connection refused



    Unable to connect even after the user password reset

    Check
    How to change the password of the database user Sysman (DB control repository schema) [ID 259379.1]
    EMCA 11 g fails with the error "ORA-01017: name of user and password invalid; connection refused"and" username/password invalid name; For DBSNMP or user SYSMAN"[ID 741530.1]

  • not able to connect database to another user of the operating system using the remote?

    Hello

    I want to connect database to another user of the operating system. I am able to connect Oracle database to the outside. but not able to connect different OS user.



    As an ORACLE user:

    [oracle@test1 admin] $ sqlplus /.

    SQL * more: Production of the 11.2.0.2.0 version on Mon Jan 16 19:41:57 2012

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


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

    SQL >



    User not ORACLE:

    [sample@test1 ~] $ export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/
    [sample@test1 ~] $ export ORACLE_SID = rman
    [sample@test1 ~] $ export PATH = $ORACLE_HOME/bin: $PATH
    [sample@test1 ~] $ sqlplus /.

    SQL * more: Production of the 11.2.0.2.0 version on Mon Jan 16 19:37:42 2012

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

    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux error: 2: no such file or directory
    Process ID: 0
    Session IDs: serial number 0: 0


    Enter the user name:



    Thank you

    Make sure ORACLE_HOME is exactly the same between 2 environments: note that an end "/" is not necessary and that ending ' / ' could trigger ORA-01034.

  • Edge counting and Source of Timing for timed loop on the request for Acquisition of data - not acquiring data on specified rising edge

    Operating system: Windows XP

    Hardware: PCI 6259

    Terminals used: PFI0 and PFI2

    Counters used: Ctr0 and Ctr1

    IM developing an application for the acquisition of data where timed loop synchronization source comes from my PFI2 (using the string A of an encoder).  IM basically trying to acquire data based on the number of ticks from my encoder.  For the synchronization source, I use counter 1 to capture the rising edge and have the loop time-acquisition of data.  At the same time, Im using the counter 0 to count the number of rising edges so I know exactly in what tick data was acquired.  PFI0 and PFI2 are connect to channel A of the encoder.

    Questions:

    Timed loop acquires data at each tick, because when I discover the data (text) file is missing count of my encoder value.  Is it because there is a limitation on the Windows operating system?  I used a noculars to measure the frequency at the maximum rotation of the channel encoder and 6,757 kHz.  All solutions?

    Also, is there anyway I can route the source channel internally an encoder to generate synchronization source instead of using another counter?  I have attached my VI.

    Hello

    All the samples that you acquire will be read by LabVIEW in a sequential manner. Figure 4-21 on the M-series on page 80 (4-34) shows that you will acquire all the samples you request all channels that you enjoy in sequentially.

Maybe you are looking for