索引、Sequence、lock
1.表与索引的关系
SQL> select index_name,table_name from user_indexes;
删除表,同时删除索引
SQL>drop table XX cascade constraints;
2.创建sequence
.创建序列以1开始,每次加1,没有最大值,不循环,内存中缓冲20个数值
SQL>create sequence order_sql
start with 1
increment by 1
nomaxvalue
nocycle
cache 20;
3.查询并kill阻碍进程
SQL>select * from dba_blockers;
HOLDING_SESSION
138
SQL>select sid,serial# from v$session where sid=138;
sid serial#
138 277
SQL>alter system kill session '138,277' immediate;
System altered
posted on 2013-06-07 15:49 newmanzhang 阅读(192) 评论(0) 编辑 收藏 举报