学习Mechanics of Datafile Restore Operations的注意点

本文介绍了使用RMAN进行数据文件恢复的操作要点,包括如何指定新的文件位置、创建数据文件副本以及更新控制文件中的文件名等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

学习Mechanics of Datafile Restore Operations的注意点

When you issue a RESTORE command, RMAN directs a server session to restore a suitable backup to either:

 

The default location, overwriting the files with the same name currently there

 

A new location, which you can specify with the SET NEWNAME command

 

To restore a datafile, either mount the database, or keep it open and take the datafile to be restored offline. When RMAN performs a restore, it creates the restored files as datafile image copies and records them in the repository.

 

The following table describes the behavior of the RESTORE, SET NEWNAME, and SWITCH commands.

Run SET NEWNAME?

RESTORE Behavior

Run SWITCH?

No

RMAN restores the files to their current path names.

N/A

Yes

RMAN restores the files to the path names specified by SET NEWNAME and creates repository records for each datafile copy after the restore.

If yes, then RMAN replaces the current datafile names in the control file to the names of the restored files and current datafile names (if exists) are stored as datafile copies. If no, then RMAN doesn't update current datafile names and the restored file is retained as datafile copies.

 

 

For example, if you restore datafile ?/oradata/trgt/tools01.dbf to its default location, then RMAN restores the file ?/oradata/trgt/tools01.dbf and overwrites any file that it finds with the same filename. If you run a SET NEWNAME command before you restore a file, then RMAN creates a datafile copy with the name that you specify. For example, assume that you run the following commands:

RUN {

    SET NEWNAME FOR DATAFILE '/opt/oracle/oradata/ge02/users01.dbf' TO '/test/users01.dbf';

    RESTORE DATAFILE '/opt/oracle/oradata/ge02/users01.dbf';

}


In this case, RMAN creates a datafile copy of ?/oradata/trgt/tools01.dbf named /tmp/tools01.dbf and records it in the repository. To update the control file to use the datafile copy at ?/oradata/trgt/tools01.dbf to /tmp/tools01.dbf as the datafile, use the SWITCH command as shown in the following example:

 

SWITCH DATAFILE 5 TO COPY;

或者

SWITCH DATAFILE '/opt/oracle/oradata/ge02/users01.dbf' TO COPY;

 

The SWITCH command is the RMAN equivalent of the SQL statement ALTER DATABASE RENAME FILE.

 

注意红色的部分,只有这样写才正确,如果象下面的写法,则会报错:

 

RMAN> SWITCH DATAFILE '/opt/oracle/oradata/ge02/users01.dbf' TO COPY   '/test/users01.dbf' ;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "single-quoted-string": expecting one of: ";"

RMAN-01007: at line 1 column 66 file: standard input

 

RMAN> SWITCH DATAFILE 5 TO COPY   '/test/users01.dbf' ;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "single-quoted-string": expecting one of: ";"

RMAN-01007: at line 1 column 29 file: standard input

 

如果是上面红色的写法,则步会报错:

RMAN> SWITCH DATAFILE 5 TO COPY;

datafile 5 switched to datafile copy "/test/users01.dbf"

starting full resync of recovery catalog

full resync complete

 

RMAN> SWITCH DATAFILE '/opt/oracle/oradata/ge02/users01.dbf'  TO COPY;

datafile 5 switched to datafile copy "/test/users01.dbf"

starting full resync of recovery catalog

full resync complete

### 回答1: 《Mechanics of Materials,9th Edition》是一套较为经典的工程力学教材,由James M. Gere和Barry J. Goodno编写。该教材着重探讨物理材料的力学性能、受力分析、固体材料破坏和变形、材料强度设计等内容,广泛应用于一些重要的工程领域,如建筑、航空航天、机械制造等行业。 这本教材注重理论与实践相结合的教学方式,本着“原理简明明了、重突出、主次分明、逻辑清晰”的原则,将强度学分为两部分,即应力分析和应变分析,而后将两者有机地结合起来,形成完整的强度学内容。此外,该教材在讲解力学原理的同时,注重举例以及提供解题思路,便于学生理解和掌握相关知识。还采用了大量的插图、公式和表格来说明问题,便于学生的记忆和应用。 总之,《Mechanics of Materials,9th Edition》是一本综合性较强、条理清晰、涵盖面广的经典力学教材,适用于学习工程力学相关专业的学生和从事力学研究的工程技术人员参考使用。 ### 回答2: 《Mechanics of Materials》是一本关于材料力学的经典教材,已经出版了9个版本。该教材是一本理论与实践相结合的教材,涉及了静力学、弹性力学、塑性力学、疲劳分析等内容。该书非常适合工程和科学专业的学生学习,特别是学习土木工程、机械工程、材料科学和航空航天工程等领域的学生。 该书的第九版包括了新的章节和新的例题,提供了更全面、更深入的知识内容。该教材采用了直观、易于理解的语言,并通过各种具体的例子和问题来帮助学生理解材料力学的基本原理。此外,该书配有大量的图片和图表,以帮助学生更好地理解材料的行为和性质。 总的来说, 《Mechanics of Materials》是一本非常优秀的材料力学教材,已经成为很多学校和工程公司的教和学习参考资料。它探究了材料的强度和变形行为,为学生提供了必要的工程实践技能,帮助他们设计和分析多种工程结构。 ### 回答3: 《力学的材料,第9版PDF》是一本力学方面的权威教材,由作者Russell C. Hibbeler编写,针对工程力学中的材料力学领域进行详细讲解,主要针对力学和结构力学专业的学生学习。该教材内容涵盖了重要的材料力学知识,包括应力、应变、弹性模数、剪切模数、蠕变、断裂、裂纹扩展、变形和材料失效等方面。 教材主要分为13章,涵盖了静态力学、变形、应力和应变、轴向载荷、剪切力和剪切力矩、梁和弯曲、变形和变形率、弹性材料之塑性及应变硬化、合成拟部分元件、剪力中心和轴向转矩、应力和变形、断裂力学,以及可塑性和成形极限等。 这本教材主要特是具有良好的逻辑性和系统性,注重理论与实践相结合,能够很好地帮助学生掌握结构分析和材料力学的基本理论和应用技能,培养学生的分析和解决问题的能力,符合全球大学力学课程的要求,已成为许多高校力学课程的教学参考书。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值