In an online transaction processing (OLTP) environment, you find that the transaction tables get heavily fragmented during the week. You decide to defragment the transaction tables on every Friday at 9:30 p.m. to gain performance. Which two new features of the Oracle 10g database could you use to automate this task? (Choose two)
A.
The DBMS_AQ package
B.
The DBMS_JOB package
C.
The OS level job automation tool
D.
The DBMS_SCHEDULER package
E.
Enterprise Manager job scheduling
Explanation:
D) Oracle 10g’s new DBMS_SCHEDULER package offers significant improvements over DBMS_JOB for scheduling jobs and tasks.
Here is an example of scheduling with DBMS_SCHEDULER. Note that the syntax is now much clearer, and the parameters even now make sense when compared to DBMS_JOB. And gone at last is that wacky INTERVAL parameter! BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => ‘HR_STATS_REFRESH’ ,job_type => ‘PLSQL_BLOCK’ ,job_action => ‘BEGIN
DBMS_STATS.GATHER_SCHEMA_STATS(“HR”);END;’,start_date =>’09/01/2004
09:30 PM’ ,repeat_interval => ‘WEEKLY BYDAY=5′ ,enabled => TRUE ,comments => Refreshes the HR Schema every Friday at 9.30 PM’);END; Not B: DBMS_JOB is not new with 10g)