Skip to content
September 10, 2012 / doganay

ACL PRIVILEGE TO ROLE

You can specify a role instead of a user as principal in procedures of dbms_network_acl_admin package.

It is so handy when you deal with so many users. Here there is an example. Role name is PRINCIPAL_ROLE:

 
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL
(acl => '/sys/acls/my.xml',
description => 'DESCRIPTION',
principal => 'PRINCIPAL_ROLE',
is_grant => true,
privilege => 'connect');

DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE
(acl => '/sys/acls/my.xml',
principal => 'PRINCIPAL_ROLE',
is_grant => true,
privilege => 'resolve');

commit;
END;
/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: