Databases Reference
In-Depth Information
-- All ACLs
SELECT host, lower_port, upper_port, acl
FROM dba_network_acls;
-- Privileges for ACLs
-- Lists which users have access to which ACL
SELECT acl, principal, privilege, is_grant, invert, start_date, end_date
FROM dba_network_acl_privileges;
3. Confirm that your user now has network access by running the following
script, with DBMS_OUTPUT enabled as your current user. You should see
Ok. Have access ” as part of the output.
-- Test that user has network access now
-- Run as APRESS user
-- Determines if current user has access to external connections
-- Makes a simple connection to www.google.com on port 80
-- Result will be in DBMS_OUTPUT
DECLARE
v_connection utl_tcp.connection;
BEGIN
v_connection := utl_tcp.open_connection(remote_host => ' www.google.com', re mote_port => 80);
utl_tcp.close_connection(v_connection);
dbms_output.put_line('Ok: Have Access');
EXCEPTION
WHEN others THEN
IF sqlcode = -24247 THEN
-- ORA-24247: network access denied by access control list (ACL)
dbms_output.put_line('No ACL network access.');
ELSE
dbms_output.put_line('Unknown Error: ' || sqlerrm);
END IF;
END;
/
If you see the message “Ok. Have access,” then all is well. Proceed with creating the example plug-
in.
Building the Region Plug-in
Now that the business requirements have been defined, you can start creating the region plug-in.
Similar to the dynamic action plug-in example in the preceding chapter, some steps will not be covered
on a step-by-step basis as they have already been covered previously.
Initial Configuration and Setup
To start building a region plug-in, create a new plug-in with the attributes listed below. Once you are
finished, click the Create button to save the plug-in.
 
Search WWH ::




Custom Search