Wednesday 11 March 2015

How to connect Oracle SQL Developer to PostgreSQL database?


As Oracle users many of us are familiar with Oracle SQL Developer. But when we move to PostgreSQL we use PgAdmin as a GUI client to connect to PostgreSQL database.
If our use case is simple, soon we will start missing SQL Developer as it was better compared to PgAdmin. Good news is with SQL Developer 4.0.1.14 we can connect to PostgreSQL database.
Though it will not give you complete Oracle kind of experience it is worth giving a try if you are used to SQL Developer.

Following are the steps to configure Oracle SQL Developer with PostgreSQL Server.

1. Download PostgreSQL JDBC driver from the following link.

https://jdbc.postgresql.org/download.html

2. Open Oracle SQL Developer.

3. Goto Tools->Preferences as shown below.



4. Goto Database->Third Party JDBC Drivers as shown below.



5. Click on Add Entry and Navigate to the folder where you have downloaded the JDBC driver as part of step #1.

6. Click OK.

7. Now you will be able to create connections to PostgreSQL database using the new tab shown in the connection window as shown below.





6 comments:

  1. The "Choose Database" field is not editable and does not allow entering the remote database for connection. How to make?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. There is an alternative, performing the modification of the saved connection, through the connections.xml file.

      Step:
      1 - Save the connection to PostgreSQL in SQL Developer to add connection information in connections.xml by filling in the fields;
      2 - open the connections.xml file (~/.sqldeveloper/system4.0.3.16.84/o.jdeveloper.db.connection.12.2.1.0.42.151001.541/connections.xml)
      3 - find added entry and add the database in line
      ex:
      Old: jdbc:postgresql://host123:5432/
      New: jdbc:postgresql://host123:5432/database
      4 - Close and open SQL Developer to load the information added to the connections.xml file.

      Delete
  2. Fantástico, finalmente funcionou

    ReplyDelete
  3. This works exceptés for big tables or big data sets: SQL dev Troyes to read all data un memory !
    To fix that the only way I found is to modify pgjdbc driver:
    - autocommit=false
    - Fetchsize > 0
    - autosave = always

    Sorting columns, or filtering is still KO, but it works !

    ReplyDelete
  4. How to Solve PostgreSQL Configuration Issue in SQL Developer? Contact to Postgres SQL Support for Windows
    If you are unable to solve PostgreSQL configuration issue in SQL developer then quickly contact to Cognegic’s Postgres SQL Support for Linux or PostgreSQL Relational Database Service to fetch the best solution regarding configuration. There are several reasons why clients choose our premium support as compared to other support because we provide easy and quick service within estimated time period. Here we also provide PostgreSQL Remote Database Service and easily solve your all technical issue.
    For More Info: https://cognegicsystems.com/
    Contact Number: 1-800-450-8670
    Email Address- info@cognegicsystems.com
    Company’s Address- 507 Copper Square Drive Bethel Connecticut (USA) 06801

    ReplyDelete