ORA-24247 ACL error in Oracle 12c

Printer-friendly versionPDF version

So the debugger was not connecting to debug a PLSQL procedure one day. I knew I had debugged this on Oracle 11g, so it had to work as well on 12c. But the debugger was not connecting and complaining something like below:

 Connecting to the database MYDB_12c.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP('X.X.X.X', '57908')
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database MYDB_12c.

 

Ask Tom showed some very nice queries in the form of below.

  select * from dba_network_acls;
  select * from  dba_network_acl_privileges;

And some further searching revealed this nice question, which listed the steps I was looking for here.

For future reference, even for my own sake, I am quoting the procedure to fix here from link above. And also seems my box had difficulty resolving the name of my dev host machine, giving in the ip finally did the trick.

  begin
    dbms_network_acl_admin.append_host_ace
        (host=>'myIP or myHostName',
         ace=> sys.xs$ace_type( privilege_list=>sys.XS$NAME_LIST('JDWP') ,
                                principal_name=>'scott',
                                principal_type=>sys.XS_ACL.PTYPE_DB) );
   end;

As a side note, to debug a plsql procedure, you also need to have the following grants.

grant debug connect session to scott; 
grant debug any procedure to scott;
grant execute on DBMS_DEBUG_JDWP to scott;

That's it for this episode.

Tags:

Top level category:

Add new comment