052(三十二)

156、

156.Your test database is configured to run in NOARCHIVELOG mode. One of the data files in the USERS tablespace is lost due to a media failure. 
You notice that all the online redo logs have been overwritten since the last backup.
What would you do to recover the data file?
A. Take the USERS tablespace offline and re-create the lost data file 
B. Shutdown the instance, restore the data file from the last consistent backup and restart the database instance 
C. Shutdown the instance, restores all the database files from the last consistent backup and restart the database instance 
D. Take the USERS tablespace offline, restore all the data files of the USERS tablespace from the last consistent backup and make the tablespace online
Answer: C

非归档模式下,只能恢复到上一次备份,数据库会丢失数据

归档模式下可以恢复该数据文件,需要有备份、归档日志。
View Code

157、

157.Examine the command: 
SQL>DBMS_STATS.SET_TABLE_PREFS('SH','CUSTOMERS','PUBLISH','false'); 
Which statement describes the effect of the above command? 
A. Automatic statistics collection is stopped for the CUSTOMERS table
B. Statistics for the CUSTOMERS table are locked and cannot be overwritten 
C. Existing statistics for the CUSTOMERS table become unusable for the query optimizer 
D. Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics
Answer: D

从11g开始,表与索引的统计信息收集完毕后,可以选择收集的统信息立即发布,也可以选择使新收集的统计信息处于pending状态,待确定处于pending状态的统计信息是安全的,再使处于pending状态的统计信息发布,这样就会避免一些因为收集统计信息立即发布而导致SQL执行计划走错的灾难。
SQL> Select dbms_stats.get_prefs('PUBLISH') publish from dual;

PUBLISH
--------------------------------------------------------------------------------
TRUE
dbms_stats的get_prefs函数返回true,表示对象的统计信息收集后立即生效,如果返回flase,收集的统计信息将处于pending状态。
View Code

158、

158.The database instance has the following parameter setting: 
OS_AUTHENT_PREFIX = OPS$ 
OS_ROLES = FALSE 
REMOTE_OS_AUTHENT = FALSE 
REMOTE_OS_ROLES = FALSE
TIMED_OS_STATISTICS = 0
You have a local operating system user SKD. You create a database user OPS$SKD, and then assign
external authentication. The user OPS$SKD has the CREATE SESSION privilege.
What would you achieve by the above process?
A. The database user OPS$SKD will be able to administer the database. 
B. The authentication detail for the database user OPS$SKD is recorded in the password file. 
C. The local operating system user SKD will be able to access the database instance without specifying the username and password. 
D. The database user OPS$SKD has to login with the password of the local operating system user SKD to access the database instance. 
Answer: C

os_authent_prefix
通过操作系统用户认证的方式来直接访问Oracle数据库,简单来说,如果配置了该参数例如为'czm$',当数据库中存在用户'czm$hr',且对该用户启用了外部验证。那么在操作系统上以hr用户登录成功后,就可以直接sqlplus /以czm$hr用户登陆到Oracle数据库,无需sqlplus username/password输入访问Oracle数据库的用户名和密码。
View Code

159、

159.Your database instance is running with full workload after database creation. You have decided to use 
a fixedsize undo tablespace. You want to use the undo Advisor to estimate the capacity of the undo tablespace. 
Which two factors must you consider before using the Undo Advisor to estimate the capacity of the undo tablespace? (Choose two.) 
A. The retention period to support flashback 
B. The expected length of the longest-running query 
C. The number of undo tablespaces in the database 
D. The size of the Flash Recovery Area for the database instance 
Answer: AB

参考Administrator's Guide
'
Sizing a Fixed-Size Undo Tablespace

To use the Undo Advisor, you first estimate these two values:
The length of your expected longest running query
The longest interval that you will require for Oracle Flashback operations
View Code

160、

160.The instance abnormally terminates because of a power outage. 
Which statement is true about redo log files during instance recovery? 
A. Inactive and current redo log files are required to accomplish recovery 
B. Online and archived redo files are required to accomplish instance recovery 
C. All redo log entries after the last checkpoint are applied from redo log files to data files 
D. All redo log entries recorded in the current log file until the checkpoint position are applied to data files
Answer: C

实例恢复所需要的日志文件称之为活动(active)重做日志文件,其他日志文件称之为非活动重做日志文件

LGWR进程在任意时候仅把信息写入到一个重做日志日志文件组,其正在进行写的那个日志文件就称之为当前日志文件(current redo log file)。

检查点后台进程(checkpoint background process, 简称CKPT)控制实例恢复所需要的时间量。执行一个检查点时,CKPT会更新数据文件的头部和控制文件,记录一个系统更改号(System change number)SCN来反映上一个成功的事务。
View Code
原文地址:https://www.cnblogs.com/huanhuanang/p/5363735.html