Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Database 11g.pdf
Скачиваний:
78
Добавлен:
10.06.2015
Размер:
12.69 Mб
Скачать

Lab 12.2: Creating a Job Window  

765

repeat_interval => ‘FREQ=HOURLY;INTERVAL=4’); DBMS_SCHEDULER.ENABLE(‘sys.archivelog_backup’); END;

/

Lab 12.2: Creating a Job Window

This lab shows you how to create and use a job window in the Scheduler. Here are the steps:

1.Create a simple resource plan.

2.Create a job schedule.

3.Create a job window to utilize the resource plan.

4.Open the job window explicitly.

5.Close the job window explicitly.

Here’s a specific example:

1.Create a simple resource plan.

SQL>begin

dbms_resource_manager.create_simple_plan(simple_plan => ‘LNE_PLAN1’, consumer_group1 => ‘LNEGROUP1’, group1_percent => 80, consumer_group2 => ‘LNEROUP2’, group2_percent => 20);

end;

/

PL/SQL procedure successfully completed. SQL>

2.Create a job schedule.

SQL>begin dbms_scheduler.create_schedule(

schedule_name => ‘NIGHTLY_BATCH_SCHEDULE’, start_date => SYSTIMESTAMP, repeat_interval => ‘FREQ=DAILY; BYHOUR=20’, comments => ‘Runs nightly at 9:00 PM’); end;

/

766  Appendix A  n  Lab Exercises

PL/SQL procedure successfully completed.

SQL>

3.Create a job window to utilize the resource plan.

SQL>begin dbms_scheduler.create_window (

window_name => ‘NIGHTLY_BATCH_WINDOW’, resource_plan => ‘LNE_PLAN1’, schedule_name => ‘NIGHTLY_BATCH_SCHEDULE’, duration => INTERVAL ‘10’ HOUR, window_priority => ‘HIGH’);

end;

/

PL/SQL procedure successfully completed. SQL>

4.Open the job window explicitly for a 10-hour duration.

SQL>begin dbms_scheduler.open_window (

window_name => ‘NIGHTLY_BATCH_WINDOW’, duration => INTERVAL ‘600’ MINUTE, force => TRUE);

end; SQL> /

PL/SQL procedure successfully completed.

5.Close the job window explicitly.

SQL> begin dbms_scheduler.close_window (

window_name => ‘NIGHTLY_BATCH_WINDOW’); end;

SQL> /

PL/SQL procedure successfully completed.

Lab 13.1: Using the Locale Builder to Create a New Linguistic Sort 

767

Lab 13.1: Using the Locale Builder to Create a New Linguistic Sort

This lab was created using Windows XP. However, it should also work using Unix (and in fact was tested using Linux).

This lab shows you how to use the Oracle Locale Builder to create a new linguistic sort.

1.Open Oracle Locale Builder.

2.Choose to create a new file, and then choose Linguistic Sort.

3.Select Monolingual Linguistic Sort.

768  Appendix A  n  Lab Exercises

4.Click the Show Existing Definitions button.

5.Choose ASCII7 as the character set/collation name, and then click Open.

6.Change the collation name to your choice, and change the collation ID to a number between 1000 and 2000.

7.Modify a few of the special letters by choosing the Unicode value or copying the glyph.

8.Save the file with a new unique name.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]