Skip to content

Getting rid of network acces issues after migrating to Oracle 11.2

Are you experiencing network access issues after a migration to Oracle Database 11g Release 2 (11.2)? If yes, you have to make sure the concerned PL/SQL packages get access to your network again. This posting will show you how.

While migrating to Oracle 11 Release 2, the following PL/SQL packages will not be allowed to get network accesses anymore (security restrictions): UTL_TCP, UTL_HTTP, UTL_SMTP, and UTL_MAIL. This is why you will have to create network ACLs (Access Control Lists) after the migration.

You can do this with the package dbms_network_acl_admin. However, to compile this package, XDB must be installed on the database. Below is an example how to install XDB:

connect / as SYSDBA
@$ORACLE_HOME/rdbms/admin/catqm.sql xdb SYSAUX TEMP

“xdb” is the password for the XDB user.
“SYSAUX” stands for the tablespace where XDB will be installed.
“TEMP” simply is the temporary tablespace.

Now, you are ready to start:

connect / as SYSDBA
@$ORACLE_HOME/rdbms/admin/catxdbj.sql;
@$ORACLE_HOME/rdbms/admin/catrul.sql;

From this point on, the network ACLs can be configured. Below is an example for a full public network access, allowing all Oracle users (PUBLIC) to resolve and connect to any kind of servers (‘*’):

SQL> begin
begin
 dbms_network_acl_admin.drop_acl(
 acl =>         'all-network-PUBLIC.xml'
 );
 exception
 when others then null;
 end;
 dbms_network_acl_admin.create_acl(
 acl =>         'all-network-PUBLIC.xml',
 description => 'Network connects for all',
 principal =>   'PUBLIC',
 is_grant =>    true,
 privilege =>   'connect'
 );
 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
 acl =>         'all-network-PUBLIC.xml',
 principal =>   'PUBLIC',
 is_grant  =>   true,
 privilege =>   'resolve'
 );
 dbms_network_acl_admin.assign_acl(
 acl =>         'all-network-PUBLIC.xml',
 host =>        '*'
 );
end;
/

Have a successful migration to Oracle 11.2!

Best regards,
Yann

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Oracle Team

Oracle Team

Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.View Author posts

1,009 posts since December 2010

Most read in Database

The Database posts our readers open most: the all-time favourites, and what is trending right now.

Leave a Comment

Your email address will not be published. Required fields are marked *