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

Oracle SQL Developer新建连接失败求助:Cannot create new connection

Troubleshooting "Cannot create new connection" in Oracle SQL Developer

Hey there, sorry you're stuck with this connection issue—let's walk through the most common fixes to get you up and running.

1. Double-check your connection details (the #1 culprit!)

Small typos or mix-ups here are super common. Verify:

  • Username/Password: Oracle credentials are case-sensitive if you enabled that during database setup—make sure you’re entering them exactly as configured.
  • Hostname: For local databases, try localhost or 127.0.0.1 instead of a network name if you’re having trouble resolving it. For remote servers, confirm the correct IP/hostname with your DBA.
  • Port: The default is 1521, but if your database uses a custom port, cross-check with your setup notes.
  • SID vs Service Name: Don’t confuse these two! Newer Oracle versions often use pluggable database service names (like ORCLPDB1) instead of the traditional SID (ORCL). Try both if you’re unsure.

2. Confirm the Oracle Database & Listener are running

If your database isn’t active, you can’t connect at all:

  • Windows: Open the Services app (search "Services" in the Start menu), look for OracleService[YourDBName] and OracleOraDB[Version]Home1TNSListener—both should show "Running".
  • Linux/macOS: Run these terminal commands to check status:
    # Check if the database is open
    sqlplus / as sysdba
    SQL> select status from v$instance;
    # Should return 'OPEN'
    
    # Check listener status
    lsnrctl status
    # Look for "READY" next to your database service entry
    

3. Ensure JDBC drivers are configured correctly

SQL Developer usually includes built-in drivers, but they might be missing or outdated for newer database versions:

  • Go to Tools > Preferences > Database > Third Party JDBC Drivers in SQL Developer.
  • If you don’t see an Oracle driver (named ojdbc*.jar), add it manually. You can find this file in your Oracle database installation folder under ORACLE_HOME/jdbc/lib.

4. Check firewall settings

If your database is on a remote server, your local firewall might be blocking port 1521. Temporarily disable your firewall (or add an exception for SQL Developer/Oracle’s port) to test if this is the issue.

5. Repair or reinstall SQL Developer

Corrupted installations can cause weird connection glitches:

  • Uninstall SQL Developer completely, delete leftover folders (like C:\Users\<YourName>\AppData\Roaming\SQL Developer on Windows), then download the latest version and reinstall.
  • Also, confirm you’re using a compatible Java version: SQL Developer 22+ requires Java 11 or higher. Check your version with java -version in terminal.

6. Test connectivity with TNSPing (Windows)

Run tnsping <your_service_name> in Command Prompt. If it returns "OK", your network connection to the listener is working. If not, your tnsnames.ora file (found in ORACLE_HOME/network/admin) might be misconfigured. A valid entry should look like this:

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )

If none of these steps fix the problem, sharing the exact error message you’re seeing would help narrow things down even further!

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 04:04:51