• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

数据库恢复一例(1)

发布: 2007-7-02 11:08 | 作者: admin | 来源: | 查看: 8次 | 进入软件测试论坛讨论

领测软件测试网
oracle9i回滚段表空间丢失后的处理方法:

用隐含参数恢复数据库的例子:

具体操作步骤如下:

首先把初init.ora文件里自动管理改为手工管理,然后加入隐含参数:
#undo_management=AUTO
undo_tablespace=UNDOTBS
_corrupted_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)  

SQL>startup mount  (数据库启动到mount状态)
SQL> alter database datafile @#D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF@# offline drop;
Database altered.

SQL>alter database open;
Database opened.
SQL> show parameter undo

NAME TYPE VALUE
------------------------------------ ----------- ---------
undo_management string MANUAL
undo_retention integer 900
undo_suppress_errors boolean FALSE
undo_tablespace string UNDOTBS

SQL> drop tablespace undotbs including contents;
Tablespace dropped.

重建undotbs表空间:
SQL> create undo tablespace undotbs datafile @#D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF@#
size 100M;
Tablespace created.

SQL> shutdown immediate  (关闭数据库)
Database closed.
Database dismounted.
ORACLE instance shut down.

编辑init.ora初始化参数文件,去掉隐含参数,设置
undo_management=AUTO
undo_tablespace=UNDOTBS
保存init.ora文件,然后执行
SQL> startup mount
ORACLE instance mounted.
Total System Global Area 114061244 bytes
Fixed Size 282556 bytes
Variable Size 79691776 bytes
Database Buffers 33554432 bytes
Redo Buffers 532480 bytes
Database mounted.

SQL>alter database datafile @#D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF@# online;
Database altered.

SQL>alter database open;
Database opened.
SQL> show parameter undo

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_suppress_errors boolean FALSE
undo_tablespace string UNDOTBS

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网