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 方式获取资源, 或者超时失效
    
  • 相关阅读:
    【转】手动写一个Behavior Designer任务节点
    【转】BehaviorDesigner学习
    Behavior trees for AI: How they work
    【转】behave行为树学习使用第一天
    【转】写给笨人的法线贴图原理
    【转】如何把Json格式字符写进text文件中
    【转】系列化与反系列化
    【转】C#中将JSon数据转换成实体类,将实体类转换成Json
    【转】c#处理3种json数据的实例
    【转】Mecanim Animator使用详解
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349108.html
Copyright © 2011-2022 走看看