分享
 
 
 

对Oracle10gASM生产数据库备份和恢复

王朝oracle·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

新的10g ASM生产数据库即将上线,以下是上线前做的简单的备份恢复测试:

1.首先执行备份

$ rman target / @full_bak.sql

Recovery Manager: Release 10.1.0.3.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle.

All rights reserved.

connected to target database: MMSDB (DBID=799462343)

RMAN run {

2 backup database plus archivelog delete all input;

3 delete obsolete;

4 }

5

Starting backup at 13-APR-05

current log archived

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=162 devtype=DISK

channel ORA_DISK_1: starting archive log backupset

channel ORA_DISK_1: specifying archive log(s) in backup set

input archive log thread=1 sequence=28 recid=2 stamp=555502358

channel ORA_DISK_1: starting piece 1 at 13-APR-05

channel ORA_DISK_1: finished piece 1 at 13-APR-05

piece handle=/msflsh/MMSDB/backupset/2005_04_13/o1_mf_annnn_TAG20050413T101239_15s00ry0_.bkp

comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

channel ORA_DISK_1: deleting archive log(s)

archive log filename=/msflsh/MMSDB/archivelog/2005_04_13/o1_mf_1_28_15s00pg2_.arc recid=2

stamp=555502358

Finished backup at 13-APR-05

Starting backup at 13-APR-05

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=+DATADG/mmsdb/datafile/system.259.3

input datafile fno=00003 name=+DATADG/mmsdb/datafile/sysaux.257.3

input datafile fno=00002 name=+DATADG/mmsdb/datafile/undotbs1.258.3

input datafile fno=00004 name=+DATADG/mmsdb/datafile/users.256.3

channel ORA_DISK_1: starting piece 1 at 13-APR-05

channel ORA_DISK_1: finished piece 1 at 13-APR-05

piece handle=/msflsh/MMSDB/backupset/2005_04_13/o1_mf_nnndf_TAG20050413T101242_15s00thq_.bkp

comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

Finished backup at 13-APR-05

Starting backup at 13-APR-05

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archive log backupset

channel ORA_DISK_1: specifying archive log(s) in backup set

input archive log thread=1 sequence=29 recid=3 stamp=555502377

channel ORA_DISK_1: starting piece 1 at 13-APR-05

channel ORA_DISK_1: finished piece 1 at 13-APR-05

piece handle=/msflsh/MMSDB/backupset/2005_04_13/o1_mf_annnn_TAG20050413T101257_15s01bwm_.bkp

comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

channel ORA_DISK_1: deleting archive log(s)

archive log filename=/msflsh/MMSDB/archivelog/2005_04_13/o1_mf_1_29_15s019mj_.arc recid=3

stamp=555502377

Finished backup at 13-APR-05

Starting Control File and SPFILE Autobackup at 13-APR-05

piece handle=/msflsh/MMSDB/autobackup/2005_04_13/o1_mf_s_555502380_15s01df2_.bkp

comment=NONE

Finished Control File and SPFILE Autobackup at 13-APR-05

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 2

using channel ORA_DISK_1

no obsolete backups found

Recovery Manager complete.

2.冻结HA,停止数据库进行恢复

$ id

uid=101(oracle) gid=101(dba)

$ exit

# id

uid=0(root) gid=1(other)

# hagrp -freeze MMSDB -persistent

# su - oracle

Sun Microsystems Inc.

SunOS 5.8

Generic Patch

October 2001

You have new mail.

$ id

uid=101(oracle) gid=101(dba)

$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.3.0 - Production on Wed Apr 13 10:19:28 2005

Copyright (c) 1982, 2004, Oracle.

All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production

With the Partitioning and Data Mining options

SQL shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production

With the Partitioning and Data Mining options

3.执行恢复

$ rman target /

Recovery Manager: Release 10.1.0.3.0 - 64bit Production

Copyright (c) 1995, 2004, Oracle.

All rights reserved.

connected to target database (not started)

RMAN startup mount;

Oracle instance started

database mounted

Total System Global Area

3204448256 bytes

Fixed Size

1304912 bytes

Variable Size

651957936 bytes

Database Buffers

2550136832 bytes

Redo Buffers

1048576 bytes

RMAN restore database;

Starting restore at 13-APR-05

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=160 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to +DATADG/mmsdb/datafile/system.259.3

restoring datafile 00002 to +DATADG/mmsdb/datafile/undotbs1.258.3

restoring datafile 00003 to +DATADG/mmsdb/datafile/sysaux.257.3

restoring datafile 00004 to +DATADG/mmsdb/datafile/users.256.3

channel ORA_DISK_1: restored backup piece 1

piece handle=/msflsh/MMSDB/backupset/2005_04_13/o1_mf_nnndf_TAG20050413T101242_15s00thq_.bkp

tag=TAG20050413T101242

channel ORA_DISK_1: restore complete

Finished restore at 13-APR-05

RMAN recover database;

Starting recover at 13-APR-05

using channel ORA_DISK_1

starting media recovery

media recovery complete

Finished recover at 13-APR-05

RMAN alter database open;

database opened

RMAN

4.最后不要忘记解冻HA

$ exit

# id

uid=0(root) gid=1(other)

# hagrp -unfreeze MMSDB -persistent

测试过程,仅供参考.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有