How to connect to external postgres(external DB)

How to connect to external postgres(external DB)

1. From the postgres installed path navigate to bin folder and open a command prompt

2. Execute the command --> pg_ctl -D "C:\Program Files\PostgreSQL\10\data" start (Postgres server gets started)
3. Connect to DB using the command-->psql -U postgres -h -p 5432(update the postgres port number)
4. Create a database in external server using command-->CREATE DATABASE databasename;
5.Connect to the database-->\c databasename(database gets connected)
6.Create the extensions using the below queries

CREATE EXTENSION IF NOT EXISTS "pg_stat_statements";

7. Execute below command in command prompt  and ensure whether pg_stat_statements and pg_trgm extensions are listed in the output.
8. From product installed path modify the StartDBServer parameter as false on customer-config.xml file present in the conf folder to connect external PostgreSQL.
9.Use changeDBServer.bat and connect to postgres as superuser. (Username: Postgres and Password: <Super User Password>).
10.Start the application.

      New to ADManager Plus?

        New to ADSelfService Plus?

          • Related Articles

          • How to Connect to SDP MSP Database ?

            1. In-Built POSTGRES (PGSQL) : Open a CMD prompt as an administrator and navigate to ManageEngine\ServiceDeskPlus-MSP\pgsql\bin and run the below command                                     From SDP MSP version 10.6 , please use the below method.     ...
          • Error While connecting default Postgres Database

            If you are getting the below error while connecting the postgresDB , please follow the steps below : Error : psql: FATAL: no pg_hba.conf entry for host “::1”, user “postgres”, database “servicedesk”,SSL off     Please open pg_hba.conf under ...
          • Remote read only access to database for Postgres customers

            Use case: Frequently customers want to connect some reporting / dashboard application like PowerBI or Tableau with our Postgres database server. By default, the bundled Postgres is configured to only listen to the local machine. We can configure to ...
          • How do I convert the database from PGSQL to MSSQL?

            1. Stop ManageEngine ServiceDeskPlus – MSP service. 2. Take a backup of the existing data and configuration under PGSQL database by following the below steps. Open CMD as an administrator and execute  command to start the data backup. ...
          • The transaction log (Servicedesk_log.ldf) for database 'servicedesk' is full

            There are two methods to fix this issue. Method 1 To fix this issue, we have to detach ServiceDesk database, after detaching we can delete the transaction log ( .LDF log)  and attach the ServiceDesk database back. The important part in this process ...