Example Commands and Objects
SQL/MX Connectivity Service Administrative Command Reference—526350-005
A-2
This example starts MXCI and verifies that the service started properly:
mxci
Hewlett-Packard NonStop(TM) SQL/MX Conversational Interface 2.0
(c) Copyright 2003 Hewlett-Packard Development Company, LP.
>>mode mxcs;
CS>info service $as;
-- INFO SERVICE \ODBC.$AS Report
PName State SPid TCP/IP PN Port Last Updated Type
$AS STOP 1,386 $ZTC0 21000 Mar 26 13:37 AS
$Z3445 AVL 1,394 $ZTC0 21001 Mar 26 13:37 CFG
This example creates the DS and uses options that are not optimal for normal use. For
example, its CpuList option limits the servers to running on CPU 0 and 1. It also
starts statistic recording that can reduce performance, fill the logs, and disable idle
server and idle connection timeouts. After starting the servers, they are persistent and
do not end. You can configure the DS without starting a service by using an asterisk (*)
for the service name, which connects it directly to the database. Regardless of how the
DS is created, all existing services immediately see the DS. This DS is created in the
stopped state:
CS>add ds Test_DSN, MaxServer 5, IdleServer 3, InitServer 2, IdleTimeout
+>NO_TIMEOUT, ConnTimeout NO_TIMEOUT, InitPri 140, CpuList '0 1',
+>SQLExecDirectStat, SQLFetchStat, SQLPrepareStat;
-- ADD DS \ODBC.$AS.TEST_DSN Successful
This example adds EVARs to the DS definition:
CS>add evar "ESTIMATED COST", type rmp, limit 500, action stop;
-- ADD EVAR \ODBC.$AS.TEST_DSN.ESTIMATED COST Successful
CS>add evar timeout, value 'reset';
-- ADD EVAR \ODBC.$AS.TEST_DSN.TIMEOUT Successful
This command produces an error because of a misspelled EVAR name:
CS>add evar sratch_disks, value '$data01, $data02, \ODBC.$data03';
-- ADD EVAR \ODBC.$AS.TEST_DSN.SRATCH_DISKS Failed
*** ERROR[15408] Lower layers failed to perform action requested.
*** ERROR[15310] SUBSYSTEM: SQL error from LowLayer, library call
CFGSetEnvironmentValues failed.
*** ERROR[15202] LOWLAYER 1: *** ERROR[2050] SRATCH_DISKS is not the name of any
DEFAULTS table attribute.*** ERROR[8822] Unable to
prepare the statement.
These examples complete adding EVARs and displaying the results:
CS>add evar scratch_disks, value '$data01, $data02, \ODBC.$data03';
-- ADD EVAR \ODBC.$AS.TEST_DSN.SCRATCH_DISKS Successful
CS>add evar EMP, type define, value 'CLASS MAP, FILE $DATA01.PERSNL.EMPLOYEE';
-- ADD EVAR \ODBC.$AS.TEST_DSN.=EMP Successful
CS>info ds, detail;
-- INFO DS \ODBC.$AS.TEST_DSN Report, detailed
Name: \ODBC.$AS.TEST_DSN
CpuList: 0,1
InitPri...........................140 CurrentState..................STOPPED
ConnectedServers....................0 AvailableServers....................0
LastStateChg.............Dec 31 18:00 LastUpdate...............Mar 26 13:39
IdleServer..........................3 IdleTimeout................NO_TIMEOUT
MaxServer...........................5 ConnTimeout................NO_TIMEOUT
InitServer..........................2 StartAutomatic....................OFF
Trace.............................OFF SQLPrepareStat.....................ON
ConnInfoStat......................OFF SQLExecuteStat....................OFF
Commentaires sur ces manuels