品牌创意企业推荐 推荐: 网站建设 上海网站建设 上海网页设计 
 
搜索 竞赛 产业 文案 论吧 论坛 酷站 矢量库 图片库 设计网址 作品集> 注册 - 登陆
首 页设计资讯大赛征集平面设计UI设计CG/动画工业设计建筑环境数码影像教程区设计访谈 精品欣赏会员作品集
>> 论坛发布优秀教程申请个人教程专区
推荐:经典素材资源
滚动新闻:[6-10]融于意,形于展!---52design作品集、设计师网上联展!
当前位置: 首页 >> 教程 >> 网站重构教程 >>正文
数据库数据完全丢失,恢复数据库过程
资讯/教程/作品在线投稿  - 进入素材基地 - 论坛讨论 - 查看更多相关内容
时 间:2007-8-22 16:38:27   作者:   来 源:52design.com   浏览:

恢复测试,模拟数据库硬盘损坏数据丢失。
1、数据库全备份,
2、备份数据文件、控制文件、spfile、口令文件

·设计师个人作品集火热申请中!
·查询网站排名推荐您用Chianz排名查询
·“论吧”正式上线 欢迎参与主题讨论
·全球经典酷站推荐欣赏
·矢量素材 给设计师提供强大后盾
·加入设计师论坛,精彩无限
·设计网址大全,免费收录所有设计站点

3、删除数据库(用dbca删除),只留oracle程序。

4、启动数据库实例

HB130000 oracle$rman target / catalog rman/rman@omsora9

Recovery Manager: Release 9.2.0.1.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database (not started)
connected to recovery catalog database

RMAN> startup nomount

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ’/oracle/oracle/app/oracle/product/9.2.
0.1/dbs/inithb130000.ora’

trying to start the Oracle instance without parameter files ...
Oracle instance started

Total System Global Area     156729832 bytes

Fixed Size                      741864 bytes
Variable Size                104857600 bytes
Database Buffers              50331648 bytes
Redo Buffers                    798720 bytes


5、查询原数据库dbid,恢复spfile
RMAN> list incarnation;查询原数据库的dbid。


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
15936   131731  HB130000 2380174037       YES 23440815   25-AUG-05

RMAN> set dbid=2380174037;  设置dbid。

executing command: SET DBID
RMAN> restore spfile;

Starting restore at 13-SEP-05

using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: restoring SPFILE
output filename=/oracle/oracle/app/oracle/product/9.2.0.1/dbs/spfilehb130000.ora
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rmanbackup/hb130000_ctl_c-2380174037-20050913-00.bak tag=n
ull params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 13-SEP-05

6、关闭数据库,使用使用spfile文件启动

RMAN> shutdown immediate

Oracle instance shut down

RMAN> startup nomount;

connected to target database (not started)
Oracle instance started

Total System Global Area     303530016 bytes

Fixed Size                      741408 bytes
Variable Size                268435456 bytes
Database Buffers              33554432 bytes
Redo Buffers                    798720 bytes

7、恢复控制文件

RMAN> restore controlfile;

Starting restore at 13-SEP-05

allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=14 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=15 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=16 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: restoring controlfile
output filename=/oracle/oracle/app/oracle/product/9.2.0.1/dbs/hb130000/control01
.ctl
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rmanbackup/hb130000_ctl_c-2380174037-20050913-00.bak tag=n
ull params=NULL
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=/oracle/oracle/app/oracle/product/9.2.0.1/dbs/hb130000/control01.
ctl
output filename=/oracle/oracle/app/oracle/product/9.2.0.1/dbs/hb130000/control02
.ctl
output filename=/oradata/hb130000/control03.ctl
Finished restore at 13-SEP-05


8、数据库mount

RMAN> alter database mount;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/13/2005 14:13:42
ORA-01990: error opening password file ’/oracle/oracle/app/oracle/product/9.2.0.
1/dbs/orapw’
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
RMAN> alter database mount;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 09/13/2005 14:17:18
ORA-01100: database already mounted

9、数据库恢复。

RMAN> restore database;

Starting restore at 13-SEP-05

using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /oradata/hb130000/indx01.dbf
restoring datafile 00008 to /oradata/hb130000/tools01.dbf
restoring datafile 00013 to /oradata/hb130000/CA.dbf
restoring datafile 00015 to /oradata/hb130000/FOGLIGHT.dbf
restoring datafile 00017 to /oradata/hb130000/GDSS.dbf
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /oradata/hb130000/undotbs01.dbf
restoring datafile 00004 to /oradata/hb130000/drsys01.dbf
restoring datafile 00007 to /oradata/hb130000/odm01.dbf
restoring datafile 00014 to /oradata/hb130000/QUEST.dbf
restoring datafile 00021 to /oradata/hb130000/oem_repository.dbf
channel ORA_DISK_3: starting datafile backupset restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /oradata/hb130000/cwmlite01.dbf
restoring datafile 00005 to /oradata/hb130000/example01.dbf
restoring datafile 00010 to /oradata/hb130000/xdb01.dbf
restoring datafile 00016 to /oradata/hb130000/gwd.dbf
restoring datafile 00020 to /oradata/hb130000/catalog_rman.dbf
channel ORA_DISK_4: starting datafile backupset restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oradata/hb130000/system01.dbf
restoring datafile 00009 to /oradata/hb130000/users01.dbf
restoring datafile 00012 to /oradata/hb130000/GFB.DBF
restoring datafile 00019 to /oradata/hb130000/tgggg.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rmanbackup/df_HB130000_568897697_175_1.bak tag=TAG20050913
T110814 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_2: restored backup piece 1
piece handle=/oradata/rmanbackup/df_HB130000_568897694_173_1.bak tag=TAG20050913
T110814 params=NULL
channel ORA_DISK_2: restore complete
channel ORA_DISK_3: restored backup piece 1
piece handle=/oradata/rmanbackup/df_HB130000_568897694_172_1.bak tag=TAG20050913
T110814 params=NULL
channel ORA_DISK_3: restore complete
channel ORA_DISK_4: restored backup piece 1
piece handle=/oradata/rmanbackup/df_HB130000_568897695_174_1.bak tag=TAG20050913
T110814 params=NULL
channel ORA_DISK_4: restore complete
Finished restore at 13-SEP-05

