ora-8103 解决脚本
来源:互联网 发布:电话小号软件 编辑:程序博客网 时间:2024/06/15 00:03
自己写的处理ora-8103 错误的脚本,对象实际已经删除了,但相关信息还是保留在数据字典了,需要修改数据字典,最后是alter system flush shared_pool;因为数据字典环
缓存是放在共享池里的。
create or replace procedure del_dictionary(p_obj in number) Authid Current_User as v_file number; v_block number; v_cnt number :=2; v_type number; v_bo number; v_count number;begin select count(1) into v_count from obj$ where obj#=p_obj; --v_type=19 table partition --v_type=20 index partition if v_count=0 then dbms_output.put_line('The obj# '||p_obj||' is alreay deleted!'); else select type# into v_type from obj$ where obj#=p_obj; if v_type=19 then select bo#,file#,block# into v_bo,v_file,v_block from tabpart$ where obj#=p_obj; dbms_output.put_line('file# is:'||v_file||' block# is:'||v_block); dbms_output.put_line('The block is table partion'); delete from obj$ where obj#=p_obj; delete from tabpart$ where obj#=p_obj; delete from seg$ where file#=v_file and block#=v_block; update partobj$ set partcnt =v_cnt where obj# =v_bo; else select bo#,file#,block# into v_bo,v_file,v_block from indpart$ where obj#=p_obj; dbms_output.put_line('file# is:'||v_file||' block# is:'||v_block); dbms_output.put_line('The block is index partion'); delete from obj$ where obj#=p_obj; delete from indpart$ where obj#=p_obj; delete from seg$ where file#=v_file and block#=v_block; update partobj$ set partcnt =v_cnt where obj# =v_bo; end if;end if; commit;EXCEPTION --WHEN v_raise THEN -- RAISE_APPLICATION_ERROR(-20010, 'object_id not exists!'); WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20011, 'ERROR:'||p_obj||' 不存在!');end;
1 0
- ora-8103 解决脚本
- 数据文件被误删,解决ORA-376,ORA-1578,ORA-8103问题
- ora 脚本强化版
- ora-01555,ORA-22924解决
- 解决ORA-01034/ORA-27101
- ORA-00600: ORA-12012 ORA-08102解决
- 定时清理Oracle数据库中不活动的session的脚本,解决ora-12516问题
- 解决 ORA-00305, ORA-00312以及ORA-01194, ORA-01110
- ORA-04091错误解决
- ora-14404错误解决
- ORA-00381 错误解决
- ORA-01033 的解决
- ORA-00257 错误解决
- ORA-00257解决
- ORA-27125错误解决
- 解决ORA-00020错误
- ORA-00313的解决
- 解决ORA-01031错误
- Jquery 点击tr取出某个td标签值
- 4.4 效果更好的滚动
- OpenSceneGraph实现的NeHe OpenGL教程 - 第十七课
- Android文字图片写入CSV(Base64)并分享
- 5.2 设备环境
- ora-8103 解决脚本
- OpenSceneGraph实现的NeHe OpenGL教程 - 第十八课
- 常见机器学习算法Python和R实现
- 【25】Reverse Nodes in k-Group
- list add方法的误区
- 第七章:druid.io实践分享之realtime+kafka 一
- 血的教训!!!
- 5.2.5 色彩 ABC
- OpenSceneGraph实现的NeHe OpenGL教程 - 第十九课