ORA-02050: 에러가 가끔가다가 발생하는데

alert.log 의 에러 내용은 이렇습니다.
~~~~~
Tue Jan 2 08:57:41 2007
Error 2068 trapped in 2PC on transaction 20.4.4845. Cleaning up.
Error stack returned to user:
ORA-02050: 트랜잭션 20.4.4845가 롤백되고, 다른 원격 DB는 불명료한 상태입니다
ORA-02068: TO_DB_2ND로 부터의 다음의 치명적인 오류가 있습니다
ORA-03135: 접속이 끊겼습니다.
Tue Jan 2 08:57:41 2007
DISTRIB TRAN ORAYS1.f7c20f5e.20.4.4845
is local tran 20.4.4845 (hex=14.04.12ed)
insert pending collecting tran, scn=7293147162159 (hex=6a2.1172262f)
Tue Jan 2 08:57:41 2007
DISTRIB TRAN ORAYS1.f7c20f5e.20.4.4845
is local tran 20.4.4845 (hex=14.04.12ed))
delete pending collecting tran, scn=7293147162159 (hex=6a2.1172262f)
Tue Jan 2 08:58:25 2007
Error 2068 trapped in 2PC on transaction 21.8.11036. Cleaning up.
Error stack returned to user:
ORA-02050: 트랜잭션 21.8.11036가 롤백되고, 다른 원격 DB는 불명료한 상태입니다
ORA-02068: TO_DB_2ND로 부터의 다음의 치명적인 오류가 있습니다
ORA-03135: 접속이 끊겼습니다.
Tue Jan 2 08:58:25 2007
DISTRIB TRAN ORAYS1.f7c20f5e.21.8.11036
is local tran 21.8.11036 (hex=15.08.2b1c)
insert pending collecting tran, scn=7293147163792 (hex=6a2.11722c90)
Tue Jan 2 08:58:25 2007
DISTRIB TRAN ORAYS1.f7c20f5e.21.8.11036
is local tran 21.8.11036 (hex=15.08.2b1c))
delete pending collecting tran, scn=7293147163792 (hex=6a2.11722c90)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
에러 내용을 매뉴얼로 찾아보면
2 Phase Commit 완료 이전에 remote DB 가 Crash 되거나, network 장애가 발생하면 ora-02050 에러가 발생할 수 있다고 하는데
문제는 디비 링크 TO_DB_2ND 를 이용한 SELECT 문 밖에 수행이 안 된다는 겁니다.
DML 이라도 수행이 되야 뭐라도 해볼텐데, SELECT 밖에 없으니 어떤 식으로 이 장애 상황을 해결해야 할지 막막하군여.. 쩝~~
또 재미난 상황은 In-Doubt Transaction에 대해서는 RECO 프로세스가 알아서 복구시킨다고 하고 alert.log에 위에 기술한 내용을기록합니다. 그렇다면 유저 화면에 저런 에러 메시지가 안 보여야 정상일거 같은데, 가끔가다가 등록하는 화면에서 등록이 제대로 안 되면서 저런 에러가 보입니다.
환장할 노릇입니다...
이런 상황 경험해 본 고수분들의 조언을 구합니다.
글 수정:
woo3615

우선 에러에 관련된 내용을 올리실려면 OS 와 Oracle version 을 같이 올려주셔야
합니다.그래야 에러를 분석하는데 있어 쉽게 접근할 수가 있습니다. ^^
저두 초짜라 100% 확신은 하지 못합니다..참고로 하시길 권하는 바입니다.
에러 메시지를 보니 오라클 버전은 8i 일 것 같은데 맞는지 모르겠군요...
버그(bug 2273417)라고 판단이 됩니다. 로곤 트리거가 존재할 때 트랜잭션에서
복구를 하지 못하는 그런 종류의 에러 인듯 싶습니다.
이 에러를 해결하는 방법으로는 9.0.1.4 또는 9.2.0.2 으로의 업그레이드를 추천
하는 바입니다. 또는
SQL>select trigger_name, triggering_event, status from dba_triggers
where triggering_event like 'LOG%';
위의 쿼리를 통해서 모든 로그 트리거를 Disable 시켜야 될 것 같습니다.

