SQL Developer connection issue

后端 未结 1 1436
栀梦
栀梦 2020-12-10 23:31

Can anyone to help me resolve the issue with Oracle connection from SQL Oracle Developer. I\'ve installed jdk 1.6.0_45, <

相关标签:
1条回答
  • 2020-12-11 00:05

    Your listener is configured to only listen on localhost (127.0.0.1). By default the database will attempt to register against the server's external host name (the default when local_listener is blank), so registration seems to be failing.

    The listener.ora can be modified to listen on the external address instead:

    LISTENER = 
    (DESCRIPTION_LIST = 
    (DESCRIPTION = 
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) 
    (ADDRESS = (PROTOCOL = TCP)(HOST = ANDRIYPC)(PORT = 1521)) 
    ) 
    ) 
    

    ... or the IP address rather than the host name if that isn't resolvable, e.g. 192.168.1.134; but if you are using DHCP to get your IP address that will break when you're given a different IP. If you're using a static address then using that IP will be OK.

    Alternatively, if you'll only ever access this DB from this PC and don't need it to be visible on the network, you can leave the listener on localhost and tell the DB to register there:

    alter system set local_listener = '127.0.0.1:1521' scope=both;
    alter system register;
    

    Either way, lsnrctl services should now show orcl.adobe.com. When connecting from SQL Developer you can choose the 'Service name' radio button instead of SID, and put orcl.adobe.com in there as well.

    If you're connecting as SYS you'll need to pick the SYSDBA role from the drop-down; but the first thing you should do really is create a new user for yourself and then only use that. Only use SYS (and SYSTEM, and other built-in accounts) for actual DBA tasks, not for creating your own tables etc.

    0 讨论(0)
提交回复
热议问题