Getting Started with Postgres Plus® Tutorial for Windows®

Platform: 
Windows

Introduction

This EnterpriseDB Quick Tutorial helps you get started with the Postgres Plus Standard Server or Postgres Plus Advanced Server database products in a Microsoft Windows environment. It is assumed that you have already downloaded and installed Postgres Plus Standard Server or Postgres Plus Advanced Server on your desktop or laptop computer.

Postgres Menus in Windows

 

This Quick Tutorial is designed to help you expedite your Technical Evaluation of Postgres Plus Standard Server or Postgres Plus Advanced Server. For more informational assets on conducting your evaluation of Postgres Plus, visit the self-service portion of the EnterpriseDB web site: Postgres Plus Open Source Adoption center.

In this Quick Tutorial you will learn how to do the following:

  • Start up the Postgres Plus database
  • Determine whether or not the Postgres Plus database server is running
  • Start up the pgAdmin III database administration console
  • Start up the SQL command line terminal
  • Shut down the Postgres Plus database

Feature Description

If you are new to Postgres, these steps will familiarize you with the basic start up and shut down operations of Postgres Plus so you can get the database server running with minimal difficulty. You will then be able to begin building a database and an application for a Technical Evaluation. For more informational assets on conducting your evaluation of Postgres Plus, visit the self-service web site, Postgres Plus Open Source Adoption.

The simplest method to start and stop the Postgres Plus database server is by using the Start Server and Stop Server menu options on the Postgres Plus menu that is created when you installed Postgres Plus on your Windows desktop or laptop computer. Similarly, the tools to build a database application can be started from the Postgres Plus menu. Note: If you are using Postgres Plus Advanced Server, the names of certain menu options and programs may differ slightly than from what is described herein for Postgres Plus Standard Server. However, the described functionality works the same in both Postgres Plus products.

Note: If you are using Postgres Plus Advanced Server, the names of certain menu options and programs may differ slightly than from what is described herein for Postgres Plus Standard Server. However, the described functionality works the same in both Postgres Plus products.

Tutorial Steps

Starting the Database Server

The following steps describe how to start the Postgres Plus database server.

Step 1: Log onto your computer using a computer administrator account. (The administrator privilege is required to start the database server.) 

Step 2: On the Windows taskbar located at the bottom of the screen, click the Start button. Choose All Programs and then choose Postgres Plus Standard Server or Postgres Plus Advanced Server, whichever is installed on your computer. On the Postgres Plus submenu, select Start Server so it is highlighted.

The following screen capture shows the Start Server option on the Postgres Plus Standard Server submenu in Windows XP.

Postgres Plus Start Server option in Windows

If you are using Windows Vista with User Account Control, do not click on Start Server, yet (go to Step 3).Otherwise, click Start Server to open the Start Server window and go to Step 4.

Step 3: (For Windows Vista with User Account Control only): Click the right mouse button on Start Server. On the Start Server submenu, click the left mouse button on Run as Administrator, and then click Continue in the User Account Control pop-up window. The Start Server window appears. Go on to Step 4.

Postgres Plus Start Server Run as Administrator

Step 4: In the Start Server window, you should see the following message if the database server started successfully.

Postgres Plus started successfully in Windows

Step 5: Press the Enter key in response to the message: Press <return> to continue.

Determining the Database Server Status

To determine if the database server is running, run the pg_ctl utility program from the Command Prompt window.

Step 1: Log onto your computer using a computer administrator account.

Note: If you do not use a computer administrator account, the pg_ctl program always returns the status message, pg_ctl: no server running, regardless of whether or not the database server is actually running.

Step 2: On the Windows taskbar located at the bottom of the screen, click the Start button. Choose All Programs and then choose Accessories. On the Accessories submenu, select Command Prompt so it is highlighted.

The following screen capture shows the Command Prompt option on the Accessories submenu in Windows XP.

Accessing the Windows Command Prompt

If you are using Windows Vista with User Account Control, do not click on Command Prompt, yet (go to Step 3).Otherwise, click Command Prompt to open the Command Prompt window and go to Step 4.

Step 3: (For Windows Vista with User Account Control only): Click the right mouse button on Command Prompt. On the Command Prompt submenu, click the left mouse button on Run as Administrator, and then click Continue in the User Account Control pop-up window. The Command Prompt window appears. Go on to Step 4.

Run Command Prompt as Windows Administrator

