1 PACKAGE dbms_streams_auth AUTHID CURRENT_USER AS
2
3 -- Grants the privileges needed by a user to be an administrator for streams.
4 -- Optionally generates a script whose execution has the same effect.
5 -- INPUT:
6 -- grantee - the user to whom privileges are granted
7 -- grant_privileges - should the privileges be granted ?
8 -- file_name - name of the file to which the script will be written
9 -- directory_name - the directory where the file will be written
10 -- OUTPUT:
11 -- If grant_privileges is true, then grantee is added to
12 -- DBA_STREAMS_ADMINISTRATOR with LOCAL_PRIVILEGES set to YES.
13 -- If grant_privileges is false, the grant statements are not executed.
14 -- If file_name is not null, then the script is written to it.
15 -- NOTES:
16 -- An error is raised if grant_privileges is false and file_name is null.
17 -- The file i/o is done using the package utl_file.
18 -- The file is opened in append mode.
19 -- The CREATE DIRECTORY command should be used to create directory_name.
20 -- If grant_privileges is true, each statement is appended to the script
21 -- only if it executed successfully.
22 PROCEDURE grant_admin_privilege(
23 grantee IN VARCHAR2,
24 grant_privileges IN BOOLEAN DEFAULT TRUE,
25 file_name IN VARCHAR2 DEFAULT NULL,
26 directory_name IN VARCHAR2 DEFAULT NULL);
27
28 -- Revokes the privileges needed by a user to be an administrator for streams.
29 -- Optionally generates a script whose execution has the same effect.
30 -- INPUT:
31 -- grantee - the user from whom the privileges are revoked
32 -- revoke_privileges - should the privileges be revoked ?
33 -- file_name - name of the file to which the script will be written
34 -- directory_name - the directory where the file will be written
35 -- OUTPUT:
36 -- If revoke_privileges is true, then set LOCAL_PRIVILEGES to NO for user in
37 -- DBA_STREAMS_ADMINISTRATOR. If user also does not allow ACCESS_FROM_REMOTE
38 -- then remove entry for user from DBA_STREAMS_ADMINISTRATOR.
39 -- DBA_STREAMS_ADMINISTRATOR.
40 -- If revoke_privileges is false, the revoke statements are not executed.
41 -- If file_name is not null, then the script is written to it.
42 -- NOTES:
43 -- An error is raised if revoke_privileges is false and file_name is null.
44 -- The file i/o is done using the package utl_file.
45 -- The file is opened in append mode.
46 -- The CREATE DIRECTORY command should be used to create directory_name.
47 -- If revoke_privileges is true, each statement is appended to the script
48 -- only if it executed successfully.
49 PROCEDURE revoke_admin_privilege(
50 grantee IN VARCHAR2,
51 revoke_privileges IN BOOLEAN DEFAULT TRUE,
52 file_name IN VARCHAR2 DEFAULT NULL,
53 directory_name IN VARCHAR2 DEFAULT NULL);
54
55 -- Grantss the privileges that allow a Streams administrator at another
56 -- database to perform remote Streams administration at this database
57 -- using the grantee through a database link.
58 -- INPUT:
59 -- grantee - the user to whom privileges are granted
60 -- OUTPUT:
61 -- grantee is added to DBA_STREAMS_ADMINISTRATOR with ACCESS_FROM_REMOTE
62 -- set to YES.
63 PROCEDURE grant_remote_admin_access(grantee IN VARCHAR2);
64
65 -- Revokes the privileges that allow a Streams administrator at another
66 -- database to perform remote Streams administration at this database
67 -- using the grantee through a database link.
68 -- INPUT:
69 -- grantee - the user from whom the privileges are revoked
70 -- OUTPUT:
71 -- set ACCESS_FROM_REMOTE to NO for user in DBA_STREAMS_ADMINISTRATOR.
72 -- if user also does not have LOCAL_PRIVILEGES then remove entry for
73 -- user from DBA_STREAMS_ADMINISTRATOR.
74 PROCEDURE revoke_remote_admin_access(grantee IN VARCHAR2);
75
76 END dbms_streams_auth;