88 lines
2.4 KiB
Groff
88 lines
2.4 KiB
Groff
'\"macro stdmacro
|
|
.if n .pH g1.espquery @(#)espquery 30.2 of 04/03/96
|
|
.nr X
|
|
.if \nX=0 .ds x} espquery 1 "" "\&"
|
|
.if \nX=1 .ds x} espquery 1 ""
|
|
.if \nX=2 .ds x} espquery 1 "" "\&"
|
|
.if \nX=3 .ds x} espquery "" "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
espquery \- Database query for Embedded Support Partner
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f3espquery\f1 [\f3\-th\f1] [\f3\-u\f1 username] [\f3\-p\f1 password] [\f3\-n\f1 hostname] \c
|
|
\f3\-s\f1 sqlstring dbname
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.I espquery\^
|
|
is a command that is designed to perform limited set of operations on the
|
|
database in the Embedded Support Partner The command is provided mostly for use by
|
|
tools that are script in nature, yet need an interface to the SSDB. The
|
|
tools would have to have intimate knowledge of the schema in the SSDB and
|
|
the rights to access the database. The operations on the on the SSDB are
|
|
limited to:
|
|
.PP
|
|
.B SELECT
|
|
.br
|
|
.B DESCRIBE
|
|
.br
|
|
.B SHOW
|
|
.PP
|
|
The
|
|
.I dbname\^
|
|
is a mandatory argument and must be at the end after the option list.
|
|
.PP
|
|
The
|
|
.I espquery\^
|
|
command has the following options:
|
|
.PP
|
|
.TP 13
|
|
.BI \-t
|
|
Option to disable the printing of headers. With this option, data is displayed
|
|
without any header information.
|
|
.TP
|
|
.BI \-h
|
|
Help command. This option will print out the usage for the command.
|
|
.TP
|
|
.BI \-u " username"
|
|
The username for accessing the data in the SSDB. The SSDB will have set users
|
|
that have privileges to access the data. This option is mandatory.
|
|
.TP
|
|
.BI \-p " password"
|
|
The password for the account to access data in the SSDB.
|
|
.TP
|
|
.BI \-n " hostname"
|
|
Option to connect to a different host that is running the SSDB. By default
|
|
the hostname is set to localhost. This option is mandatory.
|
|
.TP
|
|
.BI \-s " sqlstring"
|
|
The SQL query that is to be performed on the database. The sqlstring must
|
|
be enclosed in double quotes ("").
|
|
.TP
|
|
.TP
|
|
.PP
|
|
.SH EXAMPLE 1
|
|
.RS
|
|
.PD 1
|
|
.I \f3espquery\f1 \f3\-u\f1 sss \f3\-p\f1 \c
|
|
sss \f3\-s\f1 \^"select * from event\^" ssdatabase
|
|
.PD
|
|
.RE
|
|
.PP
|
|
The above command connects to the database called ssdatabase on the local
|
|
system using the account sss password sss. A select of all records from
|
|
the table called event is performed.
|
|
.PP
|
|
.SH EXAMPLE 2
|
|
.RS
|
|
.PD 1
|
|
.I \f3espquery\f1 \f3\-n\f1 neetu.csd.sgi.com \f3\-u\f1 \c
|
|
sss \f3\-p\f1 sss \f3\-s\f1 \^"select * \c
|
|
from event\^" ssdatabase
|
|
.PD
|
|
.RE
|
|
.PP
|
|
The above connects to the database called ssdatabase on the host called
|
|
neetu.csd.sgi.com using the account sss password sss. A select of all
|
|
records from the table called event is performed.
|