You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac端SQL Developer登录失败求助:网络适配器无法建立连接及配置疑问

Hey there, let's tackle this connection issue step by step — I've been through this exact problem on Mac before, so I know the ropes. Here's how to get your SQL Developer connected properly by setting up Oracle Instant Client:

Fixing "The Network Adapter could not establish the connection" on MacOS (SQL Developer + Instant Client)

Step 1: Install & Configure Oracle Instant Client

First, make sure you download the right version of Instant Client that matches your Oracle database (e.g., 19c, 21c) — pick the MacOS build (Intel or Apple Silicon, don't mix them up!). Once downloaded:

  • Unzip the package, then move the extracted folder (like instantclient_19_8) to a permanent location, e.g., /Users/YourUsername/Oracle/ (create the Oracle folder if it doesn't exist).
  • Open Terminal to set up environment variables:
    Edit your shell config file (use ~/.bash_profile for bash, ~/.zshrc for zsh):
    open -e ~/.zshrc
    
    Add these lines (replace the path with your actual Instant Client folder location):
    export ORACLE_HOME=/Users/YourUsername/Oracle/instantclient_19_8
    export PATH=$ORACLE_HOME:$PATH
    export DYLD_LIBRARY_PATH=$ORACLE_HOME
    
    Save the file, then apply the changes immediately:
    source ~/.zshrc
    
    Verify the setup by running echo $ORACLE_HOME — it should output the path you just set.

Launch SQL Developer and update its preferences to use the Instant Client:

  • Open Preferences (use the shortcut Cmd+, or go to the top menu bar > SQL Developer > Preferences).
  • Navigate to Database > Advanced in the left sidebar.
  • Under the Oracle Client section, click Browse and select your Instant Client folder.
  • Click OK to save, then restart SQL Developer to apply the changes.

Step 3: Double-Check Your Connection Parameters

More often than not, the error comes from incorrect connection details, not the client setup:

  • Confirm the Hostname is the correct IP or domain of your Oracle server (no typos!).
  • Verify the Port — Oracle's default is 1521, but if your DBA changed it, use that instead.
  • Don't mix up SID and Service Name! Most modern Oracle setups use service names; ask your DBA for the correct one, or check the server's lsnrctl status output if you have access.
  • Test network connectivity: Run telnet YourServerIP 1521 in Terminal. If it connects, the port is open; if not, check the server's firewall settings.

Step 4: Troubleshoot If It Still Fails

  • Ensure version compatibility: SQL Developer 21.2+ works best with Instant Client 19c and above. Avoid pairing ancient versions of either.
  • For Apple Silicon (M-series chips): You must download the ARM-specific Instant Client build — Intel builds will cause compatibility issues.
  • Check SQL Developer logs: Go to Help > View Log to see detailed error messages, which often reveal hidden issues like missing libraries or invalid paths.

Pro tip: If you need an Oracle account to download Instant Client, just sign up for a free one on their site — it takes two minutes tops.

内容的提问来源于stack exchange,提问作者imARIEL777

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 12:09:08