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 方式获取资源, 或者超时失效
    
  • 相关阅读:
    Linux 关机和重启命令
    Linux ubuntu安装ftp服务器
    C++ map和unsorted_map底层实现
    C++中的那些容器在使用时,哪些情况下迭代器会失效
    虚函数表的构造
    C++容器 priority_queue,堆的实现
    c++11中的move是否会改变对象的地址
    (转)关于linux中内核编程中结构体的赋值操作(结构体指定初始化)
    无参方法
    类和对象
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349108.html
Copyright © 2011-2022 走看看