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