12c OCP題庫解析060-3 SYSAUX表空間所含元件的的管理方法

Hoegh發表於2016-05-13

Which two statements are true about the use of the procedures listed in the v$sysaux_occupants.move_procedure column?

A.The procedure maybe used for some component store locate component data to the SYSAUX tablespace from its current tablespace. 

B. The procedure may be used for some component store locate component data from the SYSAUX tablespace to another tablespace. 

C. All the components may be moved into SYSAUX tablespace.

D. All the components may be moved from the SYSAUX tablespace.


【考點分析】

考察了SYSAUX表空間所含元件的的管理方法


【原理概念】

當資料庫建立時,SYSAUX表空間被作為SYSTEM的輔助表空間安裝。已經安裝並使用獨立表空間的資料庫元件都可以放在SYSAUX表空間中。如果SYSAUX表空間不可用,資料庫核心功能仍然運轉。使用SYSAUX表空間的特性將會失敗或功能可用性會受到限制。

監控SYSAUX表空間中的內容可以使用V$SYSAUX_OCCUPANTS檢視,檢視列出瞭如下的內容

  • 佔用的名稱
  • 佔用的描述
  • 方案名
  • 移動儲存過程
  • 移動儲存過程的描述
  • 當前空間使用

在元件安裝時,也可以選擇不放在SYSAUX 表空間中。如果決定把元件從SYSAUX表空間移動指定的表空間中,可以使用在V$SYSAUX_OCCUPANTS 檢視中移動元件的儲存過程來進行。反之,用於移動儲存過程也可以把元件從其他表空間移動到SYSAUX表空間中。

再次,附上官方文件的解釋:

Moving Occupants Out Of or into the SYSAUX Tablespace

You will have an option at component install time to specify that you do not want the component to reside in SYSAUX. Also, if you later decide that the component should be relocated to a designated tablespace, you can use the move procedure for that component, as specified in the V$SYSAUX_OCCUPANTS view, to perform the move.

The move procedure also lets you move a component from another tablespace into the SYSAUX tablespace.


【實驗參考】

1.檢視V$SYSAUX_OCCUPANTS 檢視的結構

SQL> 

SQL> select banner from v$version;


BANNER

--------------------------------------------------------------------------------

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

PL/SQL Release 12.1.0.2.0 - Production

CORE 12.1.0.2.0 Production

TNS for Linux: Version 12.1.0.2.0 - Production

NLSRTL Version 12.1.0.2.0 - Production


SQL> 

SQL> 

SQL> desc v$sysaux_occupants

 Name   Null?    Type

 ----------------------------------------- -------- ----------------------------

 OCCUPANT_NAME     VARCHAR2(64)

 OCCUPANT_DESC     VARCHAR2(64)

 SCHEMA_NAME     VARCHAR2(64)

 MOVE_PROCEDURE     VARCHAR2(64)

 MOVE_PROCEDURE_DESC     VARCHAR2(64)

 SPACE_USAGE_KBYTES     NUMBER

 CON_ID     NUMBER


2.檢視V$SYSAUX_OCCUPANTS 檢視的內容,可以看到有些元件沒有move_procedure

SQL> set linesize 100

SQL> set pagesize 100

SQL> col OCCUPANT_NAME for a30

SQL> col MOVE_PROCEDURE for a50

SQL> select OCCUPANT_NAME,MOVE_PROCEDURE from v$sysaux_occupants;


OCCUPANT_NAME       MOVE_PROCEDURE

------------------------------ --------------------------------------------------

LOGMNR       SYS.DBMS_LOGMNR_D.SET_TABLESPACE

LOGSTDBY       SYS.DBMS_LOGSTDBY.SET_TABLESPACE

SMON_SCN_TIME

AUDSYS

PL/SCOPE

STREAMS

AUDIT_TABLES       DBMS_AUDIT_MGMT.move_dbaudit_tables

XDB       XDB.DBMS_XDB.MOVEXDB_TABLESPACE

AO       DBMS_AW.MOVE_AWMETA

XSOQHIST       DBMS_XSOQ.OlapiMoveProc

XSAMD       DBMS_AMD.Move_OLAP_Catalog

SM/AWR

SM/ADVISOR

SM/OPTSTAT

SM/OTHER

STATSPACK

SDO       MDSYS.MOVE_SDO

WM       DBMS_WM.move_proc

ORDIM       ordsys.ord_admin.move_ordim_tblspc

ORDIM/ORDDATA       ordsys.ord_admin.move_ordim_tblspc

ORDIM/ORDPLUGINS       ordsys.ord_admin.move_ordim_tblspc

ORDIM/SI_INFORMTN_SCHEMA       ordsys.ord_admin.move_ordim_tblspc

EM       emd_maintenance.move_em_tblspc

TEXT       DRI_MOVE_CTXSYS

ULTRASEARCH       MOVE_WK

ULTRASEARCH_DEMO_USER       MOVE_WK

EXPRESSION_FILTER

EM_MONITORING_USER

TSM

SQL_MANAGEMENT_BASE

AUTO_TASK

JOB_SCHEDULER


32 rows selected.


SQL>

3.以AUDIT_TABLES為例,我們使用move_procedure將審計功能移動到其他表空間

SQL> 

SQL> create tablespace hoegh datafile '/u01/app/oracle/oradata/HOEGH/hoegh01.dbf' 

  2  size 30m autoextend on;


Tablespace created.


SQL> 

SQL> exec DBMS_AUDIT_MGMT.move_dbaudit_tables('HOEGH');


PL/SQL procedure successfully completed.


SQL> 

4.開啟審計功能,然後檢視審計表所在表空間

SQL> audit select table;


Audit succeeded.


SQL> 

SQL> select segment_name,segment_type from dba_segments where TABLESPACE_NAME='HOEGH'

  2  and segment_type='TABLE';


SEGMENT_NAME

----------------------------------------------------------------------------------------------------

SEGMENT_TYPE

------------------

FGA_LOG$

TABLE


AUD$

TABLE



SQL> 

可以看到審計記錄的表已經在HOEGH表空間。


【答案剖析】

A,如果決定把元件從指定的表空間移動到SYSAUX表空間中,可以使用在V$SYSAUX_OCCUPANTS 檢視中移動元件的儲存過程來進行,所以A正確

B,如果決定把元件從SYSAUX表空間移動到指定的表空間中,可以使用在V$SYSAUX_OCCUPANTS 檢視中移動元件的儲存過程來進行,所以B正確

C,有些元件沒有move_procedure,所以C錯誤

D,理由同C



答案 A


                                                                                                                                                                                            ~~~~~~~ the end~~~~~~~~~

                                                                                                                                                                                                               hoegh
                                                                                                                                                                                                           2016.05.13


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30162081/viewspace-2099011/,如需轉載,請註明出處,否則將追究法律責任。

相關文章