Creating the Streams Administrator
Alternately, a series of SQL statements can
be generated that grant various privileges. Using this method
gives the DBA better control over the kinds of privileges that
are granted. For example, the main Streams administrator account
may be created with all of the privileges of database
administrators. However, for another application group or user,
it may be desirable to create additional Streams administrator
accounts with selected privileges only.
The next example shows how to generate the
script file containing the SQL statements that grants various
privileges to the Streams administrator account. By careful
selection of required privileges, the DBA is able create
multiple users with different degree of privileges.
-- First ensure we have a Directory Object
CREATE DIRECTORY admin_dir AS
'/app/oracle/DNYTST10/data'
/
-- generate the Script File
BEGIN
DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE(
grantee =>
'strmadm',
grant_privileges => false,
file_name =>
'grant_strms_privs.sql',
directory_name =>
'admin_dir');
END;
/