ocp 1Z0-043 1-60題解析

1.You observe that a database performance has degraded over
a period of time. While investigating the reason, you find the size of
the database buffer cache is not large enough to cache all the needed data
blocks. Which advisory component wold you refer to, in order to determine
that required size of the database buffer cache?
A. Memory Advisor
B. Segment Advisor
C. SQL Tuning Advisor
D. SQL Access Advisor
E. Automatic Database Diagnostic Monitor(ADDM)
Answer: A
你發現你的數據高速緩存區(Database Buffer Cache)不夠用了,可使用Memory
Advisor 來肯定其大小,自動數據庫診斷監視器 (ADDM):執行自上而下的實例分析,肯定問
題和潛在的緣由,並提供修復問題的建議案。ADDM 可潛在地調用其餘指導。SGA 指導(Memory
Advisor):根據系統全局區(SGA) 中各個組件的訪問模式,負責優化和建議SGA 的大小。
Adequate physical memory has a significant impact on the performance of your
Oracle Database. With its automatic memory management capabilities, Oracle Database
can automatically adjust the memory distribution among the various SGA and PGA
components for optimal performance. These adjustments are made within the boundaries
of the total amount of memory that you allocate to the database.
ADDM periodically evaluates the performance of your database to determine
performance problems. If ADDM finds that the current amount of available memory is
inadequate and adversely affecting performance, then it can recommend that you
increase memory allocations. You can select new memory allocations using the Memory
Advisors.
Additionally, you can use the Memory Advisors to perform what-if analysis on the
following:
The database performance benefits of adding physical memory to your database
The database performance impact of reducing the physical memory available to your
database
With the Memory Advisors, you can obtain memory sizing advice as follows:
If automatic memory management is enabled, then you can get advice for setting
the target amount of memory to allocate to the Oracle instance.
If automatic memory management is disabled and automatic shared memory management
is enabled, then you can get advice on configuring the target sizes of the SGA and
instance PGA.
If only manual shared memory management is enabled, then you can get advice on
sizing the shared pool, buffer cache, and instance PGA.
http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/montune.htm#A
DMQS1034
2.Exhibit
In your production database, the total waits and the time waited for log
file parallel write are significantly high. While investigating the
reason, you find that there are three redo log groups with two members
in each group, and all redo log members are places on a single physical
disk. What action would you take to minimize the waits?
A. Start the log writer slave processes
B. Increase the number of redo log files
C. Increase the size of the redo log buffer
D. Place the redo log files on the different disks.
E. Increase the number of log writer processes.
Answer:D
把日誌建在不一樣的磁盤上來分散i/o 壓力,提升寫入速度
3. One of the tablespace is read-only in your database. The loss of all
control file forced you to recreate the control file. Which operation do
you need to perform after re-creating the control file and opening the
database?
A. Drop and re-create the read-only tablespaces
B. Rename the read-only data file to their correct file names.
C. Change the tablespace status from read/write to read-only.
D. Re-create the read-only tablespace because it is automatically
removed.
Answer: B
由於你的tablespace 是read-only 的,因此你只須要用rename 來update
一下controlfile 就能夠了.
alter database rename file 'D:\ORACLE\ORA92\DATABASE\MISSING00005' to
'E:\DBDATA\ORADATA\RMIS\EXAMPLE01.DBF';
4. You have set some of the initialization parameters as:
DB_BLOCK_SIZE=8KB
SGA_MAX_SIZE=2GB
SGA_TARGET =0
SHARED_POOL_SIZE=120MB
DB_CHCHE_SIZE=896MB
STREAM_POOL_SIZE=0
LARGE_POOL_SIZE=110MB
Which two statements are correct?(Choose two).
A. You can not set a value for the DB_8K_CHCHE_SIZE parameter.
B. If you increase the size of the large pool to 120MB, then the memory
allocated to the shared poll will be reduced to 110MB.
C. If the value for SGA_TARGET is changed to 1GB and SHARED_POOL_SIZE is
120MB, then memory cannot be taken from the shared pool, even if the shared
pool has free space available.
D. If an application attempts to allocate more than 120MB from the shared
pool and free space is available in the buffer pool, then the free space
from the buffer pool is allocated to the shared pool.
Answer: AC
已經設置了DB_BLOCK_SIZE = 8k 就不能設置DB_8K_CACHE_SIZE 了
若是指定了shared pool size 那麼就不能再縮小了,只能增大
不能使用DB_nK_CACHE_SIZE 參數來調整標準塊的大小.例如,假如DB_BLOCK_SIZE 設置
爲2K,設置DB_2K_CACHE_SIZE. 等於2K 是無效的.標準緩存的塊大小老是由DB_CACHE_SIZE
決定的.
Oracle 10g 中,與內存相關的參數能夠歸爲兩類:
q 自動調優的SGA 參數:目前這些參數包括DB_CACHE_SIZE 、SHARED_POOL_SIZE、
LARGE_POOL_SIZE 和JAVA_POOL_SIZE。(注意LOG_BUFFER 不在自動之列)
q 手動SGA 參數:這些參數包括LOG_BUFFER 、STREAMS_POOL 、DB_NK_CACHE_SIZE、
DB_KEEP_CACHE_SIZE 和DB_RECYCLE_CACHE_SIZE。
在Oracle 10g 中,任什麼時候候你都能查詢V$SGAINFO,來查看SGA 的哪些組件的大小能夠調
整。注意 要使用自動SGA 內存管理,參數STATISTICS_LEVEL 必須設置爲TYPICAL 或ALL。
若是不支持統計集合,數據庫就沒有必要的歷史信息來肯定大小。
採用自動SGA 內存管理時,肯定自動調整組件大小的主要參數是SGA_TARGET,這個參數可
以在數據庫啓動並運行時動態調整,最大能夠達到 SGA_MAX_SIZE 參數設置的值(默認等於
SGA_TARGET , 因此若是想增長SGA_TARGET , 就必須在啓動數據庫實例以前先把
SGA_MAX_SIZE 設置得大一些)。數據庫會使用SGA_TARGET 值,再減去其餘手動設置組件的
大小(如 DB_KEEP_CACHE_SIZE、DB_RECYCLE_CACHE_SIZE 等),並使用計算獲得的內存量來
設置默認緩衝區池、共享池、大池和 Java 池的大小。在運行時,實例會根據須要動態地對
這4 個內存區分配和撤銷內存。若是共享池內存用光了,實例不會向用戶返回一個ORA-
04031「Unable to allocate N bytes of shared memory」(沒法分配N 字節的共享內存)
錯誤,而是會把緩衝區緩存縮小几MB(一個顆粒的大小),再相應地增長共享池的大小。
5. You are performing a block media recovery on the tools01.dbf data file
in the SALES database using RMAN. Which two statements are correct in this
scenario? (Choose two.)
A. You must ensure that the SALES database is mounted or open.
B. You must restore a backup control file to perform a block media
recovery.
C. You must take the tools01.dbf data file offline before you start a block
media recovery.
D. You must put the database in NOARCHIVELOG mode to perform a block media
recovery.
E. You can perform only a complete media recovery of individual blocks,
point-in-time recovery of individual data blocks is not supported.
Answer: A, E
數據庫必須在mounted or open 狀態下才可使用RMAN BLOCKRECOVER
RMAN BLOCKRECOVER 始終執行徹底恢復。使用BLOCKRECOVER 命令時,不能執行時間點恢復
point-in-time recovery=TSPITR
TSPITR 相關的概念和術語:
(1) TSPITR (Tablespace Point-In-Time Recover)。TSPITR 是表空間時間點恢復的英文縮
寫格式,它表示將一個或多個表空間恢復到過去時間點的狀態,而其餘表空間仍然保持現有
狀態。
(2) TSPITR 實現方法。當實現表空間時間點恢復時,既可使用用戶管理的表空間時間點
恢復方法,也可使用RMAN 管理的表空間時間點恢復。
(3) DBPITR (Database Point-In-Time Recovery)。DBPITR 是數據庫時間點恢復的英文縮
寫格式,它表示將數據庫的全部表空間恢復到過去時間點的狀態。注意,DBPITR 只適用於
ARCHIVELOG 模式。
(4) 主數據庫(Primary Database)。主數據庫是指用於存放應用系統數據的Oracle 數據庫,
也被稱爲產品數據庫或目標數據庫。當執行TSPITR 時,主數據庫是指包含被恢復表空間的
數據庫。
(5) 恢復集(Recovery Set)。恢復集是指在主數據庫上須要執行 TSPITR 的表空間集合。注
意,當在恢復集的表空間上執行TSPITR 時,要求這些表空間必須是自包含的。
(6) 輔助數據庫(Auxiliary Database)。輔助數據庫是主數據庫的一個副本數據庫。當執行
TSPITR 時,輔助數據庫用於將恢復集表空間恢復到過去時間點。注意,輔助數據庫的全部
物理文件都是從主數據庫備份中取得,而且輔助數據庫必須包含SYSTEM 表空間、UNDO 表
空間以及恢復集表空間的備份文件。
(7) 輔助集(Auxiliary Set)。輔助集是指輔助數據庫所須要的、除了恢復集表空間文件之
外的其餘文件集合。當執行 TSPITR 時,輔助數據庫除了須要恢復集表空間的備份文件以外,
還須要備份控制文件、SYSTEM 表空間的備份文件、UNDO 表空間的備分文件。
注意:恢復集表空間必須爲自包含;
違反自包含表空間集合的常見狀況以下:
1> 表空間集合包含有SYS 方案對象
2> 表空間集合包含了索引所在的表空間,但沒有包含索引基表所在的表空間
3> 表空間集合沒有包含分區表的全部分區
4> 表空間集合包含了表所在的表空間,但沒有包含其LOB 列所在的表空間
檢查自包含方式:
SQL> connect sys/oracle@demo as sysdba
SQL> execute dbms_tts.transport_set_check('user01',true);
SQL> Select * From transport_set_violations;
到了oracle10g,可不用這麼麻煩了,咱們會首先選擇database flashback,將整個數據
庫rollback 到某一個時間點,而不是表空間時間點恢復.
6.Exhibit
You executed the following command to perform a backup of the
USERStablespace:
RMAN > BACKUP TABLESPACE USERS;
Which type of backup would this command perform?
A. backup set
B. image copy
C. incremental backup
D. None; the user receives an error indicating that the backup type must
be specified.
Answer: A
缺省爲CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;
若是要鏡像備份: CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY;
7. In your database, online redo log files are multiplexed and one of the
members in a group is lost due to media failure?
How would you recover the lost redo log member?
A.import the database from the last export
B.restore all the members in the group from the last backup
C.drop the lost member from the database and then add a new member to the
group
D.restore all the database files from the backup and then perform a
complete recovery
E.restore all the database files from the backup and then perform an
incomplete recovery
Answer: C
Redo group 裏若是有多個成員,那麼他們是冗餘的。 每一個成員裏的內容都
同樣,因此刪除再添加一個便可。
8. You are using Oracle Database 10g. Which statement regarding an
incomplete recovery is true?
A. You do not need to restore all the data files.
B. You do not need to open the database with the RESETLOGS operation
C. You do not need to perform a full backup after the RESETLOGS operation.
D. You do not need to recover all the data files to the same system change
number (SCN).
Answer: C
1:10g 之前,在進行了不徹底恢復用resetlogs 打開後,必須當即執行全備份,因
爲日誌序號被複位,以防止後續日誌被應用。
2:10g 後,控制文件保留了resetlogs 以前的歸檔日誌序列,而且日誌recid 繼
續增加,容許跨越resetlogs 時間點進行徹底/不徹底恢復。(10g 前,使用當前控
制文件再也不可以恢復以前的備份)。
Sql>select recid,stamp,first_change#,first_time,next_change# from
v$log_history where recid>###;
9.Exhibit
View the Exhibit and examine the Resource Manager settings for the gr
oups at different levels.
Which two effects would be the result of this setting? (Choose two.)
A. The members of LOW_GROUP would get more priority than those of OTH
ER_GROUPS.
B. The members of SYS_GROUP would get most of the CPU allocation at l
evel 1.
C. The members of LOW_GROUP would get most of the CPU allocation beca
use it has CPU allocation at two different levels.
D. The members of LOW_GROUP would get no CPU allocation at level1 if
the members of OTHER_GROUPS are using all the CPU at level 2.
E. The members of SYS_GROUP would get no CPU allocation at level 1 if
the members of OTHER_GROUPS are using all the CPU at level 2.
Answer: A, B
Editor’s notes:You can see the deail contents in <10GOCP 官方教材
043.pdf>.But,the knowledge of the managing resource is not so
popular.so,just see see.
resource plan 指的是整個系統CPU(O8i 只有CPU)的分配計畫,
resource plan 是設定 cpu 使用權的前後順序
例如 level 1 sys_group 100%
level 2 oltp 75%
level 2 dss 25%
表示sys_group 可用全部的CPU resource , 若其有剩下在按比率分給 oltp 與
dss,level 高的先分配
10. The current time zone for one of the user sessions is set to the
database local time zone. For one application, the user session requi
res the time zone to be set to the local operating system time zone w
ithout affecting other user sessions.
Which two solutions could the user implement to achieve this objectiv
e? (Choose two.)
A. use the ALTER SYSTEM command to change the time zone
B. use the ALTER SESSION command to change the time zone
C. use the ALTER DATABASE command to change the time zone
D. set the value for the operating system variable ORA_SDTZ on the cl
ient machine
E. set the value for the operating system variable ORA_SDTZ on the da
tabase server machine
Answer: B, D
對於一個應用,在你的回話中你想設定本地操做系統時間,而不影響其它的回話,
a、你須要使用 alter session 修改該會話的時間
b、在客戶機上修改操做系統的參數ORA_SDTZ
11. You work as a database administrator at Certkiller .com. Your dat
abase is open and running in ARCHIVELOG mode. You take RMAN full bac
kups every Sunday night. On Monday morning, while querying the user1.
employees table, you receive the following error message:
01578: ORACLE data block corrupted (file # 5, block # 51)
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
You need to rectify the corruption while ensuring the following:
The data file should remain online. The mean time to recover (MTTR) s
hould be minimal. You are not using a backup control file and all the
archived logs are accessible. Which option would you choose?
A. flash back the corrupted blocks
B. use the DBMS_REPAIR package
C. use the RMAN TSPITR command
D. use the RMAN BLOCKRECOVER command
E. use the RESTORE DATABASE and RECOVER DATABASE commands
F. investigate the time at which the corruption occurred and perf
orm a point-in-time recovery
Answer: D
數據庫在歸檔模式下,每一個星期天進行一次全備份,星期一早晨發現數據塊損
壞,要求MTTR 時間最少,要求data file 在線,因此最好的方法就是RMAN
BLOCKRECOVER
12. You are working on an Oracle Database 10g database. You enabled t
he Flashback Database feature. Which two statements regarding flashba
ck logs are true? (Choose two.)
A. Flashback logs are not archived.
B. Flashback logs are maintained in redo log files.
C. Flashback logs are maintained in the Flash Recovery Area.
D. Flashback logs are used to maintain Flashback Database related
errors.
E. Flashback logs need to be cleared manually after you disable F
lashback Database.
Answer: A, C
關於FLashback logs,首先FLashback logs 不會被歸檔,其次 FLashback
logs 會被存放在 flashback Recovery area,若是disable flashback
database,flashback log 會自動清除
Flashback Database uses the flashback logs to perform flashback.
Flashback Drop uses therecycle bin. All other techniques use undo data
注意Flashback log 不是記錄錯誤的日誌
13. You executed the following query:
SELECT operation, undo_sql, table_name FROM flashback_transaction_que
ry;
Which statement is correct regarding the query output?
A. It would return information regarding only the last committed tran
saction.
B. It would return only the active transactions in all the undo segme
nts in the database.
C. It would return only the committed transactions in all the undo se
gments in the database.
D. It would return both active and committed transactions in all the
undo segments in the database.
E. It would return information regarding the transactions that began
and were committed in the last 30 minutes.
Answer: D
該語句會查詢到正在活動的(active)和committed 的undo 數據 什麼叫活動的?
關於active 的一些信息,可參考:
select sum(bytes / 1024 / 1024), status, tablespace_name
from dba_undo_extents group by status, tablespace_name;
該查詢將返回以STATUS 分組的各狀態回滾信息所使用的空間量,通常存在三種STATUS 狀態:
EXPIRED,UNEXPIRED,ACTIVE。ACTIVE 表示目前仍活躍的事務相關回滾信息,UNEXPIRED
表示雖然事務已經結束但回滾信息保留的時間仍未超過實例參數UNDO_RETENTION 所設定的
值,EXPIRED 表示回滾信息保留時間已超過UNDO_RETENTION 所設定的值。
在UNDO 表空間未啓用guarantee 選項的狀況下(當前使用狀況),新事務的回滾空間分配
遵循如下依據:
a) 尋找不存在ACTIVE 區間的回滾段,若沒有則建立一個新的回滾段,若空間不容許生成新
段,則返回錯誤。
b) 若是有一個回滾段被選中,可是其中空閒的空間並不足以存儲該事務的回滾信息,那麼
它將嘗試建立區間,若是表空間上沒有空間,那麼將會進入下一步。
c) 若是建立新區間失敗,它將會搜索其餘回滾段中的EXPIRED 區間並重用。
d) 若是其餘回滾段中沒有EXPIRED 區間可以使用,那麼它會繼續搜索其餘回滾段中
UNEXPIRED 區間並重用,注意事務不會重用本回滾段中的UNEXPIRED 區間,故UNEXPIRED 的
回滾空間僅部分能夠爲Oracle 重用;若仍得不到所需則返回錯誤。
結論(warehouse):flashback_transaction_query 中的數據來自undo datafile,只要事務
對應的before image 在undo datafile 中存在,flashback_transaction_query 裏面就可
以查詢到數據...目前沒發現受那個參數的制約
14. Consider the following configuration:
/devices/D1 is a member of disk group dgroupA.
/devices/D2 is a member of disk group dgroupA.
/devices/D3 is a member of disk group dgroupA.
You plan to add a new disk, /devices/D4,to the disk group dgroupA.
You execute the following command:
SQL> ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
Which task would be accomplished by the command?
A. The command adds the new disk, D4, to the disk group.
B. The command would result in an error because the is no disk by the
name "'/devices/D*'"
C. The command will be ignored because disks starting with "D" are al
ready members of the disk group.
D. The command would result in an error because no wildcard character
s can be used in the disk name.
E. The command first detaches all the member disks starting with "D",
and the reattaches them including the new disk.
Answer: A
Editor’s notes:
/devices/D1 is a member of disk group DGROUPA.
/devices/D2 is a member of disk group DGROUPA.
/devices/D3 is a member of disk group DGROUPA.
/devices/D4 is a candidate disk.
So,if you execute the command above,oracle will add a member automaticly.
Reblanceis automatically done as disks are added, dropped, or resized
ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
將D4 添加到 DGROUPA 磁盤組。因爲其它磁盤已是 DGROUPA 磁盤組的成員,
所以即便它們與搜索字符串匹配,第二個語句仍將忽略這些磁盤。向磁盤
組添加磁盤時,ASM 實例將確保該磁盤是可尋址的而且可用,而後,纔會對該磁
盤進行格式化並使其從新平衡。因爲須要將每一個文件的分配單元移到新磁盤上,
所以從新平衡過程很是耗時。
15. You work as a database administrator at Certkiller .com. In your
production database there is a job, CALC_STAT, which has been schedul
ed to run every Friday at 5.00 p.m. CALC_STAT updates the optimizer s
tatistics for the objects owned by the APPS schema. You want the task
to be generic, there by allowing users to modify the attributes of th
e task at run time without affecting the original task.
Which component of Oracle Scheduler must you define to achieve this?
A. Window
B. Program
C. Job class
D. Window group
Answer: B
Scheduler 中的Program對象並非常規意義上的"程序"或"應用",而就是一個"對象",由
DBA定義的,具備執行某項功能的特殊對象。Program中實際執行的操做能夠分爲下列三種類
型:
1.PL/SQL BLOCK :標準的pl/sql 代碼塊;
2.STORED PROCEDURE :編譯好的PL/SQL 存儲過程,或者Java 存儲過程,以及外部的c 子
程序;
3.EXECUTEABLE :ORACLE 數據庫以外的應用,好比操做系統命令等等。
實際上SCHEDULER 中建立job 時,也能夠指定執行外部的程序。SCHEDULER 中的Job 更
像是以前版本繼承過來的JOBS,只不過10g 中SCHEDULER 管理的JOBS 功能更增強大。
Programs 與Jobs 不一樣的是,Jobs 是定義好的,定時執行的任務,而Programs 則是定義好
的,等待被執行的對象。
• A window is represented by an interval of time with a well-defined beginning and
end,and is used to activate different resource plans at different times. This allows
you to change resource allocation during a time period such as time of day or time
of the sales year.
• A window group represents a list of windows, and allows for easier management of
windows. You can use a window or window group as the schedule for a job to ensure
that the job runs only when a window and its associated resource plan are active.
• A job class defines a category of jobs that share common resource usage requirements
and other characteristics. A job class groups jobs into larger entities.
• A resource consumer group associated with the job class determines the resources
that are allocated to the jobs in the job class.
• A resource plan enables users to prioritize resources (most notably CPU) among
resource consumer groups.
16. Immediately after adding a new disk to or removing an existing di
sk from an Automatic Storage Management (ASM) instance, you find that
the performance of the database decreases initially, until the addit
ion or removal process is completed.
Performance then gradually returns to normal levels. Which two activi
ties could you perform to maintain a consistent performance of the da
tabase while adding or removing disks? (Choose two.)
A. increase the number of checkpoint processes
B. define the POWER option while adding or removing the disks
C. increase the number of DBWR processes by setting up a higher value
for DB_WRITER_PROCESSES
D. increase the number of slave database writer processes by setting
up a higher value for DBWR_IO_SLAVES
E. increase the number of ASM Rebalance processes by setting up a hig
her value for ASM_POWER_LIMIT during the disk addition or removal Ans
wer: B, E
Editor’s notes:
在ASM 實例添加和刪除磁盤,在沒有完以前數據庫會很慢,用什麼方法能夠在不影響數據庫
速度的狀況下添加或刪除磁盤
Striping:條帶化
條帶化是把連續的數據分割成相同大小的數據塊,把每段數據分別寫入到陣列中不一樣磁
盤上的方法。此技術很是有用,它比單個磁盤所能提供的讀寫速度要快的多,當數據從第一
個磁盤上傳輸完後,第二個磁盤就能肯定下一段數據。數據條帶化正在一些現代數據庫和某
些RAID 硬件設備中獲得普遍應用。
ASM_POWER_LIMIT:該參數控制從新平衡操做的速度。值的範圍在1 到 11 之間,11 表
示速度最快。若是省略,該值將默認爲 1。從屬進程的數量能夠從手動從新平衡命令 (POWER)
中指定的並行級別派生,或者經過 ASM_POWER_LIMIT 參數派生。
ALTER DISKGROUP dg1 add disk ‘ddd’ REBALANCE POWER 5;
最小值0 表明不作Rebalance
最大值11 表明最快的速度,也意味最嚴重的性能影響
1 表明最慢的速度和最小的性能影響
從新平衡不會妨礙任何數據庫操做。從新平衡進程主要會對系統上的 I/O 負載產生影響。
從新平衡的強度越高,它加在系統上的 I/O 負載也就越大。這樣,可供數據庫I/O 使用的
I/O 帶寬就越少。
若是 ASM 環境是使用命令行而不是經過EM 建立的,則必須先建立磁盤組而後才能裝
載。
ASM_POWER_LIMIT controls the speed for a rebalance operation. Values range from
1 to 11, with 11 being the fastest. If omitted, this value defaults to 1. The number
of slaves is derived from the parallelization level specified in a manual rebalance
command (POWER), or by the ASM_POWER_LIMIT parameter.
17. The current time is 12:00 noon. You want to recover the USERS tab
lespace from a failure that occurred at 11:50 a.m. You discover that
the only member of an unarchived redo log group containing informatio
n from 11:40 a.m. onwards is corrupt.
With reference to this scenario, if you are not using Recovery Manage
r (RMAN),
which recovery method would you use?
A. time-based recovery
B. log sequence recovery
C. cancel-based recovery
D. change-based recovery
Answer: C
使用recover database until cancel 進行恢復時,能夠一直輸入回車,直到沒有歸檔
日誌文件可用爲止(在這種狀況下,若已經將全部的在線日誌文件歸檔,那麼利用這種狀況
能夠恢復全部的數據);也能夠在恢復的過程當中,輸入CANCEL,利用一部分歸檔日誌文件
進行恢復(這種狀況可能只能恢復一部分數據)。
In cancel-based recovery, recovery proceeds by prompting you with the suggested
filenames of archived redo log files. Recovery stops when you specify CANCEL instead
of a filename or when all redo has been applied to the datafiles.
Cancel-based recovery is better than change-based or time-based recovery if you
want to control which archived log terminates recovery.
For example, you may know that you have lost all logs past sequence 1234,
so you want to cancel recovery after log 1233 is applied.
RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
The database indicates whether recovery is successful. If you cancel before all the
datafiles have been recovered to a consistent SCN and then try to open the database,
you will get an ORA-1113 error if more recovery is necessary. As explained in
"Determining Which Datafiles Require Recovery", you can query V$RECOVER_FILE to
determine whether more recovery is needed, or if a backup of a datafile was not
restored prior to starting incomplete recovery.
(warehous 實驗)把25,26 號刪除,恢復到24,再手工輸入聯機日誌文件,由於該語句
recover database using backup controlfile 是一個徹底恢復,oracle 須要用到當前聯機
日誌的!(即便有相同序號的歸檔日誌也不會用)如今已經恢復到26 號了,27 號沒有了,加上
cancel 就好了,當成一個不徹底恢復recover database using backup controlfile until
cancel;若是有當前日誌其實是一個徹底恢復,如今能夠alter database open resetlog
了.即便是徹底恢復,oracle 的scn 仍是有損失了,只要有損失,就必需resetlog 打開
18.You lost the PRODSTD tablespace, which was read/write. The tablesp
ace was read-only when the last backup was performed. How would you r
ecover the tablespace?
A. restore the tablespace from the backup; there is no need to ap
ply the redo information
B. restore the full database to recover the data up to the point
when you performed the backup
C. restore the tablespace from the backup and then perform a reco
very using the backup control file
D. restore the tablespace from the backup and then recover the ta
blespace; all the redo information from the point when the tablespace
was made read/write is applied
Answer: D
19. You are using an Automatic Storage Management (ASM) instance to m
anage the files of your production database. You have two disk groups
, DG1and DG2 with one device each. In the parameter file of the produ
ction database, the following parameters have been specified:
DB_CREATE_ONLINE_LOG_DEST_1 = '+dg1'
DB_CREATE_ONLINE_LOG_DEST_2 = '+dg2'
What would be the impact of this setting?
A. When a new log group is added, it would have one member in each di
sk group.
B. When a new log group is added, it would have two members in each d
isk group.
C. When a new tablespace is added, it would have one data file in eac
h disk group.
D. When a new log file is added, it would have one member spread acro
ss the disk groups.
Answer: A
DB_CREATE_ONLINE_LOG_DEST_1 = '+dg1'
DB_CREATE_ONLINE_LOG_DEST_2 = '+dg2'
當一個新的日誌組加入了之後,會在每一個磁盤組中有個成員。
Editor’s notes:
DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) specifies the default
location for Oracle-managed control files and online redo logs. If more than one
DB_CREATE_ONLINE_LOG_DEST_n parameter is specified, then the control file or online
redo log is multiplexed across the locations of the other
DB_CREATE_ONLINE_LOG_DEST_n parameters. One member of each online redo log is
created in each location, and one control file is created in each location.
Specifying at least two parameters provides greater fault tolerance for the
control files and online redo logs if one of the locations should fail.
If a file system directory is specified as the default location, then the
directory must already exist; Oracle does not create it. The directory must have
appropriate permissions that allow Oracle to create files in it. Oracle generates
unique names for the files, and a file thus created is an Oracle-managed file.
db_recovery_file_dest 參數啓用redo、control、rman backups、archived logs、flashback
logs 文件的omf 管理,相似的db_create_online_log_dest_n 參數啓用redo、control 的omf
管理,從中咱們也能夠看出redo、control 文件的重要性!!這三個參數對redo、control
文件位置的影響:
1.位置優先級:【control_files 初始化參數】 > db_create_online_log_dest_n >
db_recovery_file_dest >= db_create_file_dest
此處的等於號比較有意思:若是沒有db_create_online_log_dest_n,而存在
db_create_file_dest 時,db_recovery_file_dest 就至關
db_create_online_log_dest_2,db_create_file_dest 則至關於
db_create_online_log_dest_1
2.redo 文件的多路複用
一般應該經過指定db_create_online_log_dest_n 來達到該目的!
3.若是三個參數指定相同的值會怎樣?本身猜吧 :)
4.omf 文件的命名規則
<_dest_參數路徑>/<db_unique_name_or_db_name>/<datafile>/o1_mf_%t_%u_.dbf
(作題目的時候容易想的跟選的不一致)
20. An RMAN backup job fails, displaying the following error:
ORA-19809: limit exceeded for recovery files
Your analysis shows that the Flash Recovery area is full. Which two a
ctions could you take to resolve the error and avoid this error in th
e future? (Choose two.)
A. take the backup of the flash recovery area less frequently
B. increase the value of the UNDO_RETENTION initialization parameter
C. change the value of the WORKAREA_SIZE_POLICY initialization parame
ter to AUTO
D. change the backup retention policy to retain the backups for a sma
ller period of time
E. increase the value of the DB_RECOVERY_FILE_DEST_SIZE initializatio
n parameter
F. increase the value of the CONTROL_FILE_RECORD_KEEP_TIME initializa
tion parameter
Answer: D, E
你的flash recovery area 空間不夠用了
一、增長DB_RECOVERY_FILE_DEST_SIZE 的大小
二、修改保留策略
每次 RMAN 在快速恢復區中建立文件時,Oracle 數據庫都會更新磁盤上不
再須要的文件的列表。
須要將某個文件寫入快速恢復區但空間不夠時,Oracle 數據庫會刪除位於
做廢文件列表中的文件,並在預警日誌中寫入一條通知。因爲快速恢復區中沒有
文件能夠刪除,使快速恢復區的空間緊張或空閒空間太低時,將發出警告。
21. Your database operates in ARCHIVELOG mode. User-managed consisten
t backups are performed every Sunday night.
On Tuesday, client A drops a table at 8:00 a.m. as follows:
SQL> DROP TABLE cust_ord PURGE;
Table dropped.
Client B executes a query at 9:00 a.m. on the same table as follows:
SQL> SELECT * FROM cust_ord;
SELECT * FROM cust_ord
ERROR at line 1:
ORA-00942: table or view does not exist
Client B needs the dropped table and reports the problem to you.
With reference to this scenario, which action should you take?
A. retrieve the table by using the flashback feature
B. restore all the data files from last Sunday's backup and then perf
orm a time-based recovery
C. restore all the data files from last Sunday's backup and then perf
orm a log sequence recovery
D. restore all the data files from last Sunday's backup and then perf
orm a cancel-based recovery
E. restore from last Sunday's backup only data files that belong to t
he tablespace in which the table was stored and then perform a comple
te recovery
Answer: B
表被刪除,同時purge 從recycle bin 中,沒法使用閃回來閃回表,只能基
於scn 或時間的不徹底恢復,由於是不徹底恢復,必須基於數據庫級,並且已經
知道時間要恢復的時間了,因此recover all data files 基於時間的不徹底恢復。
22. You performed an incomplete recovery on your Oracle Database 10g
database using the following command:
SQL> RECOVER DATABASE
2 UNTIL TIME '2004-08-05:12:10:03'
3 USING BACKUP CONTROLFILE;
In which situation would the above recovery be required?
A. A user table was lost at the specified time.
B. A redo log file was lost at the specified time.
C. The backup control file is on a faster disk than the current one.
D. The current control file has a different path compared with the in
tended time of recovery.
E. The current control file does not match the physical structure of
the database at the intended time of recovery.
Answer: E
何時使用基於備份控制文件的恢復
基於備份控制文件恢復是指使用備份控制文件將數據庫恢復到備份點與失敗點之間某個時
刻的狀態。
a、表空間被意外刪除
b、全部控制文件所有損壞
好比說你不當心刪除了一個表空間,那麼current 控制文件確定不包含被刪除表空間的
信息,只能使用原來的控制文件
recover database using backup controlfile;
(加這句話告訴oracle 這個時候控制文件不是新的,最根本就是要告訴oracle 恢復的終點不
是當前控制文件所記錄的scn,是多少,不明確)
recover database using backup controlfile 有多是一個徹底恢復,oracle 須要用到當
前聯機日誌的!如今已經恢復到26 號了,27 號沒有了,加上cancel 就好了,當成一個不徹底
恢復recover database using backup controlfile until cancel;若是有當前日誌實際上
是一個徹底恢復,如今能夠alter database open resetlog 了,即便是徹底恢復,oracle 的
scn 仍是有損失了,只要有損失,就必需resetlog 打開
23. While creating a job class using the DBMS_SCHEDULER package, you
set the logging level to LOGGING_RUNS. What would be the impact of th
is setting?
A. Oracle Scheduler would write detailed information to the job log f
or each run of each job in the job class.
B. Oracle Scheduler would write detailed information to the job log f
or the first run of each job in the job class.
C. Oracle Scheduler would write detailed information to the job log f
or each run of only the first job in the job class.
D. Oracle Scheduler would write detailed information for all operatio
ns performed on all jobs in the job class.
Answer: A
Editor’s notes:
任務類(job class)任務類的特有參數:
(1)job_class_name :必須在sys 模式內惟一
(2)resource_consumer_group :此任務類屬於哪個資源消費羣。
(3)service :在RAC 下,只在指定服務名的實例上運行。
(4)logging_level :能夠設定寫在任務日誌中的內容。有三個值:
dbms_scheduler.logging_off :無日誌。
dbms_scheduler.logging_runs :只記錄任務運行產生的日誌。
dbms_scheduler.logging_full :記錄任務的全部狀況。
(5)log_history :指定了日誌內容的保留天數。默認是30 天。超出時間的內容會被自動
清除。
建立任務類:
dbms_scheduler.create_job_class(
job_class_name => 'name',
resource_consumer_group => 'group',
logging_level => dbms_scheduler.logging_runs)
Job Logging
By default, all job runs are logged. However, when creating a new class, you
can specify parameters that further control what information is logged and how long
the logging information is retained. The logging_level parameter for a class can
be set to one of the following constant values of the DBMS_SCHEDULER package:
·LOGGING_OFF: No logging is performed for any jobs in this class.
·LOGGING_RUNS: The scheduler writes detailed information to the job log for
each run of each job in this class.
·LOGGING_FULL: Besides recording every run in the job log, the scheduler also
logs all other operations performed on all jobs in this class, such as creating new
jobs, enabling or disabling jobs, and so on.
The DBA_SCHEDULER_JOB_LOG view stores a row for each job operation
logged.
The log_history parameter specifies how many days a log entry remains in the
log before it is eligible for purging.
A PURGE_LOG job is created automatically. This job clears out old log entries
once a day. Log entries may also be cleared out manually by using the
DBMS_SCHEDULER.PURGE_LOG procedure.
http://blog.csdn.net/tianlesoftware/archive/2009/10/23/4715218.aspx
24. You are designing an application for Certkiller .com and you have
been asked to design a database table to facilitate monthly bill gen
eration. The bill would include details of customer calls, listed in
chronological order. Which method would you follow to achieve this ob
jective without increasing the overhead of sorting the rows?
A. create a hash cluster to store the data
B. create an index cluster to store the data
C. create a partitioned table to store the data
D. create a sorted hash cluster to store the data
E. create a heap table with rowid to store the data
Answer: D
Editor’s notes:There are three cluster types:index cluster/hash cluster/sort hash
cluster.how can these cluster types be uesd?
簇是一個或多個表的組合,這些表的數據存儲在相同的數據塊中,當經過簇鍵查詢這些
表時,只需讀一個數據塊就能返回鏈接的多個表的數據;
關於hash cluster 和sorted hash cluster,在TOM 的那本<Expert Oracle Database
Architecture: 9i and 10g Programming Techniques and Solutions>第10 章有至關清楚
地講解。在相同hash 值對應的塊裏面,數據行是按指定的列排序存儲的。
索引聚簇表是表相關的表共享同一數據塊中的相同列,並把相關數據存儲中同一個數據
塊上。建立索引聚簇表中最重要的是對SIZE 參數有很好的估量,不然聚簇將會下降空間利
用,下降效率。
使用索引聚簇表的注意點:
一、若是表中數據有大量DML 操做的話,那麼聚簇將不適用,由於會消極地影響到DML 性能。
二、聚簇中,全表掃描將受到影響。這是由於將掃描聚簇中不一樣表的數據,額外增長不少無
用的數據。
三、若是常常TRUNCATE 表和裝載表的話,聚簇將不適用。聚簇中的表沒法被TRUNCATE 的,
這是由於每一個塊中不僅是存儲一張表的數據。
SQL> truncate table emp;
ORA-03292: Table to be truncated is part of a cluster
4,若是大部分是讀取操做,且經過聚簇碼索引或聚簇表中其餘索引來讀取的話,聚簇將會比
較比較適用。
索引聚簇加載數據應該是同時裝載同一聚簇碼的全部數據,而不是一次裝載聚簇中不一樣
表的數據。這是由於若是一次裝載單張表數據的話,頗有可能單個碼值的數據大於SIZE 指
定的數據,可是因爲聚簇碼已經分配完成,此時將會聚簇碼塊有許多連接塊,影響性能。通
過一次裝載每一個碼值對應的數據,能夠更好地利用聚簇塊的空間。
散列(哈希)聚簇表:概念上同索引聚簇表同樣,不一樣的是用哈希函數代替了索引聚簇
碼來進行數據的分配。事實上在散列聚簇中數據就是索引,由於數據決定行的物理位置。散
列聚簇表中ORACLE 根據行的碼值,利用內部函數或提供的函數對聚簇碼值進行運算,以決
定數據的物理存儲位置。散列聚簇一般意味着若是經過聚碼訪問的話,一個IO 就可以提取
到所需的數據。建立散列聚簇時,必須指定散列碼值的數目。因爲使用哈希函數來肯定數據
的分佈,對散列聚簇表不能使用範圍掃描。全掃描散列聚簇表時,不論表是否爲空,ORACLE
將全掃描全部塊,這是由於散列聚簇中數據塊都是預先分配的。散列聚簇的初始數據裝
載將會比較慢。自定義的散列函數限定只能使用表中可用的列和ORACLE 內置函數。
散列聚簇要點:
一、 散列聚簇經過散列碼查詢的時候須要的IO 不多。幾乎一個IO 就能夠提取到所需的數據,
除非發生了行溢出。而傳統索
引至少須要2 個IO 才能獲得數據。
二、散列聚簇查詢CPU 開銷大。散列聚簇是CPU 密集型的,而索引是IO 密集型的。
三、對錶中數據量比較有把握,如行數,每行佔用空間,有合理的上限,正確設置好HASHKYES
和SIZE 參數,那麼散列聚簇將比較適用。
四、散列聚簇下降DML 性能。
五、老是常常經過HASHKEY 等值訪問數據。
http://www.itpub.net/viewthread.php?tid=442689&highlight=Index%2BCluster(需試
驗)
http://www.itpub.net/viewthread.php?tid=138815&highlight=index%2Bcluster
25. You set the recovery window to seven days and the backup optimiza
tion to ON using the CONFIGURE command of Recovery Manager (RMAN). Th
e most recent backup of the TOOLStablespace to disk was taken on Janu
ary 3. The TOOLStablespace is read-only. On February 21, when you exe
cute a command to back up all the tablespaces to disk, you find that
RMAN backs up the TOOLStablespace also, even though the contents of t
he tablespace have not changed after the backup on January 3. Because
there are no changes made to the TOOLStablespace, you decide that th
e tablespace should not be backed up by RMAN. What can you do to skip
backing up the TOOLStablespace without changing the current backup
optimization setting?
A. configure a default device for RMAN backups
B. temporarily disable the retention policy for RMAN backups
C. configure automatic channel allocation for RMAN backups
D. use the CONFIGURE command to reconfigure the recovery window to 60
days
Answer: D
Editor’s notes:
Backup Optimization When Backing Up Backup Sets If backup
optimization is enabled when you issue the command to back up a backup
set, and if the identical backup set has already been backed up to the
same device type, then RMAN skips the backup of this backup set. For
example, when backup optimization is turned on, the following command
backs up to tape only those backup sets not already backed up on device
type sbt:BACKUP DEVICE TYPE sbt BACKUPSET ALL;
置備份優化能夠跳過已經備份並且規定時間內沒有變化的數據
26. Exhibit:
You want to configure the Flashback Database feature and retain flash
back logs for three days.
The steps used in this process are displayed in the exhibit.
In what sequence would you need to perform these steps to enable the
Flashback Database feature?
A. D, C, A, B, E
B. D, A, C, B, E
C. B, D, C, E, A
D. D, B, E, C, A
Answer: A
27. In which scenarios would you rebuild an index? (Choose all that a
pply.)
A. when you need to disable the index usage
B. when you need to change storage options
C. when you need to enable index monitoring
D. when you need to move the index to another tablespace
Answer: B, D
哪一種狀況下須要你須要重建索引
a、當你須要改變存儲選項
b、當你須要把索引移動到其它的表空間
28. You enabled Automatic Shared Memory Management. The initializatio
n parameters are set as shown below:
SGA_TARGET= 10GB
SGA_MAX_SIZE = 14GB
STREAMS_POOL_SIZE = 1GB
SHARED_POOL_SIZE = 3GB
Which two statements are correct in this scenario? (Choose two.)
A. A maximum of 3 GB can be allocated to shared pool.
B. The value for SGA_TARGET can be increased up to a maximum of 14 GB
C. A total of 14 GB memory will be allocated to the automatically tun
ed memory components.
D. Increasing the value for SGA_TARGET will automatically increase th
e memory allocated for STREAMS_POOL_SIZE.
E. Increasing the value for SGA_TARGET to 12 GB will automatically in
crease the memory allocated to autotuned parameters.
F. Reducing the value for SGA_TARGET to 9 GB will automatically decre
ase the memory allocated to shared pool from 3 GB to 2 GB.
Answer: B, E
SHARED_POOL_SIZE 設置值後只會增長,不會減小
29. Which statement correctly describes the change tracking writer (C
TWR) background process?
A. It keeps track of changes in the background processes.
B. It records the system change number (SCN) in the control file.
C. It writes audit records for user changes to the change tracking fi
le.
D. It records any changes to the listened configuration in the listen
er.ora file.
E. It records any changes to the database parameters in the change tr
acking file.
F. It records the physical location of all the changes that are made
to the database in the change tracking file.
Answer: F
(Change Tracking Writer)CTWR-執行增量備份的目的是爲了只備份自上一
次備份以來更改過的數據塊。每一個增量備份過程當中都會讀取整個數據文件,即便
自上次增量備份以來該文件只有很小一部分進行了更改。塊更改跟蹤功能使用更
改跟蹤寫進程 (CTWR) 這一後臺進程將全部數據庫更改的實際位置,記錄到名爲
「更改跟蹤文件」的新類型的文件中。啓用更改跟蹤後,第一個級別爲 0 的增
量備份仍須掃描整個數據文件,由於更改跟蹤文件還沒有反映塊的狀態。對於後續
增量備份,RMAN 將使用更改跟蹤數據來肯定增量備份過程當中要讀取的塊,無需
讀取整個數據文件,從而提升了性能。
Explanation:
This is a new process Change Tracking Writer (CTWR) which works w
ith the new block changed tracking features in 10g for fast RMAN incr
emental backups.
This is a clarification of the documentation for sizing the Block
Change Tracking File.
Block Change Tracking is used to optimize incremental backups. A new
file is introduced:
- Changed blocks are tracked by the CTWR background process as redo i
s generated
- Database backups automatically use the change tracking file Sizing
of this file is important, and even though you can use
V$BLOCK_CHANGE_TRACKING view to monitor the usage, it may in some cas
es not be easy to change the size, ie when using raw devices.
RMAN 能夠再也不掃描整個文件以查找變動數據。
30. You work as a database administrator at Certkiller .com. In your
production database, you observe that users' transactions are consumi
ng a lot of resource and you plan to impose resource restrictions by
using Resource Manager. For which three resources can you enable usag
e restrictions by using Resource Manager? (Choose three.)
A. CPU usage
B. degree of parallelism
C. number of open cursors
D. number of sorts performed
E. idle time for blocking sessions
F. number of disk I/O operations performed
G. number of memory I/O operations performed
Answer: A, B, E
數據庫資源管理器提供了多種分配資源的方式:
1.CPU 方法: 能夠指定在使用者組和子計劃之間如何分配 CPU 資源。
2.並行度限制:能夠控制使用者組中任何操做的最大並行度。
3.具備隊列的活動會話池:能夠限制使用者組或子計劃的併發活動會話數。若是某個組的會
話數超過了容許的最大值,則新的會話將放在隊列中,等待某個活動會話完成。您還可
以指定會話在退出並返回錯誤以前將等待的時間限制。
4.還原池:能夠控制使用者組或子計劃可以生成的還原操做的總數。當還原空間的總數超過
UNDO_POOL 指定的數量時,在相同組中其它會話釋放還原空間或者增大使用者組的還原池之
前,不容許執行任何新的 INSERT、UPDATE 或 DELETE 命令。若是使用者組在執行 DML 語
句時超過了限額,則停止操做並返回錯誤。此時仍可進行查詢,即使使用者組已經超出其還
原閾值。
5.執行時間限制:能夠指定操做所容許的最大執行時間。Oracle 數據庫使用基於成本的優
化程序統計信息來估計操做所需的時間。若是耗時超過了所容許的最大時間
(MAX_EST_EXEC_TIME),則操做返回錯誤而且不會啓動。若是資源使用者組有多個指
定了 MAX_EST_EXEC_TIME 的計劃指令,則資源管理器將選擇全部傳入值中限制性最
強的那個值。
6.空閒時間限制:能夠指定會話的空閒時間,超過該時間後將終止會話 (MAX_IDLE_TIME)。
能夠進一步限制資源管理器,使其只終止阻塞其它會話的(MAX_IDLE_TIME_BLOCKER)。
另: create user test7 identified by test7 default profile;
口令10 次鎖定 password 驗證函數 idle time cpu 空閒
創建新的profile sys: @..\rdbms\admin\utlpwdmg.sql;能夠修改這段腳本
password 驗證函數 verify_function
31. You have specified the warning and critical threshold values of a
n application tablespace to be 60% and 70% respectively. From the tab
lespace space usage metrics, you find that the actual space usage has
reached the specified warning threshold value, but no alerts have be
en generated. What could be the reason for this?
A. The EVENT parameter was not set.
B. The SQL_TRACE parameter is set to FALSE.
C. The Enterprise Manager Grid Control is not used.
D. The STATISTICS_LEVEL parameter is set to BASIC.
E. The TIMED_STATISTICS parameter is set to FALSE.
Answer: D
statistics_level 默認是typical,在10g 中表監控是激活的,強烈建議在
10g 中此參數的值是typical.若是STATISTICS_LEVEL 設置爲basic,不只不能監
控表,並且將禁掉以下一些10g 的新功能:
ASH(Active Session History)
ASSM(Automatic Shared Memory Management)
AWR(Automatic Workload Repository)
ADDM(Automatic Database Diagnostic Monitor)
32. You executed the following command in Recovery Manager (RMAN) aga
inst your Oracle 10g database:
RMAN> REPORT NEED BACKUP days 3;
What would be the output of this command?
A. a list of files that require a backup within three days
B. a list of files that have not been backed up for three days
C. a list of files that RMAN recommends be backed up only once in eve
ry three days, based on low volatility
D. a list of files for which a backup has already been performed and
may need a backup after three days
Answer: B
要報告須要三個或更多增量備份來進行恢復的文件:
RMAN > REPORT NEED BACKUP incremental 3 database;
要報告三天以來還沒有進行備份的系統文件:
RMAN > REPORT NEED BACKUP days 3 tablespace system;
要報告須要進行備份以恢復到三天前的數據狀態:
REPORT NEED BACKUP recovery window of 3 days;
若是不具備兩個或更多個備份則須要進行備份 redundancy 冗餘
REPORT NEED BACKUP redundancy 2
這個report 出來的應該都是數據文件,而不是備份集或者映像副本
33. Your database operates in ARCHIVELOGmode. The redo log files are
not multiplexed and one of the online redo logs is missing. The missi
ng redo log sequence, 230, is not archived and it contained informati
on from 10:35 a.m. onwards. The current time is 11:00 a.m. Because of
a disk crash, you executed the following command to perform an incom
plete recovery:
RMAN> RUN {
2> SET UNTIL SEQUENCE 230 THREAD 1;
3> ALTER DATABASE MOUNT;
4> RESTORE DATABASE;
5> RECOVER DATABASE;
6> ALTER DATABASE OPEN RESETLOGS;
7> };
With reference to this scenario, which statement is true?
A. RMAN recovers up to log sequence 230, but not including 230.
B. RMAN returns an error because the log sequence number mentioned in
the command should be 229.
C. RMAN returns an error because the log sequence number mentioned in
the command may never be missing.
D. RMAN recovers up to and including log sequence 229 but then return
s an error because log sequence 230 is missing.
Answer: A
因爲未被歸檔redo log file 丟失,好比說230 丟失,若是不執行基於取消的
恢復,那麼數據庫只能恢復到229,使用命令SET UNTIL SEQUENCE 230 THREAD 1
recover database until '2009/12/27 14:37:24';
恢復出來是小於那個時間點
http://www.itpub.net/thread-1014022-1-1.html
34. In your database, all the tablespaces are locally managed. You st
arted Recovery Manager (RMAN) using recovery catalog and restored the
control file by using the following command:
RMAN> RESTORE CONTROLFILE;
Which two operations do you need to perform after restoring the contr
ol file from backup? (Choose two.)
A. shut down and restart the instance
B. add new tempfiles to the temporary tablespaces after recovery
C. perform a media recovery and open the database with the RESETLOGS
option
D.perform a media recovery and bring the database to NOARCHIVELOG mod
e
Answer: B, C
在使用了RESTORE CONTROLFILE 後你須要作什麼
a、從新創建臨時文件
b、使用recover database 後,用resetlogs 打開數據庫(截斷scn)
(題目問的是使用了RESTORE CONTROLFILE 後你須要作什麼????)
35. While designing your database, you have created the EMPLOYEES tab
le as an index-organized (IOT). You want to create a bitmap index on
the JOD_ID column to make queries faster. Which task must have been c
ompleted so that you are able to create the bitmap index?
A. A primary key must have been created.
B. A mapping table must have been created.
C. An overflow tablespace must have been specified.
D. The PCTTHRESHOLD option must have been specified.
Answer: B
A mapping table is required for creating bitmap indexes on an
index-organized table.
你建立了一個IOT 表,想在上面的其中一列創建位圖索引,你必須創建一
個mapping table
注意到Mapping table 是個heap table, 用來存儲IOT table 的logical
rowid (primary key)。 Mapping table 的每一行存儲了對應的IOT 表中記錄
的logical rowid.
所以這個mapping table 就維護了IOT 表logical rowid 和 mapping table
的每一行的physical rowid 的mapping 的關係。爲何要這樣作呢?
由於bitmap 索引條目中保存的rowid 要用physical rowid, 而IOT 是沒法
提供穩定的physical rowid 的,所以就藉助於mapping table 的physical rowid。
經過bitmap 索引來訪問表中的數據的執行計劃大概就是首先根據bitmap
index 中的physical rowid 訪問mapping table, 而後經過mapping table 中的
logical rowid 再來訪問IOT 表。
36. Exhibit
One of the important tables in the USERS tablespace was dropped and p
urged from the recycle bin at 9:00 a.m. You noticed this
at 11:00 a.m. and you want to perform an incomplete recovery to recov
er the table. Which statement is true?
A. You must recover all data files to the required system change numb
er (SCN).
B. You must recover all data files, except those that are offline, to
the required SCN.
C. You must recover all data files belonging to the USERS tablespace
to the required SCN.
D. You cannot recover all data files because segment space management
is performed manually for the undo tablespace.
Answer: B
不徹底恢復只能針對整個數據庫,不能針對某個表空間或某個數據文件
應該只restore USERS 表空間的文件,但恢復須要將全部文件(除了離線的)恢復到同一
SCN.
不一樣的聲音:I think there are two ways to recover the tables. One is as describled
in answer C. That's is TPITR(tablespace point in time recovery). Another way is fulll
database incomplete recovery which is like a clone the database and recover the
cloned database to the point-in-time. So answer A seems like for this purpose.
It's not necessary to have the same SCN between controlfile abd datafile to bring
datafiles (tablespace) online. So that is the mechanism of TSPITR incomplete
recovery. I think the answer C is correct. Why I suggested to choose A is that with
answer A it could do incomplete table recovery by cloning a database. With this
consideration, the answer A and B should be ththe same because you don't need recover
any datafiles which were offlined before.Wish it helps.(我也沒法確認)
37. You work as a database administrator at Certkiller .com. Your pro
duction database uses an Automatic Storage Management (ASM) instance
to manage its files. You want to add a new disk group to the ASM inst
ance to manage the increased data load. What action would you perform
to include the new disk group in the ASM instance without causing an
y impact on the currently connected users?
A. mount the new disk group in the ASM instance
B. restart the ASM instance and the production database instance
C. register the new disk groups in the production database instance
D. restart the ASM instance without restarting the production databas
e instance
E. include the new disk group in the ASM_DISKSTRING parameter in the
parameter file and restart the ASM instance
Answer: A
要使用 ASM,在啓動數據庫實例以前,必須啓動一個名爲 ASM 實例的特殊實
例。ASM 實例不會裝載數據庫,而是管理使 ASM 文件可用於普通數據庫實例所
必需的那些元數據。ASM 實例和數據庫實例都能訪問一些公共的磁盤集,這些公
共磁盤集稱爲磁盤組。數據庫實例直接訪問 ASM 文件的內容,它們與ASM 實例
通訊的目的只是爲了獲取這些文件的佈局信息。
ASM 指的是一個在物理卷(或者磁盤分區)上特別爲Oracle 數據文件而建立
的"專用"文件系統。該文件系統由Oracle 內核保存並維護,Oracle 知道數據所
處的位置,並自動管理這些位置,進而得到適用於數據庫的最高性能和最大可用

