DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_ILM

Source


1 package dbms_ilm authid current_user is
2 
3     /* constants specifying ROW ARCHIVAL state */
4     archive_state_active   constant varchar2(1) := '0';
5     archive_state_archived constant varchar2(1) := '1';
6 
7     /*
8      *  description - Given a value for the ORA_ARCHIVE_STATE column this
9      *   function returns the mapping for the value.
10      *
11      *  value - "0", "1" or other values from the ORA_ARCHIVE_STATE column of
12      *          a row archival enabled table
13      *  returns either "archive_state_active" or "archive_state_archived"
14      */
15     function archiveStateName(value in varchar2) return varchar2;
16 
17     /* constants specifying the scope of ilm execution*/
18 
19     /* execute all ilm policies in the database */
20     SCOPE_DATABASE  constant  number  :=  1;
21     /* execute all ilm policies in the scope */
22     SCOPE_SCHEMA    constant  number  := 2;
23 
24     /* ILM Execution mode constants */
25     ILM_EXECUTION_OFFLINE  constant number      := 1;
26     ILM_EXECUTION_ONLINE   constant number      := 2;
27     ILM_EXECUTION_DEFAULT  constant number      := 3;
28 
29     /* Constant specifying all ILM policies of an object*/
30     ILM_ALL_POLICIES     constant varchar2(20) := 'ALL POLICIES';
31 
32     /* constants specifying when ILM task should be scheduled */
33 
34     /* Schedule ILM task for immediate execution */
35     SCHEDULE_IMMEDIATE  constant number := 1;
36 
37 
38      procedure preview_ilm(
39           task_id              out         number,
40           ilm_scope            in          number default SCOPE_SCHEMA
41           );
42     /*
43      *  description - Evaluate all ilm policies in the scope specified
44      *  through an argument
45      *
46      * ilm_scope - identifies the scope of execution. should be a constant
47      *  specified in the package definition
48      * execution_id - Identifies a particular execution of ILM
49      */
50 
51 
52     procedure add_to_ilm(
53            task_id            in    number,
54            own                in    varchar2,
55            objname            in    varchar2,
56            subobjname         in    varchar2 default null);
57     /*
58      * description - Add an object to a particular ILM task
59      *
60      * p_execution_id - Identify the particular ILM task
61      * own            - owner of the object
62      * objname        - name of the object
63      * subobjname     - name of the subobject (partition name in the case of
64      *                    partitioned tables)
65      */
66 
67       procedure remove_from_ilm(
68            task_id            in    number,
69            own                in    varchar2,
70            objname            in    varchar2,
71            subobjname         in    varchar2 default null);
72     /*
73      * description - Remove an object to a particular ILM task
74      *
75      * execution_id   - Identify the particular ILM task
76      * own            - owner of the object
77      * objname        - name of the object
78      * subobjname     - name of the subobject (partition name in the case of
79      *                    partitioned tables)
80      */
81 
82      procedure execute_ilm_task(
83           task_id              in         number,
84           execution_mode       in         number default ILM_EXECUTION_ONLINE,
85           execution_schedule   in         number default SCHEDULE_IMMEDIATE);
86     /*
87      *  description - execute all ilm policies in a previously evaluated
88      *                ILM task. The ILM policies would not be evaluated again
89      *
90      *
91      *  execution_id        - Identifies an ILM task
92      *  execution_schedule  - Identifies when the ILM task should be executed.
93      *                        The choices available are identified using
94      *                        constants defined in the package. The choices
95      *                        include , schedule the ILM task for immediate
96      *                        execution or use the background ILM scheduling
97      *                        infrastructure to schedule the ILM task execution
98      */
99 
100      procedure execute_ilm(
101          task_id             out         number,
102          ilm_scope           in          number  default SCOPE_SCHEMA,
103          execution_mode      in          number  default ILM_EXECUTION_ONLINE
104          );
105     /*
106      *  description - execute all ilm policies in the scope specified
107      *  through an argument
108      *
109      * ilm_scope - identifies the scope of execution. should be a constant
110      *  specified in the package definition
111      * execution_id - Identifies a particular execution of ILM
112      */
113 
114      procedure execute_ILM(
115        owner          in     varchar2,
116        object_name    in     varchar2,
117        task_id        out    number,
118        subobject_name in     varchar2 default null,
119        policy_name    in     varchar2 default ILM_ALL_POLICIES,
120        execution_mode in     number   default ILM_EXECUTION_ONLINE
121        );
122     /*
123      * description - execute all ilm policies for an object in the calling
124      * schema.
125      *
126      * owner          - owner of the object
127      * object_name    - name of the object
128      * subobject_name - name of the subobject (partition name in the case of
129      *                    partitioned tables)
130      */
131 
132     procedure stop_ilm (
133          task_id               in         number,
134          p_drop_running_jobs   in         boolean default false );
135     /*
136      * description - stop ilm related jobs created for a specific
137      *               executio.
138      *
139      *
140      * execution_id        -  number that uniquely identifies a particular
141      *                        ilm execution
142      * p_drop_running_jobs - should running jobs be dropped?
143      */
144 
145     /*****************************************************************
146      * Activity Tracking
147      *****************************************************************/
148 
149      procedure flush_all_segments;
150     /*
151      * description - flush all in-memory segment access tracking info
152      */
153 
154      procedure flush_segment_access(owner_name IN VARCHAR2,
155                                     object_name IN VARCHAR2,
156                                     subobject_name IN VARCHAR2 default NULL);
157     /*
158      * description: flush in-memory access tracking info for the object
159      *
160      *  owner_name  - Name of the object owner
161      *  object_name - Name of the object
162      *  subobject_name - Name of the sub-object e.g. partition name
163      */
164 
165      procedure flush_rowmaps;
166     /*
167      * description - flush all in-memory segment rowid bitmaps info
168      */
169 
170      procedure flush_segment_rowmap(owner_name IN VARCHAR2,
171                                     object_name IN VARCHAR2,
172                                     subobject_name IN VARCHAR2 default NULL);
173     /*
174      * description: flush in-memory rowid bitmap for the object
175      *
176      *  owner_name  - Name of the object owner
177      *  object_name - Name of the object
178      *  subobject_name - Name of the sub-object e.g. partition name
179      */
180 
181     /* exceptions:
182      *
183      * dbms_ilm api operations can raise any one of the following top-level
184      * exceptions.
185      *
186      */
187      /* invalid arugment value */
188      invalid_argument_value  exception;
189      pragma exception_init(invalid_argument_value, -38327);
190 
191      /* inconsistent dictionary state */
192      invalid_ilm_dictionary  exception;
193      pragma exception_init(invalid_ilm_dictionary, -38328);
194 
195      /* internal error */
196      internal_ilm_error      exception;
197      pragma exception_init(internal_ilm_error, -38329);
198 
199      /* insufficient privileges */
200      insufficient_privileges exception;
201      pragma exception_init(insufficient_privileges, -38330);
202 
203      /* ADO online mode unsupported with Supplemental Logging */
204      unsupported_ilm_supl    exception;
205      pragma exception_init(unsupported_ilm_supl, -38343);
206 
207 end dbms_ilm;