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 127.0.0.1 -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";
 CREATE EXTENSION IF NOT EXISTS "pg_trgm";

7. Execute below command in command prompt  and ensure whether pg_stat_statements and pg_trgm extensions are listed in the output.
 \dx
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 build 10538 , please use the below method. psql -h localhost -U sdpadmin -p 65432 ...
                      • 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 [ServiceDesk ...
                      • 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 ...
                      • Connect to default PGSQL database remotely

                        1. To be able to reach the server remotely you have to add the following line into the file: ManageEngine/ServiceDeskPlus-MSP/pgsql/data/postgresql.conf:   listen_addresses = '*'   2. PostgreSQL, by default, refuses all connections it receives from ...
                      • Default Postgres Database password from Builds 14620 and above

                        For users in ServiceDesk Plus MSP build 14620 and above , the default PostgreSQL database password will now be auto-generated for sdpadmin. For Builds 14620 and above: For security reasons, the default Postgres database password will now be randomly ...