RMAN>


RMAN> recover database;

Starting recover at 13-SEP-05
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=32
channel ORA_DISK_1: restored backup piece 1
piece handle=/oradata/rmanbackup/df_HB130000_568897755_179_1.bak tag=TAG20050913
T110915 params=NULL
channel ORA_DISK_1: restore complete
archive log filename=/oradata/rmanbackup/archive/hb130000_1_32.dbf thread=1 sequ
ence=32
unable to find archive log
archive log thread=1 sequence=33
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/13/2005 14:20:50
RMAN-06054: media recovery requesting unknown log: thread 1 scn 26146497

RMAN> recover database;

Starting recover at 13-SEP-05
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4

starting media recovery

unable to find archive log
archive log thread=1 sequence=33
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/13/2005 14:26:33
RMAN-06054: media recovery requesting unknown log: thread 1 scn 26146497


10、数据库resetlogs打开
RMAN> alter database open resetlogs;

database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN>


11、完全备份数据库。


本文链接:


52design素材资源库52design图片库52design酷站营

我爱设计网www.52design.com
(在线编辑:morion) 】【打印】【关闭】【设计论坛】【设计师作品集
免责声明:本站刊载此文不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。对本文有异议,请联络本站!
转载要求:文章作者及来源信息必需保留。转载之图片、文件,链接请不要盗链到本站地址,且不准打上各自站点的水印。

经典设计欣赏 设计关键字:VI 新锐 包装 装帧 海报 地产广告 画册 名片 标志 软件界面 ICO 网页
富有创意的运动鞋广告
富有创意的运动鞋
杂志computer arts06年3月优秀作品欣赏
美国Amir H.平面设计作品
美国Amir H
老外图案设计欣赏
老外图案设计欣赏
日本经典视觉平面作品欣赏
日本经典视觉平面
New Faces 2006优秀作品欣赏
New Face
韩国站点 素材资源 艺术摄影 游戏娱乐 影视网站 建筑家居 FLASH站 旅游购物 明星网站
设计门户 优秀企业 时尚品牌 象素站点 数码通信 设计公司 汽车网站 国外优秀 儿童网站
个性展示 网站教学 工 作 室 学校教育 卡通漫画 文化艺术 体育运动 美容健身 食品饮料
当日文章推荐 查看更多相关内容
Dreamweaver| 用DW设计限时自动关闭的网页 [8-22]Dreamweaver| DW定制网页过渡功能 [8-22]
网站推广| 网站推广公司:仰仗搜索引擎生存 [8-22]理论文献| 我看中国的动画行业 [8-22]
Photoshop| PS实例:欧式风格的制作 [8-22]Photoshop| Photoshop简单水晶按钮制作 [8-22]
平面设计| 美国Amir H.平面设计作品 [8-22]平面设计| 日本经典视觉平面作品欣赏 [8-22]
平面设计| New Faces 2006优秀作品 [8-22]平面设计| Gee Ming Chieh 平面设 [8-22]
平面设计| 让你浮想连篇 暧昧却很有创意广告 [8-22]卡通动漫| TONY大神《光明之风+光明之泪》 [8-22]
会员作品集推荐 查看更多推荐会员作品
平面作品 | 插画作品 | 网页作品 | 包装作品 | 软件UI | 室内设计 | 数码摄影作品 | 建筑环境 | 工业设计 | 其他
降落烟仔卡卡走-迷Divinedoors互联通
GUI报纸广告LogoIDEAL玩具汇森玩具

数据载入中...
视觉焦点
优秀作品在线投稿
美国Amir H.平面设计作品
美国Amir
日本经典视觉平面作品欣赏
日本经典视觉
New Faces 2006优秀作品欣赏
New Fa
Gee Ming Chieh 平面设计
Gee Mi

站点新入
Photoshop打造纸质风格的最终幻想人物
Photos
Photoshop教程:绘制圣诞玻璃音乐盒
Photos
展区
韩国站点 素材资源 艺术摄影 游戏娱乐 影视网站 建筑家居 FLASH站 旅游购物 明星网站 个性展示 网站教学 工 作 室 学校教育
设计门户 优秀企业 时尚品牌 象素站点 数码通信 设计公司 汽车网站 国外优秀 儿童网站 文化艺术 体育运动 美容健身 食品饮料
网站名称:theodoru
网站地址:http://www.theodoru.com/
加入时间:2008-11-27 15:43:55
网站名称:bohrcafe
网站地址:http://www.bohrcafe.com/
加入时间:2008-11-27 15:43:20
网站名称:e-stradivarius
网站地址:http://www.e-stradivarius.com/
加入时间:2008-11-27 15:42:45
网站名称:toyotasw4
网站地址:http://www.toyotasw4.com.br/
加入时间:2008-11-27 15:39:48
网站名称:travislum
网站地址:http://www.travislum.com/
加入时间:2008-11-27 15:39:09
网站名称:nokia-li
网站地址:http://www.nokia-li.com.cn/ranking/
加入时间:2008-11-27 15:36:28
关于本站 | 联系方式 | 商业服务 | 合作伙伴 | 站点地图 | 免责声明 | 版权声明 | 在线投稿