Search code examples
oracle-databaseoracle-sqldeveloperacloracle18c

Network access denied at "SYS.DBMS_DEBUG_JDWP"


When trying to save a trigger I get this error

Connecting to the database XE.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '192.168.56.1', '59537' )
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 XE.

I'm just a beginner in working with DB, how can I fix this?


Solution

  • It is about the ACL (as the message says). Here's a walkthrough, see if it helps. I'm using user SCOTT; you'd use your own user.

    SQL> show user
    USER is "SYS"
    SQL>
    SQL> SELECT * FROM dba_network_acls;
    
    no rows selected
    

    Create ACL:

    SQL> BEGIN
      2     DBMS_NETWORK_ACL_ADMIN.create_acl (
      3        acl          => 'xedba.xml',
      4        description  => 'TCP, SMTP, MAIL, HTTP Access',
      5        principal    => 'SCOTT',
      6        is_grant     => TRUE,
      7        privilege    => 'connect',
      8        start_date   => NULL,
      9        end_date     => NULL);
     10  END;
     11  /
    
    PL/SQL procedure successfully completed.
    

    Assign ACL:

    SQL> BEGIN
      2     DBMS_NETWORK_ACL_ADMIN.assign_acl (acl         => 'xedba.xml',
      3                                        HOST        => '*',
      4                                        lower_port  => NULL,
      5                                        upper_port  => NULL);
      6  END;
      7  /
    
    PL/SQL procedure successfully completed.
    

    Add privilege:

    SQL> BEGIN
      2     -- SCOTT
      3     DBMS_NETWORK_ACL_ADMIN.add_privilege (acl         => 'xedba.xml',
      4                                           principal   => 'SCOTT',
      5                                           is_grant    => TRUE,
      6                                           privilege   => 'connect',
      7                                           start_date  => NULL,
      8                                           end_date    => NULL);
      9
     10     DBMS_NETWORK_ACL_ADMIN.add_privilege (acl         => 'xedba.xml',
     11                                           principal   => 'SCOTT',
     12                                           is_grant    => TRUE,
     13                                           privilege   => 'resolve',
     14                                           start_date  => NULL,
     15                                           end_date    => NULL);
     16  END;
     17  /
    
    PL/SQL procedure successfully completed.
    
    SQL> COMMIT;
    
    Commit complete.
    

    Now, you should connect as user which was granted access and run your command again.