Step 4: At the Command Prompt, use the cd command to make your Postgres Plus bin directory your current working directory.

Note: If you are using Postgres Plus Advanced Server, use the cd command to make dbserver\bin your current working directory.

Make Postgres Plus bin directory your current directory

Step 5: Run the pg_ctl program with the status option and the location of your Postgres Plus data directory.

Note: Double quotes are required around the data directory as the path name contains embedded spaces.

Embedded spaces require double quotes around the path name

The status message displayed by the pg_ctl program indicates that the database server is running.

Starting the pgAdmin Database Administration Console

The following steps describe how to start the pgAdmin database administration console.

Step 1: Log onto your computer using either a standard account or a computer administrator account.

Step 2: On the Windows taskbar located at the bottom of the screen, click the Start button. Choose All Programs and then choose Postgres Plus Standard Server or Postgres Plus Advanced Server, whichever is installed on your computer.

The following screen capture shows the pgAdmin option on the Postgres Plus Standard Server submenu in Windows XP.

Postgres Plus Standard Server menu option for pgAdmin

Note: If you are using Postgres Plus Advanced Server, the pgAdmin menu option is called Postgres Studio.

Step 3: Click pgAdmin on the Postgres Plus submenu. The pgAdmin program opens.

Note: See Postgres Studio (pgadmin) on the Postgres Plus documentation web page for instructions on using pgAdmin .

Starting the SQL Command Line Terminal

The following steps describe how to start the SQL command line terminal.

If you are using Postgres Plus Standard Server, this program is called psql. If you are using Postgres Plus Advanced Server, this program is called edb-psql.

Step 1: Log onto your computer using either a standard account or a computer administrator account.

Step 2: On the Windows taskbar located at the bottom of the screen, click the Start button. Choose All Programs and then choose Postgres Plus Standard Server or Postgres Plus Advanced Server, whichever is installed on your computer.

The following screen capture shows the SQL command line terminal option, called SQL Shell (psql), on the Postgres Plus Standard Server submenu in Windows XP.

The Postgres Plus SQL shell (psql) menu option

Note: If you are using Postgres Plus Advanced Server, the submenu option is called Run SQL Command Line. Click Run SQL Command Line to open another submenu with the choices EDB Plus and EDB-PSQL. Select EDB-PSQL.

Step 3: Click SQL Shell (psql) or EDB-PSQL. The SQL command line terminal opens.

The Postgres Plus SQL command line terminal opens

Step 4: Enter the information for the successive prompts or accept the defaults as appropriate.

Answer the psql command prompts

Note: See psql in Chapter "PostgreSQL Client Applications" under VI. "Reference" of the PostgreSQL Core Documentation found on the Postgres Plus documentation web page for instructions on using the SQL command line terminal.

Stopping the Database Server

The following steps describe how to stop the Postgres Plus database server.

Step 1: Log onto your computer using a computer administrator account. (The administrator privilege is required to stop the database server.)

Step 2: On the Windows taskbar located at the bottom of the screen, click the Start button. Choose All Programs and then choose Postgres Plus Standard Server or Postgres Plus Advanced Server, whichever is installed on your computer. On the Postgres Plus submenu, select Stop Server so it is highlighted.

The following screen capture shows the Stop Server option on the Postgres Plus Standard Server submenu in Windows XP.

Postgres Plus menu option for Stop Server

If you are using Windows Vista with User Account Control, do not click on Stop Server, yet (go to Step 3).Otherwise, click Stop Server to open the Stop Server window and go to Step 4.

Step 3: (For Windows Vista with User Account Control only): Click the right mouse button on Stop Server. On the Stop Server submenu, click the left mouse button on Run as Administrator, and then click Continue in the User Account Control pop-up window. The Stop Server window appears. Go on to Step 4.

Windows Run as Administrator option for Stop Server

Step 4: In the Stop Server window, you should see the following message if the database server stopped successfully.

Stop Server successful

Note: If you are using Postgres Plus Advanced Server, you are asked to confirm the shutdown operation by entering Y. Enter Y and press the Enter key.

Step 5: Press the Enter key in response to the message, Press <return> to continue.

Conclusion

In this Quick Tutorial you learned how to perform the basic operations of starting, stopping, and obtaining the status of the Postgres Plus database on a Windows system. You have also learned how to start up the basic administration and development tools for creating a database application.

You should now be able to proceed with a Technical Evaluation of Postgres Plus. The following resources should help you move on with this step: