OCP-1Z0-053-V12.02-190题

190.You have control-file autobackups enabled. When starting your database from SQL*Plus, you receive

the following error message:

SQL> startup ORA-01078: failure in processing system parameters LRM-00109:

could not open parameter file ,,

C:ORACLEPRODUCT11.1.0DB_1DATABASEINITORCL.ORA Using RMAN,

how would you respond to this error?

A. Issue the startup nomount command and then issue the restore parameter file command from the

RMAN prompt.

B. Issue the startup nomount command and then issue the restore spfile command from the RMAN

prompt.

C. Issue the startup nomount command and then issue the restore spfile from autobackup command from

the RMAN prompt.

D. Issue the startup nomount command and then issue the restore spfile from backup command from the

RMAN prompt.

E. Issue the restore spfile from autobackup command from the RMAN prompt.

Answer: C
答案解析:
  • 恢复丢失的服务器参数文件
使用FROM MEMORY子句可以创建系统范围内的当前参数设置。
SQL> CREATE PFILE[= 'pfile_name' ] FROM{ { SPFILE [= 'spfile_name'] } | MEMORY} ;
SQL> CREATE SPFILE[= 'spfile_name' ] FROM{ { PFILE [= 'pfile_name' ] } | MEMORY } ;
恢复丢失的服务器参数文件
恢复服务器参数文件的最简单方法是使用FROM MEMORY子句,该子句可以使用系统范围内的当前参数设置来创建文本初始化参数文件(PFILE) 或服务器参数文件(SPFILE)。
在RAC 环境中,所创建的文件包含来自每个实例的参数设置。
在实例启动期间,所有参数设置均记录到alert.log文件中。在Oracle Database 11g中,alert.log参数转储文本是使用有效的参数语法编写的。这便于对参数进行剪切,并将其粘贴到单独的文件中,从而用作后续实例的PFILE
在实例启动时,PFILE 或SPFILE 的名称被写入到alert.log。使用未知的客户机PFILE 时,预警日志也会对此加以提示。
要支持其它功能,必须将COMPATIBLE初始化参数设置为11.0.0.0 或更高。
  • 从控制文件自动备份还原服务器参数文件
RMAN> STARTUP FORCE NOMOUNT;
RMAN> RESTORE SPFILE FROM AUTOBACKUP;
RMAN> STARTUP FORCE;
从控制文件自动备份还原服务器参数文件
如果服务器参数文件已丢失,并且无法使用FROM MEMORY子句,可以从自动备份来还原该文件。这个过程类似于从自动备份中还原控制文件。
如果自动备份没有位于快速恢复区中,先为你的数据库设置DBID。发出RESTORE SPFILE FROM AUTOBACKUP命令。
如果要将SPFILE 还原到非默认位置,请按以下方式指定命令:
RESTORE SPFILE TO <file_name> FROM AUTOBACKUP
如果要从快速恢复区还原服务器参数文件,请按以下方式指定命令:
RMAN> run {
2> restore spfile from autobackup
3> recovery area = '<flash recovery area destination>'
4> db_name = '<db_name>';
5> }
原文地址:https://www.cnblogs.com/hzcya1995/p/13317082.html