38. The DB_BLOCK_CHECKING initialization parameter is set to TRUE. Wh
at would be the result of this setting on the data blocks being writt
en to the datafiles, every time the DBWn writes?
A. The Oracle database will check all data blocks by going through
the data on each block, making sure the data is self-consistent.
B. The DBWn and the direct loader will calculate a checksum and store
it in the cache header of every data block when writing it to disk.
C. The Oracle database will check data blocks belonging to the SYSTEM
tablespace only, by going through the data on each block, making
sure the data is self-consistent.
D. The Oracle database will check data blocks belonging to the SYSAUX
tablespace only, by going through the data on each block, making
sure the data is self-consistent.
E. The Oracle database will check data blocks in the SYSTEM and SYSAU
X tablespaces only, by going through the data on each block, making s
ure the data is self-consistent.
Answer: A
DB_BLOCK_CHECKING=ture,改成TRUE 以後會有4 種狀態,Oracle 數據庫將
對全部數據塊執行塊檢查。Oracle 數據庫經過讀取塊中的數據來檢查塊,以確
保此數據塊的自我一致性。
Editor’s notes:
DB_BLOCK_CHECKING has four values showed like that:OFF | LOW | MEDIUM
| FULL
Off will not check the data bolck,but system tablespace’s data block
will always check.
Low will check the basic block header off all data block that changed
in memory(eg. Update or insert).
Medium and full is check more than off.
39. In your production database you want to use an Automatic Storage
Management (ASM) instance to manage the database files. Which option
would you use to migrate the database files from a non-ASM instance t
o an ASM instance?
A. Oracle Migration Assistant
B. Recovery Manager (RMAN)
C. Oracle Data Pump Export and Import
D. conventional Oracle Export and Import
E. operating system utilities to copy the files to the ASM instance
Answer: B
40. In the parameter file of your production database, the CONTROL_FI
LE_RECORD_KEEP_TIME parameter is set to 31. What would be the impact
of this setting on the backup that is being performed by using Recove
ry Manager (RMAN)?
A. The backup would be retained on the media for 31 days.
B. The backup would be maintained in the recovery catalog for 31
days.
C. The backup metadata would be retained in the control file for
31 days.
D. The backup metadata would be maintained in the recovery catalo
g for 31 days.
E. Automatic backups of the control file will be retained in the
flash recovery area for 31 days.
Answer: C
監控控制文件記錄重寫:
沒有恢復目錄的狀況下,oracle 的控制文件記錄了全部的歷史備份記錄,爲了保證控
制文件不會無限制的增加,oracle 提供了一個能夠設置控制文件保留時間的閥值的初始化
參數:CONTROL_FILE_RECORD_KEEP_TIME.
例如咱們設置了CONTROL_FILE_RECORD_KEEP_TIME=14,任何超過14 天的紀錄都有可能
被覆蓋,若是沒有超過14 天 的記錄,oracle 將擴展控制文件的大小,若是因爲受到操做
系統的限制(好比磁盤空間滿)沒法擴展控制文件的大小,oracle 會強制覆蓋最老的記錄
並 且在alter.log 中記錄這一情kccwnc: following controlfile record written over:
快速恢復區Flash Recovery Area 和控制文件記錄保存時間參
CONTROL_FILE_RECORD_KEEP_TIME 之間的相互做用
若是咱們在使用快速恢復區保留RMAN 備份的話,控制文件將記錄恢復區中文件的建立
記錄,由於通常來說文件建立的記錄要比執行備份的信息要晚, 若是有備份文件超過了
CONTROL_FILE_RECORD_KEEP_TIME 參數所規定的時間,ORACLE 試圖刪除這些這些文件,不然
ORACLE 將增長控制文件的大小而且在alter.log 中記錄這一狀況。以下所示:
kccwnc: tring to expand controlfile section nnnn for Oracle Managed Files
若是沒法擴展控制文件,則alter.log 中將出現如下信息:
WARNING: Oracle Managed File filename is unknown to controlfile. This is the result
of limitation in control file size that could not keep all recovery area files.
也就是不能知足備份的保留冗餘策略來保存備份了。
爲了不和下降這種狀況的發生,咱們能夠採起如下措施:
使用32K 大小的塊建立控制文件,若是想設置控制文件32K 大小的BLOCK,咱們必須首
先把SYSTEM 表空間設置成爲大於或者等於控制文件使用的BLOCK SIZE.修改了控制文件
BLOCK_SIZE 後,必須重建控制文件。
使用BACKUP RECOVERY AREA 命令備份快速恢復區使得快速恢復區的文件成爲能夠刪除的文
件, 或者減少備份保留時間或者減少備份保留冗餘度維護控制文件中的RMAN 備份存儲庫。
41 . You decided to change the location of the flash recovery area. Y
ou executed the following command:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+disk1' SCOPE=BOTH SID='*';
Which statement is true?
A. The location can be changed only if the flash recovery area is emp
ty.
B. After executing the command, all new flash recovery area files wil
l be created in the new location.
C. The command will generate an error because you cannot change the f
lash recovery area while the database is open.
D. All the existing files in the flash recovery area will be moved to
the new location and all new Flash Recovery Area files will be creat
ed in the new location.
Answer: B
你決定改變flashback area 的位置,但你改變位置後,新的flash recovery
area 將被放到新的地方,應該由DB_RECOVERY_FILE_DEST 來決定flash recovery
area 位置,這個DB_RECOVERY_FILE_DEST_SIZE 決定其大小
42. Exhibit
A user has inserted wrong department data in the DEPT3 table in the U
SERS tablespace. You use the Flashback Table functionality to rectify
the erroneous inserts. While performing the recovery, you choose 200
4343 as the Flashback SCN.
Which two statements are correct in this scenario? (Choose two.)
A. Only the row with DEPARTMENT_ID 290 would be flashed back.
B. The rows with DEPARTMENT_ID 290 and 300 would be flashed back.
C. The rows with DEPARTMENT_ID 290 and 280 would be flashed back.
D. You would have taken the USERS tablespace offline before starting
the Flashback Table operation.
E. You would have enabled row movement for the DEPT3 table before sta
rting the Flashback Table operation.
Answer: C, E
而參考答案是B,E,質疑
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
SQL> drop table t_dept; (注:sys 用戶不支持閃回)
SQL> create table t_dept(a int);
SQL> insert into t_dept values(280);
SQL> commit;
sql> select current_scn from v$database;
64812593
SQL> insert into t_dept values(290);
SQL> commit;
sql> select current_scn from v$database;
64812602
SQL> insert into t_dept values(300);
SQL> commit;
sql> select current_scn from v$database;
64812617
SQL> col a for 9999
SQL> select VERSIONS_STARTSCN,versions_starttime,versions_operation ,a
from t_dept versions between timestamp minvalue and maxvalue
order by VERSIONS_STARTSCN desc;
1672658637 15-12 月-10 05.34.12 下
午 I 300
1672658557 15-12 月-10 05.31.03 下
午 I 290
1672658487 15-12 月-10 05.28.20 下
午 I 280
SQL> alter table t_dept enable row movement;
SQL> flashback table t_dept to scn 1672658557;
SQL> select * from t_dept;
280
290
從最後的結果來看 也是先刪除了表的3 行數據,在flashback 會280,290 2 行數據
實驗結果代表 答案應該是CE
44. Your database is running on the automatic Program Global Area (PG
A) memory management and Shared Memory Management mode. You want to i
ncrease the memory available for the SQL work areas. What would you d
o?
A. modify the HASH_AREA_SIZE initialization parameter
B. modify the PGA_AGGREGATE_TARGET initialization parameter
C. modify the WORK_AREASIZE_POLICY initialization parameter
D. increase the value of the SGA_TARGET initialization parameter
E. increase the value of the SGA_MAX_SIZE initialization parameter
F. increase the value of the SORT_AREA_SIZE initialization parameter
Answer: B
With PGA_AGGREGATE_TARGET, sizing of work areas for all dedicated
sessions is automatic and all *_AREA_SIZE parameters are ignored for these
sessions.
自動管理共享內存功能要求將STATISTICS_LEVEL 設置爲 TYPICAL 或 ALL。
PGA_AGGREGATE_TARGET
在自動 PGA 內存管理模式下運行時,全部會話的工做區大小的調整都是自動
的,在該模式下運行的全部會話都會忽略*_AREA_SIZE 參數(例如
SORT_AREA_SIZE)。在任何給定時間,可用於實例中各活動工做區的 PGA 內存
總量自動從PGA_AGGREGATE_TARGET 初始化參數派生。此內存量設置爲
PGA_AGGREGATE_TARGET 值減去系統其它組件分配的 PGA 內存量(例如,會話
分配的PGA 內存)。由此獲得的PGA 內存隨後按照各活動工做區的特定內存需
求分配給相應的工做區
45. On Tuesday, a junior DBA dropped an important application user ac
count, whose schema has important tables. You are asked to recover al
l the objects in the schema. On investigation, you find that the user
account was dropped at 11:00 a.m. and Sunday's backup is the most re
cent backup. Which flashback feature would you use?
A. Flashback Drop
B. Flashback Table
C. Flashback Database
D. Flashback Version Query
E. Flashback Transaction Query
Answer: C
Flashback Database 相似rman 的不徹底恢復,它能夠把數據庫回退到過去某
個時間點的狀態.
Flashback Drop 只是恢復單個table
46. A redo log file is corrupted while the database is open; as a con
sequence, database operations are stopped because archiving cannot co
ntinue. What would you do to solve the problem?
A. clear the redo log group
B. perform redo log file import
C. perform an incomplete recovery
D. perform a redo log recovery using Recovery Manager (RMAN)
E. shut down the database and open the database in the NOARCHIVELOG m
ode
Answer: A
數據庫在打開的狀態下日誌壞掉,而後數據庫自動關了,那個壞掉的日誌沒
有歸檔。只須要使用命令clear redo log group 就好了,同時因爲缺乏了一部
分archive log 須要整個數據庫從新備份一下
47. You are working on an Oracle Database 10g database. Because of da
ta loss, you decided to perform a Flashback Database operation using
the following command:
SQL> FLASHBACK DATABASE TO TIMESTAMP(SYSDATE ?5/24);
Which two statements are true? (Choose two.)
A. SYSDATE should not be used with TIMESTAMP.
B. The database must have multiplexed redo log files.
C. The database must be in the MOUNT state to execute the command.
D. The database must be opened with the RESETLOGS option after the fl
ashback operation.
E. The entire database needs to be restored from the most recent back
up before the flashback operation.
Answer: C, D
The database must be mounted in exclusive mode to issue the FLASHB
ACK DATABASE command and must be opened with the RESETLOGS option whe
n finished.
48. You work as a database administrator at Certkiller .com. In your
test database, you find that a user's session is executing a lot of S
QL statements, resulting in the generation of a large number of trace
files. While investigating the reason, you find that SQL trace has b
een enabled at the instance level. You want to disable SQL trace, rem
otely, only for that user session to reduce the volume of trace data
being generated. How do you achieve this objective?
A. by setting the SQL_TRACE parameter to FALSE in the parameter file
B. by using DBMS_MONITOR.SESSION_TRACE_DISABLE to disable the tracing
for the user session
C. by setting the SQL_TRACE parameter to FALSE by using the ALTER SYS
TEM command in the user session
D. by setting the SQL_TRACE parameter to FALSE by using the ALTER SES
SION command in the user session
Answer: B
模塊級別跟蹤:
SQL> exec dbms_monitor.serv_mod_act_trace_enable(service_name =>
'EDGAR', module_name =>
用戶級別跟蹤:
SQL> exec dbms_monitor.client_id_trace_enable(client_id => 'DEMO');
Client_id 就是數據庫中的用戶名。
會話級別跟蹤:SQL> exec dbms_monitor.session_trace_enable(138);138 就
是會話ID.
DBMS_MONITOR 是在Oracle 10g 中引入的內置的程序包,經過該程序包能夠
跟蹤從客戶機到中間層、再到後端數據庫的任何用戶的會話,從而能夠較爲容易
地標識建立大量工做量的特定用戶。
SQL_TRACE 是Oracle 提供的用於進行SQL 跟蹤的手段,是強有力的輔助診斷
工具.在平常的數據庫問題診斷和解決中,SQL_TRACE 是很是經常使用的方法。
大多數時候咱們使用sql_trace 跟蹤當前進程.經過跟蹤當前進程能夠發現當前
操做的後臺數據庫遞歸活動(這在研究數據庫新特性時尤爲有效),
研究SQL 執行,發現後臺錯誤等.
在session 級啓用和中止sql_trace 方式以下:
啓用當前session 的跟蹤:
SQL> alter session set sql_trace=true;
此時的SQL 操做將被跟蹤:
SQL> select count(*) from dba_users;
結束跟蹤:
SQL> alter session set sql_trace=false;
49. You execute the following command to enable a session in resumabl
e mode:
SQL> ALTER SESSION ENABLE RESUMABLE TIMEOUT 60;
What is the impact of a timeout on the statements being suspended?
A. The statements remain suspended for at least 60 seconds.
B. The statements are suspended for 60 seconds and then they are exec
uted.
C. The suspended statements error out if the problem is not rectified
within 60 seconds.
D. The statements are automatically suspended 60 seconds after an err
or is received, and then attempt to execute normally again.
Answer: C
Oracle 提供了一種 方法,當對數據庫執行操做時,出現分配存儲空間失敗的錯
誤時,Oracle 不是簡單的返回錯誤信息,並回滾整個事務,而是將執行的語句
置於懸掛狀態,等待一段時間,在等待時間內,若是問題獲得解決,則語句會繼
續執行下去,若是問題一直沒法解決,則會報錯並回滾。產生SUSPEND 的前提是
當前的session 處於ENABLE RESUMABLE 狀態。並且發出的語句遇到下面三種錯
誤:空閒空間不足、達到最大的MAXEXTENTS 和達到用戶的空間QUOTA 限制。
C 選項,若是在60s 內沒有解決問題,掛起狀態將報錯。按理說A 選項也應該是
對的,就是說掛起狀態會保留至少60s,不知道是否是至少出的錯.
50. You are managing an Oracle Database 10g database that uses Oracle
Managed Files (OMF). You enabled the block change tracking feature f
or the database. Which statement regarding the change tracking file i
s true?
A. One block change tracking file is created for each data file. By d
efault, the file is created in DB_CREATE_FILE_DEST.
B. One block change tracking file is created for each data file. By d
efault, the file is created in BACKGROUND_DUMP_DEST.
C. One block change tracking file is created for the database. By def
ault, the file is created in DB_CREATE_FILE_DEST.
D. One block change tracking file is created for the database. By def
ault, the file is created in BACKGROUND_DUMP_DEST.
Answer: C
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
因爲沒有指定存放路徑,那麼會按照Oracle Managed Files (OMF)參數
DB_CREATE_FILE_DEST 指定的路徑
Oracle managed file (OMF)
A file that is created automatically by the Oracle database server when
it is needed and automatically deleted when it is no longer needed.
如何判斷你的數據庫是否爲支持OMF
SQL> show parameter db_create_file_dest;
若是Value 爲空則不支持,有值則支持。
51. You want to use the SQL Tuning Advisor to generate recommendation
s for badly written SQL statements in your development environment. W
hich three sources can you select for the advisor to analyze? (Choose
three.)
A. Top SQL
B. snapshots
C. SQL Tuning sets
D. index access path
E. optimizer statistics
F. materialized view logs
Answer: A,B,C
SQL 優化指導(SQL Tuning Advisor):提供優化SQL 語句的建議
可使用top sql、snapshots(AWR)、SQL Tuning sets 可供SQL Tuning
Advisor 來分析
結果依據:Copyright &copy; 2004, Oracle10g Administration Workshop II 教
程 351 頁(共604 頁)
Using the SQL Tuning Advisor
• Use the SQL Tuning Advisor to analyze SQL statements and obtain
performance recommendations.
• Sources for SQL Tuning Advisor to analyze:
– Top SQL: Analyzes the top SQL statements currently active
– SQL Tuning Sets: Analyzes a set of SQL statements you provide
– Snapshots: Analyzes a snapshot
– Baselines: Analyzes a baseline
52. The loss of which two types of files may require a recovery with
the RESETLOGS option?(Choose two.)
A. control files
B. password file
C. archived log files
D. system-critical data files for which all the redo entries are
present
E. non-system-critical data files for which all the redo entries
are present
Answer: A, C
幾點總結:(eygle:)
1:只要擁有當前日誌文件,就能夠執行徹底恢復,是否須要resetlogs 方式打開,
取決是否使用備份的控制文件。
2:若是日誌文件沒有損失,能夠經過重建控制文件的方法來完成徹底恢復,這種
狀況下,再也不須要經過resetlogs 方式打開數據庫。
3:若是恢復執行到某一個日誌文件中止,數據庫要以讀寫方式打開,則必須執行
resetlgos 打開。
(warehous:)
select file#,checkpoint_change# from v$datafile;(來自控制文件)
select file#,checkpoint_change# from v$datafile_header;(來自數據文件)
當兩個結果不相等,需open resetlogs,即截斷多餘的scn
53. There was media failure and you need to check the data files for
any block corruption. Which option would you use to create a report o
n any corruptions found within the database?
A. the DBNEWID utility
B. the DBVERIFY utility
C. the ANALYZE command
D. the RMAN REPORT command
E. the RMAN CROSSCHECK command
F. the CHECK_OBJECT procedure of the DBMS_REPAIR package
Answer: B
DBVERIFY:是一種外部命令行實用程序,能夠對脫機或聯機的數據庫執行
物理數據結構完整性檢查。能夠對備份文件與聯機文件(或文件片斷)運行此實
用程序。只能檢查數據文件;不能檢查重作日誌文件
ANALYZE:使用 ANALYZE 命令能夠驗證表或表分區的結構,以及索引或索引
分區的結構。要分析的對象必須位於本地計算機,而且必須是在您本身的方案中,
或者必須擁有ANALYZE ANY 系統權限。CASCADE 選項能夠驗證對象,包括該對象
的全部相關對象。不將塊標記爲軟損壞;只報告軟損壞狀況
RMAN CROSSCHECK:當手工刪除了歸檔日誌之後,Rman 備份會檢測到日誌缺
失,從而沒法進一步繼續執行。因此此時須要手工執行crosscheck 過程,以後
Rman 備份能夠恢復正常。
54. You find that the execution time of reports in your datawarehouse
application is significantly high. You suspect the lack of indexes to
be the reason for the degradation in performance. Which advisory comp
onent would you refer to, in order to determine the appropriate index
es?
A. Memory Advisor
B. Segment Advisor
C. SQL Access Advisor
D. Automatic Workload Repository (AWR)
E. Automatic Database Diagnostic Monitor (ADDM)
Answer: C
你發現你的數據倉庫中的執行報告時間很是慢,你懷疑是缺乏相應的索引,
可使用SQL Access Advisor(SQL 訪問指導)
SQL 訪問指導:處理方案問題並肯定最佳數據訪問路徑(如索引和實體化視
圖) 。實體化視圖=物化試圖
物化視圖是包括一個查詢結果的數據庫對像,它是遠程數據的的本地副本,
或者用來生成基於數據表求和的彙總表。物化視圖存儲基於遠程表的數據,也可
以稱爲快照。
55. You have created a resource plan, PROD_DB_PLAN, with the followin
g consumer groups with the respective plan directives:
Consumer group SALES with CPU_P1as 60 and DEGREE_OF_PARALLELISM as 4.
Consumer group MARKET with CPU_P1 as 20.
Consumer group DEV with CPU_P1 as 20.
Consumer group OTHERS with CPU_P1as 0 and CPU_P2 as 100.
Which two statements are correct in this scenario? (Choose two.)
A.The maximum degree of parallelism for the members of the consumer g
roups is 4.
B.The CPU allocation will always be equal for the consumer groups MAR
KET and DEV.
C.The OTHERS consumer group would get 100% of the CPU if there are un
used level 1 CPU resources.
D.The SALES and MARKET consumer groups would get 100% of the CPU if t
here are unused level 2 CPU resources.
E.The maximum degree of parallelism for the members of the consumer g
roup SALES is 4 with no restriction for the remaining groups.
Answer: C,E
parallelism :平行 restriction :約束
對於b 選項:說明他們最多都佔20%資源,但實際應用中不可能佔用相等的資源
alway 就錯了
56. A user executes a query on the EMP table, which contains thousand
s of rows, to get details about employees in one of the
departments. The user receives the following error:
SQL> SELECT ename FROM emp WHERE deptno=10 ORDER BY sal;
SELECT ename FROM emp WHERE deptno=10 ORDER BY sal
ERROR at line 1:
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/u01/app/oracle/oradata/orcl/temp01.dbf'
What is a possible reason?
A. The tempfile belonging to the default temporary tablespace is miss
ing.
B. The database is opened in restricted mode, so queries are not allo
wed
C. The default temporary tablespace required to execute the query is
offline.
D. The default temporary tablespace required to execute the query is
dropped.
E. The default temporary tablespace required to execute the query is
read-only.
Answer: A
Default tempporay tablespace 不能設置爲read-only,offline 和drop
57. You executed the following command in Recovery Manager (RMAN):
RMAN> RESTORE CONTROLFILE;
Which operation must you perform before this command is executed?
A. back up the control file to trace
B. bring database to the MOUNT state
C. open a connection to the RMAN recovery catalog, which contains the
RMAN metadata for the target database
D. set the database ID (DBID), but only if the DB_NAME parameter asso
ciated with the target database is unique in the recovery catalog
Answer: C
另: 1.使用增量備份只能用rman 在catalog 狀況下,從nomount 就能夠恢復
2.若是不看備份腳本,目前從備份文件或是catalog 信息沒法判斷是差別增
量仍是累計增量的
3. rman>create script sc1{
delete noprompt backup;
backup as compressed backupset full database;
backup archivelog all;}
只有catalog 下狀況用rman>list script names;
1 個catalog 能夠對多庫(至於庫名 DB_NAME 是否惟一需實驗)
rman>run{execute sript sc1}; 能夠寫成批處理裏面
rman>delet copy;
58. Exhibit
Using Database Control, you have scheduled a job to shrink the TRANS
table residing on the TT tablespace. The job would run at 5:00 p.m. e
very Friday. When you examine the space usage of the table after the
completion of the job, you find that the table has not been shrunk. W
hat could have been the reason for this?
A. The tablespace that contains the TRANS table is online.
B. The tablespace that contains the TRANS table is permanent.
C. The tablespace that contains the TRANS table is locally managed.
D. The segment space management of the tablespace that contains the T
RANS table is manual in nature.
Answer: D
Shrink 優勢:
1: shrink 命令讓表縮小,cascade 命令會讓相關的索引也同時縮小。
2: 執行shrink 命令的時候就不須要rebuild index。而執行move 命令以後無
法使用index,因此沒法利用index 查找。要解決這個問題讓index 恢復可使
用的狀態,必須對index 進行rebuild。
3:即便對象所在表空間幾乎沒有空閒空間,shrink 命令也能執行。
SQL> alter table emp shrink space;
Table altered.
SQL> alter table emp move;
AUTOSEG_TST 表空間沒有足夠的空閒空間。
Shrink 缺點:
1.沒法解除行遷移
2.必須是local 管理的自動段管理
3.不能夠是下面的段:
-集羣(cluster)、集羣化表
-包含long 列的物件
-LOB 段
-包含函數索引(function index)的表
另外move 命令的執行時間很短,根據狀況選擇
59. The warning and critical threshold values have been set to 85% an
d 97%, respectively, for one of the tablespaces. The current tablespa
ce space usage is 54%. You modify the warning threshold to be 50 % an
d critical threshold to be 53% in Database Control. Which statement i
s true?
A. The new setting would be applied but no alerts would be raised imm
ediately.
B. The new setting would be applied and an alert would be raised imme
diately.
C. The new setting would be ignored because the tablespace space usag
e is more than the specified threshold value.
D. The new setting would cause an error because the tablespace space
usage is more than the specified threshold value.
Answer: A
當你更改了警告和嚴重的門限後(往小改,已經達到了門限),該更改會立
即生效,可是數據庫不會當即產生告警。
60. You defined the Recovery Manager (RMAN) retention policy to recov
ery window of 7 days by executing the following command:
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
When a backup is performed, what would be the status of this backup a
fter seven days?
A. The backup would be marked as invalid.
B. The backup would be marked as obsolete.
C. The backup would be removed from the media.
D. The backup would be removed from the RMAN repository.
Answer: B
RECOVERY WINDOW 7 設置爲7 天,同時使用命令report obsolete
會列出備份集或者映像副本超出兩天時間過時了php

相關文章
相關標籤/搜索