eels_db_query(1Meels)


eels_db_query -- user specified SQL query from database

Synopsis

eels_db_query [-d database] [-f field_separator [-h] [-n] [-p page_length]
[-q SQL_Query] [-t trace_level][-w] [-y] [-z]

eels_db_query [-d database] [-l]

eels_db_query [-d database] [-L]

Description

Use eels_db_query to query an EELS database for log information. Database queries are in the form of a standard SQL query. The output of this command can either be in HTML format, or in a raw format that is better suited for use with scripts.

When eels_db_query returns data in HTML format, it is returned in a tabular format that can be displayed by a web browser. This is convenient when integrating eels_db_query with CGI scripts. The table can be printed with the field names at the top of the table. In addition, the HTML table can be automatically broken into smaller tables of a specified size.

The eels_db_query command can also return data in raw format. With this option, each row of output (terminated by a newline) corresponds to one row in the database. Each field of the record is separated by a vertical bar or by a user specified field separator on the command line. This type of output is well suited for integrating this command with perl scripts, or other shell script languages.

The SQL_Query argument is a string that selects the records to be archived.

Options


-d database
The name of the database to connect to.

-f field_separator
Specify the character that should be used as the field separator (Not applicable when output is in HTML format). Default is ``|''.

-h
Print output in HTML format.

-n
Print field names as first line of output. For HTML output the field names are printed at the top of the table as column headings.

-l
List all the fields of the events table, separating each field name by a newline.

-L
List all the fields of the events table, separating each field name by a space.

-p page_length
When output is in HTML format, specify the maximum number of lines in a table before that table is split into multiple tables.

-q SQL_Query
The SQL query used to query the database for records.

-t trace_level
Print debugging information. Valid debugging levels are ``1'' for minimal logging to ``4'' for full logging.

-w
When output is in HTML format, wrap data in table fields.

-y
If any of the fields that are printed contain data, print them in human readable format instead of milliseconds since the EPOCH.

-z
Do not print HTML page headers when producing HTML output.

Example

eels_db_query -d httpddb -h -n -y -q "select * from events"

The above example selects all records from the ``events'' table of the httpdb database. The output is displayed in HTML format, with column headers and dates in a human readable format.

References

eels_config(4eels)


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004