• OCP test 疑惑


     053

    27.Examine the following scenario: 

    - Database is running in ARCHIVELOG mode.
    - Complete consistent backup is taken every Sunday.
    - On Tuesday the instance terminates abnormally because the disk on which control files are located gets
    corrupted
    - The disk having active online redo log files is also corrupted.
    - The hardware is repaired and the paths for online redo log files and control files are still valid.
    Which option would you use to perform the recovery of database till the point of failure?
    A.Restore the latest whole backup, perform complete recovery, and open the database normally
    B.Restore the latest whole backup, perform incomplete recovery, and open the database with the
    RESETLOGS option.
    C.Restore the latest backups control file, perform complete recovery, and open the database with the
    RESETLOGS option.
    D.Restore the latest backup control file, perform incomplete recovery using backup control file, and open
    the database with the RESETLOG option.
    Answer: D

    硬件修复好了之后,使用最新的控制文件restore(应该是上周日的),之后的recovery是通过rodo log吗?

    SQL> ALTER TABLESPACE users BEGIN BACKUP;
    While copying the file to the backup destination a power outage caused the instance to terminate
    abnormally.
    Which statement is true about the next database startup and the USERS tablespace?
    A.The database will open, and the tablespace automatically comes out of the backup mode.
    B.The database will be mounted, and recovery must be performed on the USERS tablespace.
    C.The database will be mounted, and data files in the USERS tablespace must be taken out of the backup
    mode.
    D.The database will not be mounted, and you must restore all the data files for the USERS tablespace
    from the backup, and perform recovery.
    Answer: C

    疑问:表空间的数据文件怎么out of backup mode,不是表空间吗

    34.You want to use the automatic management of backup and recovery operations features for your
    database.
    Which configuration must you set?
    A.Enable the flash recovery area and specify it as the archived redo log destination.
    B.Disable the flash recovery area and start the database instance in ARCHIVELOG mode.
    C.Enable the flash recovery area but do not specify it as the archived redo log destination.
    D.Disable the flash recovery area and start the database instance in NOARCHIVELOG mode.
    Answer: A

    自动备份不是要写脚本那种,定时的吗?

    36.Before a Flashback Table operation, you execute the following command:
    ALTER TABLE employees ENABLE ROW MOVEMENT;
    Why would you need this to be executed?
    A.Because row IDs may change during the flashback operation
    B.Because the object number changes after the flashback operation
    C.Because the rows are retrieved from the recycle bin during the flashback operation
    D.Because the table is moved forward and back to a temporary during the flashback operation
    Answer: A

    37.The EMP table has some discrepancy in data entry with a particular employee ID. You execute the
    query as shown in the Exhibit to retrieve all versions of the row that exist between two SCNs.
    View the Exhibit.
    Which two statements about the results of the query shown in the Exhibit are correct? (Choose two.)
    Exhibit:

    A.The LAST_SCN value in the first row is NULL, which means that the versions of the row still exist at
    SCN 6636300.
    B.The LAST_SCN value in the second row in NULL, which means that the version of the row still exists at
    SCN 6636300.
    C.The LAST_SCN value in the third row is 6636280, which means that the version of row exists above
    SCN 6636280.
    D.The LAST_SCN value in the second row is NULL, which means that the version of the row no longer
    exists because it was deleted.
    Answer: AD

    以下学习rman的备份保留

    132.You issue the following RMAN command to set a retention policy on a database:
    RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    What will be the outcome of issuing this command?
    A.After two days, a backup will be marked obsolete
    B.After two days, a backup will be deleted from the media
    C.If the RMAN repository has records of two or more recent backups of a file, then older backups will be
    deleted from the media.
    D.If the RMAN repository has records of two or more recent backups of a file, then older backups will be
    marked obsolete.
    Answer: D

    135.You have enabled backup optimization in RMAN. You issue the following RMAN command to
    configure a redundancy-based retention policy:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    Which statement is true?
    A.The command fails because you cannot configure a redundancy-based retention policy when backup
    optimization is enabled
    B.Backup optimization is performed, but RMAN considers the redundancy-based retention policy when it
    determines which datafiles should be backed up
    C.Backup optimization is permanently disabled
    D.Backup optimization is temporarily disabled because a redundancy-based retention policy is specified
    Answer: B

    136.You issue the following command on the RMAN prompt.
    REPORT NEED BACKUP DAYS 5;
    Which statement is true about executing this command?
    A.It will display a list of files that need incremental backup
    B.It will display a list of files that need backup after five days
    C.It will display a list of files that were backed up in the last five days
    D.It will display a list of files that have not been backed up in the last five days
    E.It will apply the current retention policy to determine the files that need to be backed up
    Answer: D

    关于sga和pga

    139.You specify a nonzero value for the MEMORY_TARGET initialization parameter, but do not set the
    PGA_AGGREGATE_TARGET or the SGA_TARGET parameters. You restart your database instance.
    Which statement about the result is true?
    A.The database instance starts, and Oracle sets the default value of SGA_TARGET to the same value as
    SGA_MAX_SIZE.
    B.The database instance starts, and Oracle automatically tunes memory and allocates 60 percent to the
    SGA and 40 percent to the PGA.
    C.The database instance starts, but Automatic Memory Management is disabled.
    D.The database instance will not start because you did not specify the PGA_AGGREGATE_TARGET or
    SGA_TARGET parameter.
    Answer: B

    这个留着做实验

    142.Your database is in ARCHIVELOG mode. You have two online redo log groups, each of which
    contains one redo member. When you attempt to start the database, you receive the following errors:
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: 'D:\REDO01.LOG'
    You discover that the online redo log file of the current redo group is corrupted.
    Which statement should you use to resolve this issue?
    A.ALTER DATABASE DROP LOGFILE GROUP 1;
    B.ALTER DATABASE CLEAR LOGFILE GROUP 1;
    C.ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;
    D.ALTER DATABASE DROP LOGFILE MEMBER 'D:\REDO01.LOG';
    Answer: C

     oracle如何创建外键 --参考百度知道

    --使用表级约束
    CREATE TABLE table_name
    (column_1 datatype ,
    column_2 datatype ,
    ...
    CONSTRAINT fk_column
    FOREIGN KEY (column_1, column_i, ... column_n)
    REFERENCES parent_table (column_1, column_i, ... column_n)
    );


    D. CREATE TABLE student_grades
    (student_id NUMBER(12),
    semester_end DATE,
    gpa NUMBER(4,3),
    CONSTRAINT student_id_fk FOREIGN KEY (student_id)
    REFERENCES students(student_id));

    --使用列级约束
    CREATE TABLE table_name
    (column_1 datatype ,
    column_2 datatype CONSTRAINT fk_column REFERENCES parent_table (column_name),
    ...
    );

    B. CREATE TABLE EMP
    (empno NUMBER(4),
    ename VARCHAR2(35),
    deptno NUMBER(7,2)
    CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

    ps:什么是列级约束,什么是表级约束,哪些约束只能作为列级约束,什么情况必须使用表级
    1、列级约束即字段级约束,用于限制字段取值范围,常通过字段有效性规则来实现,比如:性别只能是男或女。
    2、表级约束及字段间约束,用于限制两个字段间的取值约束,比如:入学日期大于出生日期。

    列级约束,直接在字段后面定义约束类型;

    表级约束的位置相当于一个字段,前面有逗号。如果唯一性约束涉及到多个字段,则只能定义成表级的,只涉及一个字段的话定义成字段级和表级没有区别。

  • 相关阅读:
    JS中的this
    函数作用域
    全局作用域与变量的声明提前
    立即执行函数与For. . .in语句
    实参可以是任何值
    函数的参数和返回值
    JavaScript创建函数的三种方式
    JavaScript属性名和属性值
    十进制浮点数转换为二进制
    冰雹猜想或角谷定理
  • 原文地址:https://www.cnblogs.com/sumsen/p/2952811.html
Copyright © 2020-2023  润新知