oracle 高水位线问题
--查询高水位线 50295 0 28185 0
select blocks, empty_blocks from dba_tables where table_name='TODAYOTHERCONSUMERECORDS' and owner='ICCARDYIWU'
----
alter table TODAYOTHERCONSUMERECORDS enable row movement;
---
alter table TODAYOTHERCONSUMERECORDS shrink space;
select table_name,BLOCKS,EMPTY_BLOCKS,NUM_ROWS from user_tables where table_name = upper('TODAYOTHERCONSUMERECORDS');
能 truncate 最好 truncate
如果不能就加上
alter table TODAYOTHERCONSUMERECORDS enable row movement;
---
alter table TODAYOTHERCONSUMERECORDS shrink space;
这个会修改表数据 存储的 数据块位置 重新分配,加到 delete 后面就可以
就是一个表的数据误删掉 可以用闪回 找回来
如果执行这个 就不能闪回
alter table XXX enable row movement;
alter table XXX shrink space;
select blocks, empty_blocks from dba_tables where table_name='ARCHIVEDCONSUMERECORDS_201712'
and owner='ICCARDUSER';
alter table ARCHIVEDCONSUMERECORDS_201712 enable row movement;
alter table ARCHIVEDCONSUMERECORDS_201712 shrink space;
select * from ARCHIVEDCONSUMERECORDS_201712
ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效---解决方法
select session_id from v$locked_object;
SELECT sid, serial#, username, osuser FROM v$session where sid = 21;
alter system kill session '21,27874';
alter system kill session '73,6069';