How to login into Postgres Database?

How to login into Postgres Database?

  1. Identify the database information,
    1. For environments running version 9.4 : (To know the database used, check the file named databaseinfo under <Servicedeskplus-Home>/conf folder)
    2. For environments running version 9.3 and below : (To know the database used, check the file named databaseinfo under <Servicedeskplus-Home>/server/default/conf folder)

    3. For environments running version 10.5 and above : (To know the database used, check the file named database_params.conf under <Servicedeskplus-Home>/conf folder)

            Or, Invoke changeDBServer.bat or changeDBServer.sh file from <Servicedeskplus-Home>\bin Directory.

                                          


      2. Open command prompt or Terminal at <Servicedeskplus-Home>\pgsql\bin Directory, Execute the below command with identified values in the previous step.

For Windows,
  1. psql.exe -U <username> -p <port> -d <database_name> -h <server address>
For Linux.
  1. ./psql-U <username> -p <port> -d <database_name> -h <server address>

Generally, for our application with default configuration execute the command below.

For Connecting as sdpadmin,
  1. ./psql -h 127.0.0.1 -p 65432 -d servicedesk -U sdpadmin
For Connecting as Postgres, 
  1. ./psql -h 127.0.0.1 -p 65432 -d servicedesk -U postgres

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to Connect External Postgres

                      To install an external PostgreSQL server, ensure the PostgreSQL version matches the inbuilt PostgreSQL version series of the ServiceDesk Plus application. For example: If ServiceDesk Plus version is 14010 with PostgreSQL version 10.21, install an ...
                    • Remote read only access to database for Postgres customers

                      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 allow ...
                    • 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 ...
                    • Failed to start the database

                      For the error "Failed to start the database", Check what database being used and, execute changeDBServer.bat. For Pgsql,  Start PGSQL from the command link, execute StartDB.bat 65432 under C:\Manageengine\ServiceDesk\bin 65432 is the default port ...
                    • Postgres Database startup failures with InitPgsql error trace

                      [com.adventnet.db.adapter.postgres.DefaultPostgresDBInitializer] [SEVERE] : Please login to the system as <machine_name>\Administrator and execute initPgsql.bat script with administrator privileges. If issue is not yet solved, please contact support ...