Similar Messages

  • ORA-02050 ORA-02068 ORA-03113 in apex application shared db link

    Dear all,
    I got error occasionally ORA-02068: following severe error from INV_FBIH ORA-03113: end-of-file on communication channel
    when I login into application on Apex.
    INV_FBIH is shared database link
    there is error:
    ORA-02050: transaction 11.26.780771 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from INV_FBIH
    ORA-03113: end-of-file on communication channel
    Database is: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Is there any solution for this problem?
    Regards,
    Ed,
    Edited by: 852611 on May 24, 2013 8:27 AM

    I've had some problems in the past with in-doubt transactions with a DB link to a Sybase database. I can imagine it is more difficult for Oracle to manage transactions over a DB link if the the database is not Oracle. Especially with SQL Server/Sybase that do their own commit by default. Might that be the case here?
    ORA-03113: end-of-file on communication channelThis also indicates a network problem.
    You can also post this in the General Database forum.

  • ORA-02050 transaction string rolled back, some remote DBs may be in-doubt

    Hi...guys...How ru all...
    I got follwoing error...and I searched in google but there is not clear information..plz help me ...
    Error Message: ORA-02050 transaction string rolled back, some remote DBs may be in-doubt
    Error Cause:
    Network or remote failure during a two-phase commit.
    Action:
    Notify operations; remote databases will automatically re-sync when the failure is repaired.
    SQL>SELECT local_tran_id, global_tran_id, state, mixed, host, commit#
    FROM dba_2pc_pending
    LOCAL_TRAN_ID GLOBAL_TRAN_ID STATE MIX HOST COMMIT#
    5.44.98254 JICRACDB.e1ab4089.5.44.98254 collecti no JICN\ROOM9 1132915640
    ng 7-ITC
    SQL> SELECT local_tran_id, in_out, database, dbuser_owner, interface
    2 FROM dba_2pc_neighbors
    3 /
    LOCAL_TRAN_ID IN_OUT DATABASE DBUSER_OWNER INT
    5.44.98254 in JIC N
    5.44.98254 out RC_DBLINK JIC N
    SQL> ;
    1 select state, tran_comment, advice from dba_2pc_pending
    2* where local_tran_id ='5.44.98254'
    SQL> /
    STATE TRAN_COMMENT ADVICE
    collecting
    so how can I delete distributed transaction..plz provide me any Metalink Docids.

    See if following MOS note helps.
    Manually Resolving In-Doubt Transactions: Different Scenarios (Doc ID 126069.1)

  • DBLINK,ORA-02050: 事务处理 10.30.100680 已回退, 某些远程数据库可能有问题:ORA-03135: 连接失去联系

    问题背景:有两套数据库服务器oracle11g RAC,版本是11.2.0.3,分别有两个用户user1,user2,user1通过跨库DBLINK(EASDB)去连接user2进行数据库查询。
    偶尔会报错ORA-02050,定位了好几天,排除网线没插好、主机防火墙等因素了,就是不知道其他问题在哪儿.
    奇怪的是反向的DBLINK,就没有类似问题
    报错内容:
    Mon Dec 10 09:58:21 2012
    Error 3135 trapped in 2PC on transaction 10.30.100680. Cleaning up.
    Error stack returned to user:
    ORA-02050: 事务处理 10.30.100680 已回退, 某些远程数据库可能有问题
    ORA-03135: 连接失去联系
    ORA-02063: 紧接着 line (起自 EASDB)
    Mon Dec 10 09:58:21 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948)
    insert pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Mon Dec 10 10:44:58 2012
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    Mon Dec 10 11:00:39 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    DBLINK创建脚本:
    drop public database link EASDB;
    create public database link EASDB connect to USER2 identified by "password"
    using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 132.97.122.1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 132.97.122.2)(PORT = 1521))(LOAD_BALANCE = yes)
    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = bppfedb)(FAILOVER_MODE =
    (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))';
    IP没有使用RAC的vip,而是物理IP
    日志收集
    1. reco后台进程的trace
    bppfrdb1_reco_18133.trc如下:
    *** 2012-12-07 18:25:11.899
    DISTRIB TRAN BPPFRDB.59c536a9.49.11.975
    is local tran 49.11.975 (hex=31.0b.3cf))
    delete pending collecting tran, scn=13074738503199 (hex=be4.3324de1f)
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    *** 2012-12-10 10:44:58.406
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    *** 2012-12-10 11:00:39.084
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    2. alert 日志
    alert_bppfrdb1.log如下:
    Mon Dec 10 07:00:40 2012
    Archived Log entry 3865 added for thread 1 sequence 1842 ID 0x9a632295 dest 1:
    Mon Dec 10 07:59:53 2012
    Time drift detected. Please check VKTM trace file for more details.
    Mon Dec 10 09:58:21 2012
    Error 3135 trapped in 2PC on transaction 10.30.100680. Cleaning up.
    Error stack returned to user:
    ORA-02050: 事务处理 10.30.100680 已回退, 某些远程数据库可能有问题
    ORA-03135: 连接失去联系
    ORA-02063: 紧接着 line (起自 EASDB)
    Mon Dec 10 09:58:21 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948)
    insert pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Mon Dec 10 10:44:58 2012
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    Mon Dec 10 11:00:39 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.3.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    Time: 10-DEC-2012 11:41:59
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=132.97.122.113)(PORT=47823))
    Mon Dec 10 11:41:59 2012
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.3.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    Time: 10-DEC-2012 11:41:59
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=132.97.122.113)(PORT=47824))
    Mon Dec 10 11:41:59 2012
    3. ping测试网络日志
    ping的输出信息如下:
    [oracle@bppfrdb1 jc]$ ping -s 1024 -c 30 132.97.122.1
    PING 132.97.122.1 (132.97.122.1) 1024(1052) bytes of data.
    1032 bytes from 132.97.122.1: icmp_seq=1 ttl=64 time=0.473 ms
    1032 bytes from 132.97.122.1: icmp_seq=2 ttl=64 time=0.543 ms
    1032 bytes from 132.97.122.1: icmp_seq=3 ttl=64 time=0.622 ms
    1032 bytes from 132.97.122.1: icmp_seq=4 ttl=64 time=0.538 ms
    1032 bytes from 132.97.122.1: icmp_seq=5 ttl=64 time=0.570 ms
    1032 bytes from 132.97.122.1: icmp_seq=6 ttl=64 time=0.544 ms
    1032 bytes from 132.97.122.1: icmp_seq=7 ttl=64 time=0.511 ms
    1032 bytes from 132.97.122.1: icmp_seq=8 ttl=64 time=0.550 ms
    1032 bytes from 132.97.122.1: icmp_seq=9 ttl=64 time=0.469 ms
    1032 bytes from 132.97.122.1: icmp_seq=10 ttl=64 time=0.574 ms
    1032 bytes from 132.97.122.1: icmp_seq=11 ttl=64 time=0.568 ms
    1032 bytes from 132.97.122.1: icmp_seq=12 ttl=64 time=0.632 ms
    1032 bytes from 132.97.122.1: icmp_seq=13 ttl=64 time=0.522 ms
    1032 bytes from 132.97.122.1: icmp_seq=14 ttl=64 time=0.420 ms
    1032 bytes from 132.97.122.1: icmp_seq=15 ttl=64 time=0.474 ms
    1032 bytes from 132.97.122.1: icmp_seq=16 ttl=64 time=0.506 ms
    1032 bytes from 132.97.122.1: icmp_seq=17 ttl=64 time=0.573 ms
    1032 bytes from 132.97.122.1: icmp_seq=18 ttl=64 time=0.582 ms
    1032 bytes from 132.97.122.1: icmp_seq=19 ttl=64 time=0.496 ms
    1032 bytes from 132.97.122.1: icmp_seq=20 ttl=64 time=0.520 ms
    1032 bytes from 132.97.122.1: icmp_seq=21 ttl=64 time=0.517 ms
    1032 bytes from 132.97.122.1: icmp_seq=22 ttl=64 time=0.609 ms
    1032 bytes from 132.97.122.1: icmp_seq=23 ttl=64 time=0.505 ms
    1032 bytes from 132.97.122.1: icmp_seq=24 ttl=64 time=0.527 ms
    1032 bytes from 132.97.122.1: icmp_seq=25 ttl=64 time=0.532 ms
    1032 bytes from 132.97.122.1: icmp_seq=26 ttl=64 time=0.613 ms
    1032 bytes from 132.97.122.1: icmp_seq=27 ttl=64 time=0.537 ms
    1032 bytes from 132.97.122.1: icmp_seq=28 ttl=64 time=0.500 ms
    1032 bytes from 132.97.122.1: icmp_seq=29 ttl=64 time=0.565 ms
    1032 bytes from 132.97.122.1: icmp_seq=30 ttl=64 time=0.519 ms
    --- 132.97.122.1 ping statistics ---
    30 packets transmitted, 30 received, 0% packet loss, time 29005ms
    rtt min/avg/max/mdev = 0.420/0.537/0.632/0.048 ms
    4. traceroute信息如下:
    [oracle@bppfrdb1 jc]$ traceroute 132.97.122.1 -p 1521
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.803 ms 0.785 ms 0.772 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.560 ms 0.543 ms 0.533 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.462 ms 0.456 ms *
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.740 ms 0.741 ms 0.733 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.350 ms * *
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.602 ms 0.587 ms 0.580 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.757 ms 0.745 ms *
    其他说明:
    这个报错不是每次查询都出现,时有时无,一些查询会失败;
    有达人说,是分布式事务,二阶段提交失败,但是没搞懂,为啥会提交失败?提交失败也是一个问题吧
    谢谢各位了

    问题背景:有两套数据库服务器oracle11g RAC,版本是11.2.0.3,分别有两个用户user1,user2,user1通过跨库DBLINK(EASDB)去连接user2进行数据库查询。
    偶尔会报错ORA-02050,定位了好几天,排除网线没插好、主机防火墙等因素了,就是不知道其他问题在哪儿.
    奇怪的是反向的DBLINK,就没有类似问题
    报错内容:
    Mon Dec 10 09:58:21 2012
    Error 3135 trapped in 2PC on transaction 10.30.100680. Cleaning up.
    Error stack returned to user:
    ORA-02050: 事务处理 10.30.100680 已回退, 某些远程数据库可能有问题
    ORA-03135: 连接失去联系
    ORA-02063: 紧接着 line (起自 EASDB)
    Mon Dec 10 09:58:21 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948)
    insert pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Mon Dec 10 10:44:58 2012
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    Mon Dec 10 11:00:39 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    DBLINK创建脚本:
    drop public database link EASDB;
    create public database link EASDB connect to USER2 identified by "password"
    using '(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 132.97.122.1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 132.97.122.2)(PORT = 1521))(LOAD_BALANCE = yes)
    (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = bppfedb)(FAILOVER_MODE =
    (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))))';
    IP没有使用RAC的vip,而是物理IP
    日志收集
    1. reco后台进程的trace
    bppfrdb1_reco_18133.trc如下:
    *** 2012-12-07 18:25:11.899
    DISTRIB TRAN BPPFRDB.59c536a9.49.11.975
    is local tran 49.11.975 (hex=31.0b.3cf))
    delete pending collecting tran, scn=13074738503199 (hex=be4.3324de1f)
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    *** 2012-12-10 10:44:58.406
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    *** 2012-12-10 11:00:39.084
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    2. alert 日志
    alert_bppfrdb1.log如下:
    Mon Dec 10 07:00:40 2012
    Archived Log entry 3865 added for thread 1 sequence 1842 ID 0x9a632295 dest 1:
    Mon Dec 10 07:59:53 2012
    Time drift detected. Please check VKTM trace file for more details.
    Mon Dec 10 09:58:21 2012
    Error 3135 trapped in 2PC on transaction 10.30.100680. Cleaning up.
    Error stack returned to user:
    ORA-02050: 事务处理 10.30.100680 已回退, 某些远程数据库可能有问题
    ORA-03135: 连接失去联系
    ORA-02063: 紧接着 line (起自 EASDB)
    Mon Dec 10 09:58:21 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948)
    insert pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Mon Dec 10 10:44:58 2012
    DISTRIB TRAN BPPFRDB.59c536a9.31.13.2318
    is local tran 31.13.2318 (hex=1f.0d.90e))
    delete pending collecting tran, scn=13074744375475 (hex=be4.337e78b3)
    Mon Dec 10 11:00:39 2012
    DISTRIB TRAN BPPFRDB.59c536a9.10.30.100680
    is local tran 10.30.100680 (hex=0a.1e.18948))
    delete pending collecting tran, scn=13074744378110 (hex=be4.337e82fe)
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.3.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    Time: 10-DEC-2012 11:41:59
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=132.97.122.113)(PORT=47823))
    Mon Dec 10 11:41:59 2012
    Fatal NI connect error 12170.
    VERSION INFORMATION:
    TNS for Linux: Version 11.2.0.3.0 - Production
    Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.3.0 - Production
    Time: 10-DEC-2012 11:41:59
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 110
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=132.97.122.113)(PORT=47824))
    Mon Dec 10 11:41:59 2012
    3. ping测试网络日志
    ping的输出信息如下:
    [oracle@bppfrdb1 jc]$ ping -s 1024 -c 30 132.97.122.1
    PING 132.97.122.1 (132.97.122.1) 1024(1052) bytes of data.
    1032 bytes from 132.97.122.1: icmp_seq=1 ttl=64 time=0.473 ms
    1032 bytes from 132.97.122.1: icmp_seq=2 ttl=64 time=0.543 ms
    1032 bytes from 132.97.122.1: icmp_seq=3 ttl=64 time=0.622 ms
    1032 bytes from 132.97.122.1: icmp_seq=4 ttl=64 time=0.538 ms
    1032 bytes from 132.97.122.1: icmp_seq=5 ttl=64 time=0.570 ms
    1032 bytes from 132.97.122.1: icmp_seq=6 ttl=64 time=0.544 ms
    1032 bytes from 132.97.122.1: icmp_seq=7 ttl=64 time=0.511 ms
    1032 bytes from 132.97.122.1: icmp_seq=8 ttl=64 time=0.550 ms
    1032 bytes from 132.97.122.1: icmp_seq=9 ttl=64 time=0.469 ms
    1032 bytes from 132.97.122.1: icmp_seq=10 ttl=64 time=0.574 ms
    1032 bytes from 132.97.122.1: icmp_seq=11 ttl=64 time=0.568 ms
    1032 bytes from 132.97.122.1: icmp_seq=12 ttl=64 time=0.632 ms
    1032 bytes from 132.97.122.1: icmp_seq=13 ttl=64 time=0.522 ms
    1032 bytes from 132.97.122.1: icmp_seq=14 ttl=64 time=0.420 ms
    1032 bytes from 132.97.122.1: icmp_seq=15 ttl=64 time=0.474 ms
    1032 bytes from 132.97.122.1: icmp_seq=16 ttl=64 time=0.506 ms
    1032 bytes from 132.97.122.1: icmp_seq=17 ttl=64 time=0.573 ms
    1032 bytes from 132.97.122.1: icmp_seq=18 ttl=64 time=0.582 ms
    1032 bytes from 132.97.122.1: icmp_seq=19 ttl=64 time=0.496 ms
    1032 bytes from 132.97.122.1: icmp_seq=20 ttl=64 time=0.520 ms
    1032 bytes from 132.97.122.1: icmp_seq=21 ttl=64 time=0.517 ms
    1032 bytes from 132.97.122.1: icmp_seq=22 ttl=64 time=0.609 ms
    1032 bytes from 132.97.122.1: icmp_seq=23 ttl=64 time=0.505 ms
    1032 bytes from 132.97.122.1: icmp_seq=24 ttl=64 time=0.527 ms
    1032 bytes from 132.97.122.1: icmp_seq=25 ttl=64 time=0.532 ms
    1032 bytes from 132.97.122.1: icmp_seq=26 ttl=64 time=0.613 ms
    1032 bytes from 132.97.122.1: icmp_seq=27 ttl=64 time=0.537 ms
    1032 bytes from 132.97.122.1: icmp_seq=28 ttl=64 time=0.500 ms
    1032 bytes from 132.97.122.1: icmp_seq=29 ttl=64 time=0.565 ms
    1032 bytes from 132.97.122.1: icmp_seq=30 ttl=64 time=0.519 ms
    --- 132.97.122.1 ping statistics ---
    30 packets transmitted, 30 received, 0% packet loss, time 29005ms
    rtt min/avg/max/mdev = 0.420/0.537/0.632/0.048 ms
    4. traceroute信息如下:
    [oracle@bppfrdb1 jc]$ traceroute 132.97.122.1 -p 1521
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.803 ms 0.785 ms 0.772 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.560 ms 0.543 ms 0.533 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.462 ms 0.456 ms *
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.740 ms 0.741 ms 0.733 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.350 ms * *
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.602 ms 0.587 ms 0.580 ms
    traceroute to 132.97.122.1 (132.97.122.1), 30 hops max, 60 byte packets
    1 132.97.122.1 (132.97.122.1) 0.757 ms 0.745 ms *
    其他说明:
    这个报错不是每次查询都出现,时有时无,一些查询会失败;
    有达人说,是分布式事务,二阶段提交失败,但是没搞懂,为啥会提交失败?提交失败也是一个问题吧
    谢谢各位了

  • ORA-02068: following severe error from ....

    Hi,
    we have a dataguard setup for 10g databases on AIX platform as below.
    host1(TALON) host2(CATALINA)
    TICSPROD (PRIMARY ) TICSPROD(STANDBY)
    PLSPROD (STANDBY) PLSPROD (PRIMARY)
    We have decided to recreate PLSPROD STANDBY(because of some setup issues) this weekend and last night we just disabled the PLSPROD STANDBY.Means now only PLSPROD PRIMARY is working.
    Last night, suddenly in the PRIMARY TICSPROD alert log file we see the below error.Is it because of the dataguard issue or any other issue.Please help as we have no clue how to resolve this.
    ORA-02050: transaction 4.34.2844973 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from PLSPROD
    ORA-03113: end-of-file on communication channel

    We have decided to recreate PLSPROD STANDBY(because of some setup issues) this weekend and last night we just disabled the PLSPROD STANDBY.Means now only PLSPROD PRIMARY is working.
    Last night, suddenly in the PRIMARY TICSPROD alert log file we see the below error.Is it because of the dataguard issue or any other issue.Please help as we have no clue how to resolve this.
    ORA-02050: transaction 4.34.2844973 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from PLSPROD
    ORA-03113: end-of-file on communication channel
    What are the parameters of standby
    post
    show parameter dest_2
    show parameter state_2ORA-02050:
         transaction string rolled back, some remote DBs may be in-doubt
    Cause:      network or remote failure in 2PC.
    Action:      Notify operations; remote DBs will automatically re-sync when the failure is repaired.
    defer the destination state 2 also refer the below link
    http://www.orafaq.com/forum/t/67115/2/

  • One of the database is down in streaming environment

    I have scenario where one of the database in (two different database) streaming environment is unavailable due to nework/link/database maintenance purpose. Since my other database is up and running and DML/DDL operations are in process how can I avoid following error
    SQL> insert into test values ('eee', 'code e');
    1 row created.
    SQL> commit;
    commit
    ERROR at line 1:
    ORA-02050: transaction 5.23.8870 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from OTHER_DOWN_DATABASE
    ORA-03113: end-of-file on communication channel
    ============================================
    Can I change some parameters in DBMS_STREAMS_ADM Package or any other packages to avoid above situation

    Thanks for the reply.
    I am getting the same error even If I just do select on the table which I have for streaming
    SQL> select * from test@dbtest;
    select * from test@dbtest
    ERROR at line 1:
    ORA-02068: following severe error from DBTEST ---destination database
    ORA-03113: end-of-file on communication channel.
    Q- Wich database is down? Is it the source database or the destination database?
    For now I am testing with keeping down destination database.
    Q- If it's the source db, just stop the capture. That's all you really have to do.
    A- This can be good for planned maintenance, but how about unplanned outage or sudden problem (with networks/links or all of a sudden I can not stream my data changes to destination database).
    Q--The error you're describing is unclear.... Do you get that error immediately when you issue the insert and the commit? That sound very very strange to me because streams does asynchronous replication... You would not get such an error for db down from my opinion.
    A-- First time, I got this error when I updated a row and then tried to commit while my destination database was down.
    Q- It looks like the problem has nothing to do with streams but rather a distributed transaction problem (2pc)...
    A- If it is transaction problem should I be getting similar error while selecting from destination table, see the above error

  • Error creating materialized view log using DBlink

    Hi guys,
    I have 2 databases in diferent machines . (machine A and B)
    Machine A is my production database and I have a database link in machine B accessing Machine A
    CREATE MATERIALIZED VIEW vm_test
    BUILD IMMEDIATE
    REFRESH FAST ON commit as
    select * from test@A
    -- no problem in this first operation the materialized view was created sucessfully
    Now I need to create the LOG
    SQL> CREATE MATERIALIZED VIEW LOG ON test
    2 PCTFREE 5
    3 TABLESPACE prodemge_2006
    4 STORAGE (INITIAL 10K NEXT 10K);
    CREATE MATERIALIZED VIEW LOG ON test
    ERROR at line 1:
    ORA-02050: transaction 5.21.8771 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from A
    ORA-03113: end-of-file on communication channel
    What could be causing this error ?
    Thank you,
    Felipe

    ORA-02050 transaction string rolled back, some remote DBs may be in-doubt
    Cause: Network or remote failure during a two-phase commit.
    Action: Notify operations; remote databases will automatically re-sync when the failure is repaired.
    ORA-02068 following severe error from stringstring
    Cause: A severe error (disconnect, fatal Oracle error) was received from the indicated database link. See following error text.
    Action: Contact the remote system administrator.
    M.S.Taj

  • Oracle 8.1.7 connected to MS sql 7 through transparence Gateway

    I did a query that insert data in Oracle from MS sql Server via a db link (TS3g)
    The Gateway is configurated correctly but when i tryed to commit my transaction the next error appear.
    commit
    ERROR at line 1:
    ORA-02050: transaction 6.1.56725 rolled back, some remote DBs may be in-doubt
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for MSSQL]rc = -1
    ORA-02063: preceding 2 lines from TS3G
    Does anybody know what does it mean?
    Thanks for your help.

    Paul,
    Looks like the gateway is not configured properly. Please take a look at the gateway manual for more information on 'Configuring for Two-Phase Commit'.
    If this does not help please contact Oracle support and they should be able to help you resolve the issue.
    Vira

  • HS_NLS_LENGTH_SEMANTIC not working

    Hello,
    I'm migrating from DB2/400 to Oracle and I would like to preserve CHAR semantics.
    I added the following confs to init file in gateway:
    HS_KEEP_REMOTE_COLUMN_SIZE=ALL
    HS_NLS_LENGTH_SEMANTICS=CHAR
    The result is not as expected:
    SQL> desc  TEST.testchar@db2;
    Name                                      Null?    Type
    TESTCOL                                            CHAR(1 CHAR)
    SQL> create table test1 as (select * from TEST.testchar@db2);
    Table created.
    SQL> desc test1;
    Name                                      Null?    Type
    TESTCOL                                            CHAR(1)
    Why I'm not getting CHAR(1 CHAR) in Oracle?
    Log file:
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "ALL"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "CHAR"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_NLS_LENGTH_SEMANTICS" returned "CHAR"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "FALSE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    Note:
    Look to this strange behavior (this happened when I killed manually dg4db2 process):
    SQL> desc TEST.testchar@db2;
    Name                                      Null?    Type
    TESTCOL                                            CHAR(1 CHAR)
    SQL> create table test1 as (select * from  TEST.testchar@db2);
    create table test1 as (select * from  TEST.testchar@db2)
    ERROR at line 1:
    ORA-02050: transaction 8.30.2234 rolled back, some remote DBs may be in-doubt
    ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxl)(PORT=1512))(
    CONNECT_DATA=(SID=dg4db2)))
    ORA-02063: preceding line from DB2
    SQL> desc test1;
    Name                                      Null?    Type
    COL1                                               CHAR(1 CHAR)
    Thanks a lot!

    Oracle Database Gateway 12c for DRDA
    HS_KEEP_REMOTE_COLUMN_SIZE=LOCAL
    HS_NLS_LENGTH_SEMANTICS=CHAR
    It doesn't work:
    SQL> desc  SCHEMA.testchar@db2;
    Name                                      Null?    Type
    TESTCOL                                            CHAR(1)
    SQL>  drop table test;
    Table dropped.
    SQL>  create table test as (select * from SCHEMA.testchar@db2);
    Table created.
    SQL> desc test;
    Name                                      Null?    Type
    TESTCOL                                            CHAR(3 BYTE)
    I want to have CHAR(1 CHAR) in Oracle side.
    I don't understand why this is happening.
    Pluggable database configration:
    SQL> SELECT * FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'
      2  ;
    PARAMETER
    VALUE
    NLS_CHARACTERSET
    AL32UTF8
    SQL> show parameter semant
    NAME                                 TYPE        VALUE
    nls_length_semantics                 string     BYTE
    Thanks a lot for you support

  • Find query from transaction id

    Hello at all.
    Into my alert.log file i find this message:
    Wed Mar 26 08:31:12 2008
    Error 2068 trapped in 2PC on transaction 60.39.44158. Cleaning up.
    Error stack returned to user:
    ORA-02050: transaction 60.39.44158 rolled back, some remote DBs may be in-doubt
    ORA-02068: following severe error from PUBVSE
    ORA-03113: end-of-file on communication channel
    Wed Mar 26 08:31:12 2008
    DISTRIB TRAN GST.SCMGROUP.COM.49dceeb.60.39.44158
    is local tran 60.39.44158 (hex=3c.27.ac7e)
    insert pending collecting tran, scn=2529676676678 (hex=24c.fc7ace46)
    Wed Mar 26 08:31:12 2008
    DISTRIB TRAN GST.SCMGROUP.COM.49dceeb.60.39.44158
    is local tran 60.39.44158 (hex=3c.27.ac7e))
    delete pending collecting tran, scn=2529676676678 (hex=24c.fc7ace46)
    how can i find the query from transaction id: 60.39.44158
    Thanks.

    Take a look at Oracle Metalink Note:337870.1 and Note:214851.1
    Regards,
    Sabdar Syed.

  • Is the 2-phase commit 100% reliable?

    Could there be a situation where there could be partial commits?
    Is it 100% accurate?
    Becuase we are thinking about using Oracle Transparent Gateway which has the 2PC mechanism.

    Well, there are cases when transactions get in doubt, and one has to do the manual recovery in two phase commit.
    Normally, ORA-02050 or ORA-02053 messages are received by the application in that case.
    You can check dba_2pc_pending for more help.
    regards

  • PL/SQL report errors: ORA-01422

    Hi all,
    (before i you read i would like to say i have searched the net for this error code but nothing shows up like this problem..)
    I am getting an error problem when i select certain Schemas from a list on an apex app. page, it only works for some schemas not all..
    When i select one schema, it is supposed to display one row.. when i select [ALL] it is supposed to show them all.
    It does work if i select '[ALL]' from the select list (p3_schema_name), just not for every single individual one.
    the error code:
    ORA-01422: exact fetch returns more than requested number of rows
    declare
      vSchema  varchar2(20);
      vStmt  varchar2(1000);
      vVersion number(5);
      vDBName  varchar2(20);
      vHostName varchar2(80);
      vStmt2  varchar2(1000);
      vVersion2 number(5);
      vDBName2  varchar2(20);
      vServer2 varchar2(80);
      vSchema2 varchar2(80);
      CURSOR c_schemas IS
        select owner from dba_tables@P3_DB_NAME.db_link where table_name = 'DDL_LOG' and num_rows > 0 order by owner;
    begin
      IF :P3_SCHEMA_NAME != '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
        vServer2 := :P3_SERVER_NAME;
        vSchema2 := :P3_SCHEMA_NAME;
          vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM';
          Execute Immediate vStmt2 into vDBName2, vVersion2;
            htp.p('<br>');
            htp.p('<table border="1">');
            htp.p('<tr>');
            htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
            htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
            htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
            htp.p('<th bgcolor="#FFCC99">PATCH</th>');
            htp.p('</tr>');
            htp.p('<tr>');
            htp.p('<td>');
            htp.p(vServer2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vDBName2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vSchema2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p(vVersion2);
            htp.p('</td>');
            htp.p('<td>');
            htp.p('<BR>');
            htp.p('</td>');
            htp.p('</tr>');
            htp.p('</tr>');
            htp.p('</table>');
       ELSE IF :P3_SCHEMA_NAME = '[ALL]' AND :P3_DB_NAME IS NOT NULL AND :P3_SERVER_NAME IS NOT NULL THEN
       vHostName := :P3_SERVER_NAME;
       vDBName := :P3_DB_NAME;
         open c_schemas;
          htp.p('<br>');
          htp.p('<table border="1">');
          htp.p('<tr>');
          htp.p('<th bgcolor="#FFCC99">SERVER NAME</th>');
          htp.p('<th bgcolor="#FFCC99">DB NAME</th>');
          htp.p('<th bgcolor="#FFCC99">SCHEMA NAME</th>');
          htp.p('<th bgcolor="#FFCC99">PATCH</th>');
          htp.p('</tr>');
        LOOP
          FETCH c_schemas INTO vSchema;
          EXIT WHEN c_schemas%NOTFOUND;
          vStmt  := 'select max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link where DDH_SCHEMA_NR = (select max(DDH_SCHEMA_NR) from '||vSchema||'.ddl_log@&P3_DB_NAME.db_link) and rownum < 2' ;
          Execute Immediate vStmt into vVersion  ;
          htp.p('<tr>');
          htp.p('<td>');
          htp.p(vHostName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vDBName);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vSchema);
          htp.p('</td>');
          htp.p('<td>');
          htp.p(vVersion);
          htp.p('</td>');
          htp.p('<td>');
          htp.p('<BR>');
          htp.p('</td>');
          htp.p('</tr>');
        END LOOP;
          htp.p('</tr>');
          htp.p('</table>');  
      CLOSE c_schemas;
    END IF;
    END IF;
    END;I have checked the DDH_SCHEMA_NR for repeating entries of the highest number.. some of the ones that dont work do have repeating entries some don't.
    Sorry if this is confusing, i have tried to explain it as best as i can.
    Thanks in advance for any help.
    Ashleigh

    Hello Ashleigh,
    Based on your code, I'd start by running this piece of SQL via command-line (thru SQL Workshop, SQL*Plus, Toad, etc.), replacing &P3_SCHEMA_NAME. and &P3_DB_NAME. with values that are currently causing the routine to fail and see if it returns more than one row. I don't know your data, but DISTINCT and GROUP BY are typically used to return multiple (though grouped/summarized) rows. It appears to be the only statement that would cause the error your seeing (more than one row being returned into single variables).
    select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from &P3_SCHEMA_NAME..ddl_log@&P3_DB_NAME.db_link GROUP BY DDH_DB_NM;I'm actually surprised that the code runs at all. I didn't think 'execute immediate' would know what to do with substitutions indicated as "&something." (I've typically seen that when substituting in dynamic HTML/Javascript code but maybe I'm learning something new). But since you already have vServer2 and vSchema2, I'd be more apt to code it as:
    vStmt2 := 'select distinct DDH_DB_NM, max(DDH_SCHEMA_NR)keep(dense_rank last order by ddh_runstart_td) AS "PATCH" from ' ||
    vSchema2 || '.ddl_log@' || vServer2 || '.db_link GROUP BY DDH_DB_NM';Hope this helps,
    John

  • Ora-00604 error and ora 01000 error while report generation.

    hi all,
    I am trying to generate the multiple reports of same template through a program.
    While this job is running, i get the following error at the BIP console and the reports don't get generated.
    [101711_044115578][][EXCEPTION] java.sql.SQLException: ORA-00604: error occurred
    at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    ORA-01000: maximum open cursors exceeded
    Kindly help.
    Thanks.

    Lots of resources with a simple search to see what this is about, for example:
    http://www.orafaq.com/wiki/ORA-01000
    ORA-01000:     maximum open cursors exceeded
    Cause:     A host language program attempted to open too many cursors. The initialization parameter OPEN_CURSORS determines the maximum number of cursors per user.
    Action:     Modify the program to use fewer cursors. If this error occurs often, shut down Oracle, increase the value of OPEN_CURSORS, and then restart Oracle.
    open_cursors parameter
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/initparams160.htm#REFRN10137
    Oracle support note:
    OERR: ORA-1000 maximum open cursors exceeded (Doc ID 18591.1)

  • EA2: ORA-01427 clicking on a view in the navigator

    SQLDev: 1.5.0.52.03
    Java: 1.6.0_04
    Oracle: 9.2.0.7.0
    I'm getting the following error when I click on a view in the navigator pane:
    An error was encountered performing the requested operation:
    ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"I'm not seeing any errors in the shell window.
    After clicking on <OK> in the error dialog, the normal tabs (Columns, Data, Grants, Dependencies, Details, SQL) are displayed, but there is no content in the Columns tab.
    All the other tabs seem to function normally.
    Here is the DDL from the SQL tab
    CREATE OR REPLACE VIEW "SUBSCRIPTIONS"
        "ORDER_ID", "SUNBURST_ORDER_ID", "SIEBEL_ORDER_ID", "ACCOUNT_ID",
        "COMP_ID", "SUBACCOUNT_ID", "START_DATE", "END_DATE", "PULL_DATE",
        "SUBSCRIPTION_TYPE", "PRICE_CLASS", "DESCRIPTION", "SEAT_COUNT",
        "ORDER_DURATION", "CALLBACK_INTERVAL", "UPDATE_DATE", "UPDATE_USERNAME",
        "AFFILIATE"
    AS
        SELECT order_id,
            sunburst_order_id,
            siebel_order_id,
            account_id,
            comp_id,
            subaccount_id,
            start_date,
            end_date,
            pull_date,
            product_id,
            price_class,
            product_name,
            add_users,
            order_duration,
            callback_interval,
            last_mdfy_date,
            last_mdfy_emp,
            affiliate
        FROM csbcrossworlds.subscriptions;We have 15 views in this schema, 3 of them fail this way but the other 12 display the columns just fine. So far I am unable to detect any commonality.
    Any ideas?

    Ok, I think I found the problem. The view in question (SUBSCRIPTIONS) is owned by 'PHILC' and it references a table named 'SUBSCRIPTIONS' owned by 'CSBCROSSWORLDS'. There are two other development schemas that also own tables named 'SUBSCRIPTIONS'.
    I believe the 'Columns' tab is executing the query below. The subquery in this SQL tries to identify the primary key columns for the 'SUBSCRIPTIONS' view in my schema (PHILC):
    SELECT
        c.column_name,
        DECODE(
            data_type,
                'CHAR',      data_type||'('||c.data_length||')',
                'VARCHAR',   data_type||'('||c.data_length||')',
                'VARCHAR2',  data_type||'('||c.data_length||')',
                'NCHAR'   ,  data_type||'('||c.data_length||')',
                'NUMBER'  ,  DECODE(c.data_precision,null,'NUMBER', data_type||'('||c.data_precision||','||c.data_SCALE||')'),
                'NVARCHAR',  data_type||'('||c.data_length||')',
                'NVARCHAR2', data_type||'('||c.data_length||')',
                data_type) data_type,
        DECODE(nullable, 'Y', 'Yes', 'No') nullable,
        c.DATA_DEFAULT,
        column_id,
        com.comments,
        (SELECT 1 FROM all_constraints, all_cons_columns
          WHERE all_constraints.constraint_type = 'P' AND
                all_constraints.constraint_name = all_cons_columns.constraint_name AND
                all_constraints.owner = all_cons_columns.owner AND
                all_cons_columns.table_name = c.table_name AND
                c.column_name = all_cons_columns.column_name) Primary_Key,
        c_update.insertable,
        c_update.updatable,
        c_update.deletable
    FROM
        sys.all_tab_Columns c, sys.all_col_comments com, sys.user_updatable_columns c_update
    WHERE
        c.owner = :OBJECT_OWNER AND
        c.table_name = :OBJECT_NAME AND
        c.table_name = com.table_name AND
        c.owner = com.owner AND
        c.column_name = com.column_name AND
        c_update.column_name = com.column_name AND
        c_update.table_name = com.table_name
    ;Extracting the subquery into this:
    SELECT
        all_constraints.owner,
        all_constraints.table_name,
        all_constraints.constraint_name
    FROM all_constraints, all_cons_columns
    WHERE
        all_constraints.constraint_type = 'P' AND
        all_constraints.constraint_name = all_cons_columns.constraint_name AND
        all_constraints.owner = all_cons_columns.owner and
        all_cons_columns.table_name = 'SUBSCRIPTIONS' and
        'ORDER_ID' = all_cons_columns.column_name;I got this output:
       owner          table_name      constraint_name
    CUTOVER          SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CROSSWORLDS      SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CSBCROSSWORLDS   SUBSCRIPTIONS    SUBSCRIPTIONS_PKLooking at the DDL for the view, the row we really want is for owner 'CSBCROSSWORLDS'. Unfortunately, that means having to somehow parse the SQL text to extract the owner name...
    Phil

  • Using database-link in view to get around ORA-01031 error

    I have been granted select rights on a users table. I am therefore able to select from his table. If however I try create a view against his table I run into the ORA-01031 problem. I have worked around this problem by creating a database-link to myself and then adding that to the view creation and it works. What are the downsides of using the database-link in this way?

    The only down side I have been able to identify is that a extra session is created and that the CPU has a little extra work due to the LOOP BACK that takes place. I need to ensure the network is not unnessesarly used and therefore will need to ensure that 127.0.0.1 (local host) is used in the database connection discription. e.g.
    create database link my_db_link connect to scott identified by tiger using '(description=(address=(protocol=tcp)(host=127.0.0.1) (Port = 1521) ) (connect_data= (sid=ora10g)))';

Maybe you are looking for