You are on page 1of 16

Getting Started on Windows with Postgres Plus

Getting Started with Postgres Plus(R) on Windows(R)

A Postgres Evaluation Quick Tutorial From EnterpriseDB


November 6, 2009

EnterpriseDB Corporation, 235 Littleton Road, Westford, MA 01866, USA T +1 978 589 5700 F +1 978 589 5701 E info@enterprisedb.com www.enterprisedb.com

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

Introduction
This tutorial covers the basics of starting and stopping the database server, checking the server's status, using the pgAdmin GUI administrator's / devloper's tool, and accessing the SQL command line console. 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. 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 web site, Postgres Plus Open Source Adoption. 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
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. 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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus 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.

Step 4: In the Start Server window, you should see the following message if the database server started successfully.
Copyright 2009 EnterpriseDB Corporation. All rights reserved. 4

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus The status message displayed by the pg_ctl program indicates that the database server is running.

Starting the pgAdmin III Database Administration Console


The following steps describe how to start the pgAdmin III 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 III option on the Postgres Plus Standard Server submenu in Windows XP.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

Getting Started on Windows with Postgres Plus

Note: If you are using Postgres Plus Advanced Server, the pgAdmin III menu option is called Postgres Studio. Step 3: Click pgAdmin III on the Postgres Plus submenu. The pgAdmin III program opens.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

10

Getting Started on Windows with Postgres Plus

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

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

11

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

12

Getting Started on Windows with Postgres Plus

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

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

13

Getting Started on Windows with Postgres Plus

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.

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

14

Getting Started on Windows with Postgres Plus 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.

Step 4: In the Stop Server window, you should see the following message if the database server stopped successfully.
Copyright 2009 EnterpriseDB Corporation. All rights reserved. 15

Getting Started on Windows with Postgres Plus

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: Postgres Plus Technical Evaluation Guide Postgres Plus Getting Started resources Postgres Plus Tutorials Postgres Plus User Forums Postgres Plus Documentation Postgres Plus Webinars

Copyright 2009 EnterpriseDB Corporation. All rights reserved.

16

You might also like