Accessing PostgreSQL


You should never have to change or modify the database directly. However, you can use a few commands to look at the information within the database. If you used the defaults to set up ZENworks Linux Management, you can access PostgreSQL by following these steps:

1.

At the terminal prompt type su postgres.

2.

Type psql zenworks to log in to the database.

You then see the following information:

 Welcome to psql 7.4.7, the PostgreSQL interactive terminal. Type:      \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit zenworks=# 

3.

Type \d to view a description of what is in the database.

You see a screen similar to Figure 13.1.

Figure 13.1. List of relations for PostgreSQL database.


4.

You can also type \d <value> to see details about a specific item in the database. For example, if you type \d battery you will see a screen similar to Figure 13.2.

Figure 13.2. Description of battery table.


In addition to the listed commands, you can manage the information from the database by using the ZENworks Control Center, or using commands in zlman.




Novell ZENworks 7 Linux Management Administrator's Handbook
Novell ZENworks 7 Linux Management Administrators Handbook
ISBN: 0672327848
EAN: 2147483647
Year: 2005
Pages: 147

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net