1 PACKAGE dbms_goldengate_auth AUTHID CURRENT_USER AS
2
3 -- Grants the privileges needed by a user to be an administrator for OGG
4 -- Integration with XStreamOut
5 -- INPUT:
6 -- grantee - the user to whom privileges are granted
7 -- privilege_type - CAPTURE, APPLY, both(*)
8 -- grant_select_privileges - should the select_catalog_role be granted?
9 -- do_grants - should the privileges be granted ?
10 -- file_name - name of the file to which the script will be written
11 -- directory_name - the directory where the file will be written
12 -- grant_optional_privileges - comma-separated list of optional prvileges
13 -- to grant: XBADMIN, DV_XSTREAM_ADMIN,
14 -- DV_GOLDENGATE_ADMIN
15 -- OUTPUT:
16 -- if grant_select_privileges = TRUE
17 -- grant select_catalog_role to grantee
18 -- if grant_select_privileges = FALSE
19 -- grant a min set of privileges to grantee
20 -- if do_grants = TRUE
21 -- the grant statements are to be executed.
22 -- if do_grants = FALSE
23 -- the grant statements are not executed.
24 -- If file_name is not NULL,
25 -- then the script is written to it.
26 -- NOTES:
27 -- An error is raised if do_grants is false and file_name is null.
28 -- The file i/o is done using the package utl_file.
29 -- The file is opened in append mode.
30 -- The CREATE DIRECTORY command should be used to create directory_name.
31 -- If do_grant is true, each statement is appended to the script
32 -- only if it executed successfully.
33 PROCEDURE grant_admin_privilege(
34 grantee IN VARCHAR2,
35 privilege_type IN VARCHAR2 DEFAULT '*',
36 grant_select_privileges IN BOOLEAN DEFAULT TRUE,
37 do_grants IN BOOLEAN DEFAULT TRUE,
38 file_name IN VARCHAR2 DEFAULT NULL,
39 directory_name IN VARCHAR2 DEFAULT NULL,
40 grant_optional_privileges IN VARCHAR2 DEFAULT NULL,
41 container IN VARCHAR2 DEFAULT 'CURRENT');
42
43 -- Revokes the privileges needed by a user to be an administrator for OGG
44 -- Integration with XStreamOut
45 -- INPUT:
46 -- grantee - the user from whom privileges are revoked
47 -- privilege_type - CAPTURE, APPLY, both(*)
48 -- revoke_select_privileges - should the select_catalog_role be revoked?
49 -- do_revokes - should the privileges be revoked ?
50 -- file_name - name of the file to which the script will be written
51 -- directory_name - the directory where the file will be written
52 -- revoke_optional_privileges - comma-separated list of optional prvileges
53 -- to revoke: XBADMIN, DV_XSTREAM_ADMIN,
54 -- DV_GOLDENGATE_ADMIN
55 -- OUTPUT:
56 -- if revoke_select_privileges = TRUE
57 -- revoke select_catalog_role from grantee
58 -- if revoke_select_privileges = FALSE
59 -- revoke a min set of privileges from grantee
60 -- if do_revokes = TRUE
61 -- the revoke statements are to be executed.
62 -- if do_revokes = FALSE
63 -- the revoke statements are not executed.
64 -- If file_name is not NULL,
65 -- then the script is written to it.
66 -- NOTES:
67 -- An error is raised if do_grants is false and file_name is null.
68 -- The file i/o is done using the package utl_file.
69 -- The file is opened in append mode.
70 -- The CREATE DIRECTORY command should be used to create directory_name.
71 -- If do_grants is true, each statement is appended to the script
72 -- only if it executed successfully.
73 PROCEDURE revoke_admin_privilege(
74 grantee IN VARCHAR2,
75 privilege_type IN VARCHAR2 DEFAULT '*',
76 revoke_select_privileges IN BOOLEAN DEFAULT TRUE,
77 do_revokes IN BOOLEAN DEFAULT TRUE,
78 file_name IN VARCHAR2 DEFAULT NULL,
79 directory_name IN VARCHAR2 DEFAULT NULL,
80 revoke_optional_privileges IN VARCHAR2 DEFAULT NULL,
81 container IN VARCHAR2 DEFAULT 'CURRENT');
82
83 END dbms_goldengate_auth;