1 PACKAGE dbms_auto_task_admin AS
2 -- PUBLIC CONSTANTS
3 --
4 -- Option Flags
5 --
6 OPTFLG_DEFERRED CONSTANT VARCHAR2(16) := 'DEFERRED';
7 OPTFLG_IMMEDIATE CONSTANT VARCHAR2(16) := 'IMMEDIATE';
8
9 --
10 -- Task Priority
11 --
12 PRIORITY_MEDIUM CONSTANT VARCHAR2(6) := 'MEDIUM';
13 -- Task with this priority should be executed as time permits.
14 PRIORITY_HIGH CONSTANT VARCHAR2(6) := 'HIGH';
15 -- Task with this priority should be executed within
16 -- the current Maintenance Window.
17 PRIORITY_URGENT CONSTANT VARCHAR2(6) := 'URGENT';
18 -- Task with this is to be executed at the earliest opportunity.
19 PRIORITY_CLEAR CONSTANT VARCHAR2(6) := 'CLEAR';
20 -- This isepcial priority is used to clear previous settings
21 --
22 -- Settable Attrributes
23 --
24 -- The following two attributes are mutually exclusive
25 -- Setting either one will automatically unset the other
26 LIGHTWEIGHT CONSTANT VARCHAR2(16) := 'LIGHTWEIGHT';
27 HEAVYWEIGHT CONSTANT VARCHAR2(16) := 'HEAVYWEIGHT';
28
29 -- The following two attributes are mutually exclusive
30 -- Setting either one will automatically unset the other
31 VOLATILE CONSTANT VARCHAR2(16) := 'VOLATILE';
32 STABLE CONSTANT VARCHAR2(16) := 'STABLE';
33
34 -- The following two attributes are mutually exclusive
35 -- Setting either one will automatically unset the other
36 SAFE_TO_KILL CONSTANT VARCHAR2(16) := 'SAFE_TO_KILL';
37 DO_NOT_KILL CONSTANT VARCHAR2(16) := 'DO_NOT_KILL';
38
39 --
40 -- Attribute value flags
41 --
42 ATTRVAL_TRUE CONSTANT VARCHAR2(5) := 'TRUE';
43 ATTRVAL_FALSE CONSTANT VARCHAR2(5) := 'FALSE';
44
45 -- GET_P1_RESOURCES
46 --
47 -- This procedure returns percent of resources allocated to each
48 -- AUTOTASK High Priority Consumer Group.
49 --
50 -- Values will add up to 100 (percent).
51 --
52 -- This procedure is deprecated starting 12.1
53 PROCEDURE GET_P1_RESOURCES (
54 STATS_GROUP_PCT OUT NUMBER, -- %resources for Statistics Gathering
55 SEG_GROUP_PCT OUT NUMBER, -- %resources for Space Management
56 TUNE_GROUP_PCT OUT NUMBER, -- %resources for SQL Tuning
57 HEALTH_GROUP_PCT OUT NUMBER -- %resources for Health Checks
58 );
59
60 -- SET_P1_RESOURCES
61 --
62 -- This procedure sets percentage-based resource allocation for each
63 -- High Priority Consumer Group used by AUTOTASK Clients.
64 --
65 -- Values must be integers in the range 0 to 100, and must add up to 100
66 -- (percent), otherwise, an exception is raised.
67 --
68 -- This procedure is deprecated starting 12.1
69 PROCEDURE SET_P1_RESOURCES (
70 STATS_GROUP_PCT IN NUMBER, -- %resources for Statistics Gathering
71 SEG_GROUP_PCT IN NUMBER, -- %resources for Space Management
72 TUNE_GROUP_PCT IN NUMBER, -- %resources for SQL Tuning
73 HEALTH_GROUP_PCT IN NUMBER -- %resources for Health Checks
74 );
75
76 -- SET_CLIENT_SERVICE API
77 --
78 -- This procedure associates an AUTOTASK Client with a specified Service.
79 -- All work performed on behalf of the Client will take place only on
80 -- instances where the service is enabled.
81 --
82 PROCEDURE SET_CLIENT_SERVICE (
83 CLIENT_NAME IN VARCHAR2, -- name of the client, as found in
84 -- DBA_AUTOTASK_CLIENT View.
85 SERVICE_NAME IN VARCHAR2 -- Service name for client, may be NULL
86 );
87
88 --GET_CLIENT_ATTRIBUTES API
89 --
90 -- This procedure returns values of select client attributes.
91 --
92 PROCEDURE GET_CLIENT_ATTRIBUTES (
93 CLIENT_NAME IN VARCHAR2, -- name of the client, as found in
94 -- DBA_AUTOTASK_CLIENT View.
95 SERVICE_NAME OUT VARCHAR2, -- Service name for client, may be NULL
96 WINDOW_GROUP OUT VARCHAR2 -- Name of the window group in which
97 -- the client is active
98 );
99
100 --
101 -- DISABLE API
102 -- This interface prevents Autotask from executing any requests
103 --
104
105 -- Disabling AUTOTASK
106 --
107 -- This version completely disables all AUTOTASK functionality.
108 -- If "IMMEDIATE" is specified, all running AUTOTASK jobs will be stopped.
109 --
110 PROCEDURE DISABLE;
111
112
113 -- Disabling an AUTOTASK Client
114 -- (optionally, only affecting one maintenance window)
115 -- (optionally, disabling a specific Operation for a Client)
116 --
117 -- This version disables specified a client.
118 -- Either a specific operation or a maintenance window name, but
119 -- not both, are meaningful.
120 -- If an operation is disabled, tasks specifying this operation
121 -- will not be performed. WINDOW_NAME is ignored for OPERATION.
122 --
123 -- If a window name is specified, client will be disabled in the
124 -- specified window.
125 --
126 PROCEDURE DISABLE (
127 CLIENT_NAME IN VARCHAR2, -- name of the client, as found in
128 -- DBA_AUTOTASK_CLIENT View.
129 OPERATION IN VARCHAR2, -- Name of the operation as specified in
130 -- DBA_AUTOTASK_OPERATION View
131 WINDOW_NAME IN VARCHAR2 -- optional name of the window in which
132 -- client is to be disabled
133 );
134
135 -- ENABLE API
136 --
137 -- This interface allows a previously disabled client, operation,
138 --
139
140 -- Re-Enabling AUTOTASK
141 PROCEDURE ENABLE;
142
143 --
144 -- Re-Enabling a Client
145 -- Optionally, re-enabling an Operation
146 -- Optionally, re-enabling a Client in a specific maintenance window
147 --
148 -- Either a specific operation or a maintenance window name, but
149 -- not both, may be specified.
150 --
151 PROCEDURE ENABLE (
152 CLIENT_NAME IN VARCHAR2, -- name of the client, as found in
153 -- DBA_AUTOTASK_CLIENT View.
154 OPERATION IN VARCHAR2, -- Name of the operation as specified in
155 -- DBA_AUTOTASK_OPERATION View
156 WINDOW_NAME IN VARCHAR2 -- optional name of the window in
157 -- which the client is to be enabled.
158 );
159
160
161 -- OVERRIDE_PRIORITY API
162 --
163 -- This API is used to manually override task priority. This can be done
164 -- at the client, operation or individual task level. This priority assignment
165 -- will be honored during the next maintenance window in which the named
166 -- client is active. Specifically, setting the priority to Urgent will cause
167 -- a high priority job to be generated at the start of the maintenance window.
168 --
169 -- The following priorities are defined:
170 -- PRIORITY_MEDIUM - 'time permitting'
171 -- PRIORITY_HIGH - normal priority
172 -- PRIORITY_URGENT - 'ASAP'
173 --
174 -- Setting PRIORITY to PRIORITY_CLEAR removes the override.
175 --
176 -- These procedures are deprecated starting 12.1
177
178 -- Override Priority for a Client (deprecated)
179 PROCEDURE OVERRIDE_PRIORITY (
180 CLIENT_NAME IN VARCHAR2, -- name of the client as found in
181 -- DBA_AUTOTASK_CLIENT View.
182 PRIORITY IN VARCHAR2 -- See above.
183 );
184
185 -- Override Priority for an Operation (deprecated)
186 PROCEDURE OVERRIDE_PRIORITY (
187 CLIENT_NAME IN VARCHAR2, -- name of the client as found in
188 -- DBA_AUTOTASK_CLIENT View.
189 OPERATION IN VARCHAR2, -- Name of the operation as specified in
190 -- DBA_AUTOTASK_OPERATION View
191 PRIORITY IN VARCHAR2 -- See above
192 );
193
194
195 -- SET_ATTRIBUTE API
196 --
197 -- This API is used to set boolean attributes for a Client, Operation, or Task.
198 -- The following attributes may be set:
199 -- LIGHTWEIGHT
200 -- HEAVYWEIGHT
201 -- - seting either of the above attributes ON, turns the other OFF
202 -- VOLATILE
203 -- STABLE
204 -- - seting either of the above attributes ON, turns the other OFF
205 -- SAFE_TO_KILL
206 -- DO_NOT_KILL
207 -- - seting either of the above attributes ON, turns the other OFF
208 --
209 -- Setting attributes for a Client
210 PROCEDURE SET_ATTRIBUTE (
211 CLIENT_NAME IN VARCHAR2, -- Name of the client as found in
212 -- DBA_AUTOTASK_CLIENT View.
213 ATTRIBUTE_NAME IN VARCHAR2, -- Attribute to be set
214 ATTRIBUTE_VALUE IN VARCHAR2 -- Attribute value, "TRUE", "FALSE"
215 );
216
217 -- Setting attributes for an Operation
218 PROCEDURE SET_ATTRIBUTE (
219 CLIENT_NAME IN VARCHAR2, -- Name of the client as found in
220 -- DBA_AUTOTASK_CLIENT View.
221 OPERATION IN VARCHAR2, -- Name of the operation as in
222 -- DBA_AUTOTASK_OPERATION View
223 ATTRIBUTE_NAME IN VARCHAR2, -- Attribute to be set
224 ATTRIBUTE_VALUE IN VARCHAR2 -- Attribute value, "TRUE", "FALSE"
225 );
226 --
227 -- DEFAULT_RESET API
228 --
229 -- This API is used to re-set AUTOTASK configuration settting to
230 -- factory defaults.
231 --
232 -- To reset all AUTOTASK configuration sttings, use
233 -- DEFAULT_RESET('ALL');
234 -- To reset specific client's configuration settings
235 -- DEFAULT_RESET('client name');
236 -- To reset specific operation settings,
237 -- DEFAULT_RESET('client name', 'operation name');
238 --
239 PROCEDURE DEFAULT_RESET (
240 CLIENT_NAME IN VARCHAR2, -- Name of the client as found in
241 -- DBA_AUTOTASK_CLIENT View or 'ALL'.
242 OPERATION_NAME IN VARCHAR2 DEFAULT 'ALL'
243 -- Name of the operation as in
244 -- DBA_AUTOTASK_OPERATION View or 'ALL'
245 );
246
247 end dbms_auto_task_admin;