Professional Documents
Culture Documents
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
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.
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
Step 5: Press the Enter key in response to the message, Press <return> to continue.
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.
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.
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.
Getting Started on Windows with Postgres Plus The status message displayed by the pg_ctl program indicates that the database server is running.
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.
10
Note: See Postgres Studio (pgadmin) on the Postgres Plus documentation web page for instructions on using pgAdmin III.
11
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.
12
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.
13
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
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
16