×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

I do not know what does the result mean. :((

XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME OS_USER_NAME
--------- --------- --------- --------- ---------- ------------------------------ ---------------
PROCESS LOCKED_MODE
--------- -----------
5 7 211 3162 9 MAXIMO b
429452139 3

0 0 0 3162 17 MAXIMO b
429471204 3

0 0 0 3162 15 MAXIMO b
429480039 3

0 0 0 3162 14 MAXIMO b
429473015 3
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / ORACLE专家请进
    本文发表在 rolia.net 枫下论坛我用SQL LOADER(SQLLDR80)拷贝两个关联表进ORACLE。
    结果,在ORACLE中可以看见这些记录,但不能删除。(执行删除时,ORACLE死掉)。
    相关语句如下:

    COMMAND:
    QLLDR80.EXE maximo/maximo control= C:\export\SQLLDR\loadjpoperation.dat,
    log= C:\export\SQLLDR\loadjpoperation.log, bad= C:\export\SQLLDR\loadjpoperation.bad bindsize=65536 ROWS=2013

    LOG:
    SQL*Loader: Release 8.0.4.0.0 - Production on Tue Mar 12 8:25:43 2002

    (c) Copyright 1997 Oracle Corporation. All rights reserved.

    Control File: C:\EXPORT\SQLLDR\loadjpoperation.dat
    Data File: C:\export\sqlldr\JPOperation.txt
    Bad File: C:\EXPORT\SQLLDR\loadjpoperation.bad
    Discard File: none specified

    (Allow all discards)

    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 2013 rows, maximum of 65536 bytes
    Continuation: none specified
    Path used: Conventional

    Table JOBOPERATION, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect

    Column Name Position Len Term Encl Datatype
    ------------------------------ ---------- ----- ---- ---- ---------------------
    JPNUM FIRST * , O(") CHARACTER
    JPOPERATION NEXT * , O(") CHARACTER
    DESCRIPTION NEXT * , O(") CHARACTER
    OPDURATION NEXT * , O(") CHARACTER

    ROWSTAMP SEQUENCE (MAX, 1)


    Table JOBOPERATION:
    2013 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.


    Space allocated for bind array: 65410 bytes(62 rows)
    Space allocated for memory besides bind array: 0 bytes

    Total logical records skipped: 0
    Total logical records read: 2013
    Total logical records rejected: 0
    Total logical records discarded: 0

    Run began on Tue Mar 12 08:25:43 2002
    Run ended on Tue Mar 12 08:37:19 2002

    Elapsed time was: 00:11:36.61
    CPU time was: 00:00:00.00更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • 死掉是什么意思?执行这个删除操作的程序比如SQLPLUS没反应了还是整个ORACLE全完了,其它进程也不能执行操作了?
      • I use SQLPlus, it has no reaction until I ctrl+alt+del. For SQLLDR, i thought maybe i set wrong parameter for bindsize?
        • 在SQLPLUS里用CTRL+C结果如何?数据已进入了表中,应与SQLLDR没什么关系了,是否有其它SESSION在用这个表,有未完成的和TRANSACTION,锁没释放,你的SQLPLUS要等这个锁。
          • CTRL+C does not work.
        • 用SQLPLUS,以SYSTEM用户连接,select object_id from dba_objects where object_type='TABLE' and object_name='TABLE_NAME'; select * from v$locked_object where object_id=the_object_id_got_from_last_query; 是否有记录查出?
          • I do not know what does the result mean. :((
            XIDUSN XIDSLOT XIDSQN OBJECT_ID SESSION_ID ORACLE_USERNAME OS_USER_NAME
            --------- --------- --------- --------- ---------- ------------------------------ ---------------
            PROCESS LOCKED_MODE
            --------- -----------
            5 7 211 3162 9 MAXIMO b
            429452139 3

            0 0 0 3162 17 MAXIMO b
            429471204 3

            0 0 0 3162 15 MAXIMO b
            429480039 3

            0 0 0 3162 14 MAXIMO b
            429473015 3
            • come in
              select sid, event from v$session_wait where sid in (9,17,15,14);
              select sid,serial#,status,program from v$session where sid in (9,17,15,14);
              • ORACLE盲谢谢你了。
                SQL> select sid, event from v$session_wait where sid in (9,17,15,14);

                SID EVENT
                --------- ----------------------------------------------------------------
                9 enqueue
                14 enqueue
                15 enqueue
                17 enqueue

                SQL> select sid,serial#,status,program from v$session where sid in (9,17,15,14);

                SID SERIAL# STATUS PROGRAM
                --------- --------- -------- ----------------------------------------------------------------
                9 52 ACTIVE PLUS80W.EXE
                14 75 ACTIVE PLUS80W.EXE
                15 10 ACTIVE PLUS80W.EXE
                17 52 ACTIVE PLUS80W.EXE
                • try to kill them. alter system kill session '9,52';alter system kill session '14,75';alter system kill session '15,10';alter system kill session '17,52'; then query the v$locked_object again.
                  • 非常感谢。这个问题解决了。我还有一个问题:
                    在SQLPLUS中,我可以看到我添加的新记录,而且SQLLDR的LOG文件也证实SQLLDR运行成功。
                    但在应有程序中,却看不到新添加的记录。
                    为什么呢?
                    • 不必客气。如果应用程序中的查询没什么条件的话,不应有这种情况。你是否可以看到应用中的query定义?
                      • Here is Control file of sqlldr and description for the destination table. I do not understand what do you mean by 应用中的query定义?
                        本文发表在 rolia.net 枫下论坛control file:

                        -- load file example
                        load data
                        INFILE 'c:\export\sqlldr\JP.txt'
                        INTO TABLE jobplan
                        APPEND
                        FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
                        TRAILING NULLCOLS
                        (JPNUM,
                        DESCRIPTION,
                        ROWSTAMP SEQUENCE (MAX,1),
                        JPDURATION,
                        PRIORITY
                        )


                        Description of jobplan:
                        SQL> desc jobplan;
                        Name Null? Type
                        ------------------------------- -------- ----
                        JPNUM NOT NULL VARCHAR2(10)
                        DESCRIPTION VARCHAR2(100)
                        JPDURATION NOT NULL FLOAT(126)
                        LABORCODE VARCHAR2(8)
                        JP1 VARCHAR2(10)
                        JP2 VARCHAR2(10)
                        JP3 NUMBER(10,2)
                        JP4 VARCHAR2(10)
                        JP5 NUMBER
                        LDKEY NUMBER
                        INTERRUPTABLE VARCHAR2(1)
                        DOWNTIME VARCHAR2(1)
                        SUPERVISOR VARCHAR2(8)
                        CALENDAR VARCHAR2(8)
                        PRIORITY NOT NULL NUMBER
                        CREWID VARCHAR2(8)
                        JP6 VARCHAR2(10)
                        JP7 VARCHAR2(10)
                        JP8 VARCHAR2(10)
                        JP9 NUMBER(10,2)
                        JP10 DATE
                        JP11 VARCHAR2(10)
                        JP12 VARCHAR2(10)
                        JP13 VARCHAR2(10)
                        JP14 NUMBER(10,2)
                        JP15 DATE
                        JP16 VARCHAR2(10)
                        JP17 VARCHAR2(10)
                        JP18 VARCHAR2(10)
                        JP19 VARCHAR2(10)
                        JP20 VARCHAR2(10)
                        JP21 VARCHAR2(10)
                        JP22 VARCHAR2(10)
                        JP23 NUMBER(10,2)
                        JP24 DATE
                        JP25 NUMBER(15,2)
                        JP26 NUMBER(15,2)
                        JP27 VARCHAR2(10)
                        JP28 VARCHAR2(10)
                        JP29 NUMBER
                        JP30 VARCHAR2(1)
                        ROWSTAMP NOT NULL VARCHAR2(40)更多精彩文章及讨论,请光临枫下论坛 rolia.net
                        • 你用SQLLDR加了数据,而且从SQLPLUS中能查到,这说明数据确实已在表中了。应用程序为什么看不到,只好看一下应用程序中的SELECT是如何写的,是否有什么WHERE条件等。
                          • Thank you. I found the reason. Another application always use capital letters. I really appreciate your help.
                            • You are welcome.