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:
1 2 | 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:
1 2 3 | 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 (‘*’):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 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