zoukankan      html  css  js  c++  java
  • 053(四)

    16、

    16.Because of a logical corruption in your production database, you wanted to perform Tablespace Point in Time Recovery (TSPITR). 
    But before you start the recovery, you queried the TS_PITR_OBJECTS_TO_BE_DROPPED view and realized that there are a large number of objects that would be dropped when you start the recovery by using this method. You want to preserve these objects. 
    Which option must you use to perform TSPITR and preserve the object?
    A. Perform Export before TSPITR and Import after TSPITR
    B. Move objects to another schema that has the same tablespace assigned
    C. Perform Incomplete Recovery before TSPITR with the Log Sequence Number (LSN)
    D. Perform Incomplete Recovery before TSPITR with the System Change Number (SCN)
    Answer: A
    
    参考:Backup and Recovery User's Guide
    '
    
    When you perform RMAN TSPITR on a tablespace, objects created after the target recovery time are lost. 
    You can preserve such objects after they are identified by exporting them before TSPITR with the Data Pump Export utility and reimporting them afterward with Data Pump Import.
    
    To determine which objects are lost in TSPITR, query the TS_PITR_OBJECTS_TO_BE_DROPPED view on the primary database.
    View Code

    17、

    17.The INV_HISTORY table is created using the command:
    SQL>CREATE TABLE INV_HISTORY (inv_no NUMBER(3), inv_date DATE, inv_amt NUMBER(10,2)) 
    partition by range (inv_date) interval
    (numtoyminterval(1,'month')) 
    (
    partition p0
    values less than (to_date('01-01-2005','dd-mm-yyyy')),
    partition p1 values less than (to_date('01-01-2006','dd-mm-yyyy'))
    ); The following data has been inserted
    into the INV_HISTORY table : INV_NO INV_DATE INV_AMT
    1 30-dec-2004 1000
    2 30-dec-2005 2000
    3 1-feb-2006 3000
    4 1-mar-2006 4000
    5 1-apr-2006 5000 You would like to store the data belonging to the year 2006 in a single partition and issue the command: SQL> ALTER TABLE inv_history MERGE PARTITIONS FOR(TO_DATE('15-feb-2006','dd-mon-yyyy')), FOR(TO_DATE('15-apr-2006')) INTO PARTITION sys_py; What would be the outcome of this command? A. It executes successfully, and the transition point is set to '1-apr-2006'. B. It executes successfully, and the transition point is set to '15-apr-2006'. C. It produces an error because the partitions specified for merging are not adjacent. D. It produces an error because the date values specified in the merge do not match the date values stored in the table.
    Answer: C
    
    测试:
    insert into edu.INV_HISTORY values (1,to_date('30-12-2004','dd-mm-yyyy'),1000);
    insert into edu.INV_HISTORY values (2,to_date('30-12-2005','dd-mm-yyyy'),2000);
    insert into edu.INV_HISTORY values (3,to_date('01-02-2006','dd-mm-yyyy'),3000);
    insert into edu.INV_HISTORY values (4,to_date('01-03-2006','dd-mm-yyyy'),4000);
    insert into edu.INV_HISTORY values (5,to_date('01-04-2006','dd-mm-yyyy'),5000);
    
    --写完数据:
    CREATE TABLE EDU.INV_HISTORY
    (
        INV_NO   NUMBER(3)        NULL,
        INV_DATE DATE             NULL,
        INV_AMT  NUMBER(10,2)     NULL
    )
    TABLESPACE USERS
    PCTFREE 10
    PCTUSED 0
    INITRANS 1
    MAXTRANS 255
    STORAGE(BUFFER_POOL DEFAULT)
    NOPARALLEL
    NOCACHE
    PARTITION BY RANGE(INV_DATE)
    (PARTITION P0 VALUES LESS THAN (TO_DATE(' 2005-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING,
     PARTITION P1 VALUES LESS THAN (TO_DATE(' 2006-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING,
     PARTITION SYS_P61 VALUES LESS THAN (TO_DATE(' 2006-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING,
     PARTITION SYS_P62 VALUES LESS THAN (TO_DATE(' 2006-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING,
     PARTITION SYS_P63 VALUES LESS THAN (TO_DATE(' 2006-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING)
    /
    
    
    
    ALTER TABLE edu.inv_history MERGE PARTITIONS
    FOR(TO_DATE('15-02-2006','dd-mm-yyyy')), FOR(TO_DATE('15-04-2006','dd-mm-yyyy')) INTO PARTITION sys_py;
    
    
    
    1    1    1    ORA-14274: 要合并的分区不相邻
    View Code

    18、

    18.You create a new Automatic Database Diagnostic Monitor (ADDM) task:
    instance_analysis_mode_task. To view the ADDM report, you use the following command:
    SQL> SELECT dbms_addm.get_report('my_instance_analysis_mode_task') FROM dual;
    You want to suppress ADDM output relating to Segment Advisor actions on user SCOTT's segments. 
    What would you do to achieve this?
    A. Add a finding directive for the ADDM task.
    B. Add a segment directive for the ADDM task.
    C. Add a parameter directive for the ADDM task.
    D. Disable the Segment Advisor from the Automatic Maintenance Task.
    Answer: B
    View Code

    19、

    19.A PL/SQL procedure queries only those columns of a redefined table that were unchanged by the 
    online table redefinition. What happens to the PL/SQL procedure after the online table redefinition?
    A. It remains valid.
    B. It becomes invalid for all options of online table redefinition but automatically gets revalidated the next time it is used.
    C. It becomes invalid for all options of online table redefinition and is automatically recompiled during online redefinition of the table.
    D. It becomes invalid only if the storage parameters have been modified and it automatically gets revalidated the next time it is used.
    Answer: A
    
    在线重定义
    View Code

    20、View the Exhibit and examine the resource consumption details for the current plan in use by the database instance.

    Which two statements are true based on the output? (Choose two.)
    Exhibit:

    A. An attempt to start a new session by the user belonging to DSS_QUERIES fails with an error
    B. A user belonging to DSS_QUERIES can log in to a new session but the session will be queued
    C. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to resource management
    D. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to resource management, I/O waits, and latch or enqueue contention
    Answer: BC
    
    参考:Reference 
    V$RSRC_CONSUMER_GROUP
    
    ACTIVE_SESSIONS
    Number of currently active sessions in the consumer group
    
    QUEUE_LENGTH
    Number of sessions waiting in the queue
    
    CPU_WAIT_TIME
    Cumulative amount of time that sessions waited for CPU because of resource management. 
    This does not include waits due to latch or enqueue contention, I/O waits, and so on.c
    View Code
  • 相关阅读:
    PHP-循环结构-数组
    PHP-数据类型-运算符
    数据库-mysql语句-查-WEB服务器
    数据库-mysql语句-查
    数据库-SQL语句:删除和修改语句-列类型-列约束
    软件工程-生命周期
    网络电视精灵
    小型资源管理器
    动态生成控件 并设置只能输入数字 和小数点
    C#七大原则
  • 原文地址:https://www.cnblogs.com/huanhuanang/p/5377037.html
Copyright © 2011-2022 走看看