DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_SQLPATCH

Source


1 PACKAGE dbms_sqlpatch AS
2 
3   -- Performs any initialization necessary for the given patch, including
4   -- the initial insert to the SQL registry.  Parameters:
5   -- patch_id/patch_uid: patch ID/universal patch id
6   -- flags: patch flags
7   -- description: patch description as recorded in binary registry
8   -- action: APPLY or ROLLBACK
9   -- logfile: Full path to logfile
10   -- bndl_series: For a bundle patch, the bundle series.
11   -- bnld_xml: For a bundle patch, the full path to the bundledata.xml
12   PROCEDURE patch_initialize(p_patch_id IN NUMBER,
13                              p_patch_uid IN NUMBER,
14                              p_flags IN VARCHAR2,
15                              p_description IN VARCHAR2,
16                              p_action IN VARCHAR2,
17                              p_logfile IN VARCHAR2,
18                              p_bundle_series IN VARCHAR2 DEFAULT NULL);
19 
20   -- Performs any finalization necessary for the current patch.  This
21   -- includes clearing the package state and updating the SQL registry.
22   PROCEDURE patch_finalize;
23 
24   -- For the current patch and mode under consideration, determines if the
25   -- given file should be run or not.  Returns the name of the file to be
26   -- run, which will either be the supplied input file (prefixed with
27   -- top_directory supplied during initialisze) or
28   -- dbms_registry.nothing_script if the file does not need to be run.
29   FUNCTION install_file(sql_file IN VARCHAR2)
30     RETURN VARCHAR2;
31 
32   -- Returns a hash string representing the current state of the SQL
33   -- registry (i.e. a list of the BLRs installed successfully or not, and
34   -- the current bundle ID for any bundles).  This is used to compare the
35   -- SQL registry upon PDB plug in
36   FUNCTION sql_registry_state RETURN XMLType;
37 
38   -- Wrapper around queryable inventory's get_pending_activity function.
39   -- Returns an XML string representing the state of SQL patches installed
40   -- in the opatch inventory.
41   FUNCTION opatch_registry_state RETURN XMLType;
42 
43   -- Wrapper around queryable inventory's get_opatch_lsinventory function.
44   -- Returns an XML string consisting of the entire inventory.  This function
45   -- caches the result for performance.
46   FUNCTION get_opatch_lsinventory RETURN XMLType;
47 
48   -- Performs session initialization.  Must be called before patch_initialize.
49   PROCEDURE session_initialize(p_oh IN VARCHAR2,
50                                p_force IN BOOLEAN := FALSE,
51                                p_debug IN BOOLEAN := FALSE,
52                                p_use_rollback_files IN BOOLEAN := FALSE);
53 
54   -- Tests the queryable inventory functionality.
55   -- If QI is working properly, then the string 'OK' is returned, otherwise
56   -- any errors are returned.
57   FUNCTION verify_queryable_inventory RETURN VARCHAR2;
58 
59   -- 23025340: Because patch_initialize is part of the generated apply and
60   -- rollback scripts, we can't easily change its signature.  Hence this
61   -- procedure is called directly by datapatch.
62   PROCEDURE set_patch_metadata(p_patch_id IN NUMBER,
63                                p_patch_uid IN NUMBER,
64                                p_superseding IN BOOLEAN,
65                                p_patch_descriptor IN XMLType := NULL,
66                                p_patch_directory IN BLOB := NULL);
67 
68   -- Removes all saved state from the dbms_sqlptach_state table.
69   PROCEDURE clear_state;
70 
71 END dbms_sqlpatch;