DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_AUTO_REPORT

Source


1 PACKAGE dbms_auto_report AUTHID CURRENT_USER IS
2 
3   -----------------------------------------------------------------------------
4   --                      global constant declarations                       --
5   -----------------------------------------------------------------------------
6 
7   -- Custom Errors
8   ERR_FIN_CAPTURE        CONSTANT NUMBER := -13554;
9 
10 
11   ------------------------- report_repository_list_xml ------------------------
12   -- NAME:
13   --     report_repository_list_xml
14   --
15   -- DESCRIPTION:
16   --     This function generates an XML list report containing a list of all
17   --     reports from the repository that match the input criteria.
18   --
19   -- PARAMETERS:
20   --     active_since        (IN)   - start of activity period
21   --     active_upto         (IN)   - end of activity period
22   --     snapshot_id         (IN)   - only reports captured during this snap
23   --                                - id to be part of the list
24   --     dbid                (IN)   - only reports captured for this db to be
25   --                                  part of the list
26   --     inst_id             (IN)   - only reports captured for this instance
27   --                                  to be part of the list
28   --     con_dbid            (IN)   - only reports captured for this container
29   --                                  dbid to be part of the list
30   --     session_id          (IN)   - only reports captured for this session
31   --                                  id to be part of the list
32   --     session_serial      (IN)   - only reports captured for this session
33   --                                  serial # to be part of the list
34   --     component_name      (IN)   - name of component whose reports (only)
35   --                                  will be in the list
36   --     key1                (IN)   - reports matching value of key1 to be in
37   --                                  the list
38   --     key2                (IN)   - reports matching value of key2 to be in
39   --                                  the list
40   --     key3                (IN)   - reports matching value of key3 to be in
41   --                                  the list
42   --     report_level        (IN)   - detail level of report
43   --
44   --     base_path           (IN)   - this is the URL path for flex HTML
45   --                                  ressources since flex HTML format
46   --                                  requires to access external files
47   --                                  (java scripts and the flash swf file
48   --                                   itself).
49   --
50   --     top_n_count         (IN)   - maximum no of reports that will be
51   --                                  fetched in the list xml.
52   --
53   --     top_n_rankby        (IN)   - attribute (stats based) on which to
54   --                                  retrieve top N rows to limit size of XML.
55   --                                  1 => elapsed_time, 2 => duration
56   --                                  3 => cpu_time, 4 => io_requests,
57   --                                  5 => io_bytes
58   --
59   --     top_n_detail_count  (IN)   - decide if component (e.g., sql monitor)
60   --                                  detail report in the list should be part
61   --                                  of the list report.
62   --                                  A value (upto 10) indicates the number
63   --                                  of the component detail reports will be
64   --                                  included in the list.
65   --                                  If null, no detail report is included in
66   --                                  the list.
67   --
68   -- RETURN:
69   --     xml list report of all reports from the repository selected based on
70   --     the above criteria
71   --
72   -----------------------------------------------------------------------------
73   FUNCTION report_repository_list_xml(
74     active_since              in date     default NULL,
75     active_upto               in date     default NULL,
76     snapshot_id               in number   default NULL,
77     dbid                      in number   default NULL,
78     inst_id                   in number   default NULL,
79     con_dbid                  in number   default NULL,
80     session_id                in number   default NULL,
81     session_serial            in number   default NULL,
82     component_name            in varchar2 default NULL,
83     key1                      in varchar2 default NULL,
84     key2                      in varchar2 default NULL,
85     key3                      in varchar2 default NULL,
86     report_level              in varchar2 default 'TYPICAL',
87     base_path                 in varchar2 default NULL,
88     top_n_count               in number   default NULL,
89     top_n_rankby              in varchar2 default 'db_time',
90     top_n_detail_count        in number   default  NULL)
91   RETURN xmltype;
92 
93   ------------------------ report_repository_detail_xml -----------------------
94   -- NAME:
95   --     report_repository_detail_xml
96   --
97   -- DESCRIPTION:
98   --     This fn retrieves the stored XML report whose report_id is passed
99   --     as an input to the function. This report could belong to any of the
100   --     components registered with the report capture framework.
101   --
102   -- PARAMETERS:
103   --     rid              (IN)   - id of the report to be returned
104   --
105   --     base_path        (IN)   - this is the URL path for flex HTML
106   --                               ressources since flex HTML format
107   --                               requires to access external files
108   --                               (java scripts and the flash swf file itself).
109   --
110   --
111   -- RETURNS:
112   --     xml report as xmltype
113   -----------------------------------------------------------------------------
114   FUNCTION report_repository_detail_xml(
115     rid              in number    default NULL,
116     base_path        in varchar2  default NULL)
117   RETURN XMLTYPE;
118 
119   FUNCTION report_repository_detail(
120     rid              in number    default NULL,
121     type             in varchar2  default 'XML',
122     base_path        in varchar2  default NULL)
123   RETURN CLOB;
124 
125   ----------------------------- start_report_capture --------------------------
126   -- NAME:
127   --     start_report_capture
128   --
129   -- DESCRIPTION:
130   --     This function changes the mode of execution of the auto report
131   --     capture service to a 'full capture'. This means that in every capture
132   --     cycle, there is no dbtime budget constraint and the capture will run
133   --     for as long as there are more reports to capture, (subject to the
134   --     time-out of the MMON slave).
135   --     This 'full capture' mode of execution can be seen by querying
136   --     dba_hist_reports_control. The full capture mode of execution continues
137   --     even if the db is bounced and will continue till it is explicitly
138   --     ended by running finish_report_capture.
139   --
140   -- PARAMETERS:
141   --     NONE
142   --
143   -----------------------------------------------------------------------------
144   PROCEDURE start_report_capture;
145 
146   ---------------------------- finish_report_capture --------------------------
147   -- NAME:
148   --     finish_report_capture
149   --
150   -- DESCRIPTION:
151   --     This function changes the mode of execution of the auto report
152   --     capture service back to a 'regular capture'. This means that every
153   --     capture cycle will run subject to a dbtime budget constraint.
154   --     This procedure runs one last cycle in 'full capture' mode and then
155   --     changes the execution mode back to regular.
156   --
157   -- NOTE:
158   --     This is a blocking procedure and it will return when the last 'full
159   --     capture' cycle is completed (on each instance in case of RAC).
160   --
161   -- PARAMETERS:
162   --     NONE
163   -----------------------------------------------------------------------------
164   PROCEDURE finish_report_capture;
165 
166 
167   -----------------------------------------------------------------------------
168   --                     INTERNAL UNDOCUMENTED FUNCTIONS                     --
169   --                                                                         --
170   -----------------------------------------------------------------------------
171 
172   ------------------------- finish_report_capture_helper ---------------------
173   FUNCTION finish_report_capture_helper
174   RETURN NUMBER;
175 
176   -------------------------- start_report_capture_helper ---------------------
177   FUNCTION start_report_capture_helper
178   RETURN NUMBER;
179 
180 end;