zoukankan      html  css  js  c++  java
  • 一个表上有事务,直接创建索引?

    表上有事务,创建索引:
    [oracle@yyjk ~]$ sqlplus tlcbuser/tlcbuser
    
    SQL*Plus: Release 11.2.0.4.0 Production on 星期三 8月 22 08:27:41 2018
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> set linesize 200
    SQL> set pagesize 200
    SQL> select * from v$mystat where rownum<2;
    
           SID STATISTIC#       VALUE
    ---------- ---------- ----------
           143        0           0
    
    SQL> create table test_index as select owner,object_id,object_name,created from dba_objects;
    
    Table created.
    
    SQL> 
    
    SQL>  insert into test_index values ('aa','11','aa',sysdate);
    
    1 row created.
    
    SQL> 
    
    
    SQL> select * from v$mystat where rownum<2;
    
           SID STATISTIC#       VALUE
    ---------- ---------- ----------
        30        0           0
    
    SQL> desc test_index
     Name                                                           Null?    Type
     ----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
     OWNER                                                                VARCHAR2(30)
     OBJECT_ID                                                            NUMBER
     OBJECT_NAME                                                            VARCHAR2(128)
     CREATED    
    
    SQL> create index test_index_idx1 on test_index(object_id);
    create index test_index_idx1 on test_index(object_id)
                                    *
    ERROR at line 1:
    ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效
    
    
    update呢?
    
    
    SQL> update test_index set owner='CCC' where owner='aa';
    
    1 row updated.
    
    
    
    
    SQL>  create index test_index_idx1 on test_index(object_id);
     create index test_index_idx1 on test_index(object_id)
                                     *
    ERROR at line 1:
    ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效
    
    
    
    delete呢?
    
    SQL> delete from test_index  where owner='aa';
    
    1 row deleted.
    
    SQL> create index test_index_idx1 on test_index(object_id);
    create index test_index_idx1 on test_index(object_id)
                                    *
    ERROR at line 1:
    ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效
    
  • 相关阅读:
    2020/5/18 BUU_ [GWCTF 2019]xxor
    2020/5/17 BUU_[BJDCTF2020]BJD hamburger competition
    2020/5/17 BUU_[BJDCTF2020]easy
    2020/5/16 BUU_ [ACTF新生赛2020]easyre
    2020.5.16 15:06
    由一道逆向题而引发,IDA调试ELF文件
    【攻防世界】对于parallel-comparator-200的理解的感想
    『攻防世界』:新手区 | when_did_you_born
    『攻防世界』:新手区 | guess number
    『攻防世界』:新手区 | level3
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349108.html
Copyright © 2011-2022 走看看