Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Unable to establish connectivity to Postgresql data source from ServiceNow - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Unable to establish connectivity to Postgresql data source from ServiceNow
KB0790097

Unable to establish connectivity to Postgresql data source from ServiceNow


5312 Views Last updated : Apr 10, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Unable to establish connectivity to Postgresql data source from ServiceNow.

This article explains how to set up the Data Source and troubleshoot any connectivity issues.

Resolution

Follow the documentation for 'JDBC drivers for unsupported database formats'.

Extend the available JDBC driver options by creating a new choice list entry to specify the JDBC driver Java package name.

  1. Navigate to System Import Sets > Administration > Data Sources.
  2. Click New.
  3. In the Data Sources form, right-click the Format field label, and select Show Choice List from the pop-up menu
  4. Click New in the list of choices.
  5. Provide the following values to create the new database choice. Look at the existing drivers for examples.
    • Table: sys_data_source
    • Label: Database name that appears as an option in the Format choice list, for example: Teradata.
    • Value: Package name and class of the driver. For example, the value for TeraData is com.ncr.teradata.TeraDriver.
  6. Click Submit.(check  screenshot  below)

    The new data source now appears in the list of available JDBC formats.

    Install a driver on a MID Server

    You can install a new JDBC driver JAR file to a MID server to access database formats that are not supported by default.

    1. Navigate to MID Server > JAR Files.
    2. Click New.
    3. Complete the following fields:
      • Name: A unique and descriptive name for identifying the file in the instance.
      • Version: A version number for the file, if one is available.
      • Source: Location of the JAR file for reference purposes. Source information is not used by the system.
      • Description: Short description of the JAR file and its purpose in the instance.
    4. Click the paper clip icon in the banner and attach the JAR file to the record.
    5. Click Submit.
    6. Restart the MID Server service.

      The platform makes the JAR file available to any MID Server configured to communicate with the instance.

      Now configure the data source with the right connection parameters .

      If there are any issue such as below:

      MID Server reported error: java.sql.SQLException: com.snc.automation_common.integration.exceptions.InvalidConnectionParameterException: Unable to load JDBC driver: Postgresql

       

      Verify that the connection can be made successfully outside servicenow by running the below java program .This could be run from Eclipse IDE

       

      import java.sql.Connection;

      import java.sql.DriverManager;
      import java.sql.SQLException;

      public class doIt {
      public static void main(String a[]){
      try{
      Class.forName("org.mariadb.jdbc.Driver");
      //For customer: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); (
      try{
      Connection con = DriverManager.getConnection(
      "jdbc:mysql://<database>:<port>/<databasename>","<username>","<password>");
      //For customer: "jdbc:sqlserver://<DBSERVER>:1500;selectMethod=cursor;databaseName=CM", "<username>", "<password>")
      System.out.println("Connected Successfully");
      } catch (SQLException ex) {
      System.out.println(ex);
      }
      } catch (ClassNotFoundException ex) {
      System.out.println("Driver not found.");
      }
      }
      } //end






The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.