Initializing Postgres database using pgAdmin 4

Use the pgAdmin 4 tool to create a Postgres server and intialize the Postgres database.

  1. Download pgAdmin 4 from the below URL:
    https://www.pgadmin.org/download/
    Note: It is recommended to use version 4 of the pgAdmin tool.
  2. Run pgAdmin and log in as a Postgres user.
  3. In the pgAdmin 4 tool, expand Servers.
  4. Right-click PostgreSQL 10 and select Create Server.
  5. In the Create Server dialog box, under the General tab, in the Name text box, enter the required name.
  6. In the Connections tab, in the Host Name/Address text box, enter the host name.
  7. In the Username text box, enter postgres.
    AAS Postgres
  8. Click Save to create the server connection.
  9. Right-click the postgres database and select Query Tool
    Query tool
  10. In the Query Tool window, click Open File.
    AAS Postgres
  11. Run the below script as Postgres user in the Postgres database.
    C:/Program Files/ASG/AAS/database/PostgreSQL/AAS_CreateDemoDB_Postgres.sql
  12. Run the below script as Postgres user in AAS_DB database.
    C:/Program Files/ASG/AAS/database/PostgreSQL/AAS_CreateDemoUser_Postgres.sql
  13. Validate the above script executed successfully.