Page History
...
The following example presents a possible DDML document.
<tables-definition product=
“CD”><"CD"><!-- CD for customer data -->
Customer’s
<!-- example for a timeslice statistics level table for the Customer's J2EE data -->
“PW
<table-definition name="PW_JECD_CUSTOMER_DATA_
T” T" type=
“STATISTICS” "STATISTICS" filterable=
“TRUE” "TRUE" oracle-storage-clause=
“NEXT "NEXT 4M PCTINCREASE
0”>0">
“JECD
<column-definition name="JECD_
TIMESTAMP” TIMESTAMP" data-type=
“TIMESTAMP” "TIMESTAMP" null=
“FALSE” "FALSE" type=
“DATE” "DATE" /><!-- mandatory column -->
“JECD
<column-definition name="JECD_PWHG_
ID” ID" data-type=
“INTEGER” "INTEGER" data-length=
“4” "4" null=
“FALSE” "FALSE" type=
“IDENTIFIER” "IDENTIFIER" default=
“0”"0"/><!-- mandatory column -->
“JECD
<column-definition name="JECD_MINUTES_COUNT_
SUM” SUM" data-type=
“INTEGER” "INTEGER" data-length=
“9” "9" null=
“FALSE” "FALSE" type=
“SUM” "SUM" default=
“1”"1"/><!-- mandatory column -->
“JECD
<column-definition name="JECD_PWII_INSTANCE_
ID” ID" data-type=
“INTEGER” "INTEGER" data-length=
“9” "9" null=
“FALSE” "FALSE" type=
“IDENTIFIER”"IDENTIFIER"/><!-- mandatory column -->
“JECD
<column-definition name="JECD_RECIEVED_
TIMESTAMP” TIMESTAMP" data-type=
“TIMESTAMP” "TIMESTAMP" null=
“FALSE” "FALSE" default=
“CURRENT TIMESTAMP” "CURRENT TIMESTAMP" type=
“DATE”"DATE"/><!-- mandatory column -->
“JECD
<column-definition name="JECD_IS_SERVICE_
REQUEST” REQUEST" data-type=
“BOOLEAN” "BOOLEAN" null=
“FALSE” "FALSE" type=
“IDENTIFIER” "IDENTIFIER" default=
“FALSE” "FALSE" baseline-value=
“F”"F"/><!-- identifer definition -->
“JECD
<column-definition name="JECD_THRESHOLD_
BREACH” BREACH" data-type=
“BOOLEAN” "BOOLEAN" null=
“TRUE” "TRUE" type=
“IDENTIFIER”"IDENTIFIER"/><!-- identifer definition -->
“JECD
<column-definition name="JECD_
TYPE” TYPE" data-type=
“VARCHAR” "VARCHAR" data-length=
“254” "254" null=
“FALSE” "FALSE" type=
“IDENTIFIER” "IDENTIFIER" /><!-- identifer definition -->
“JECD
<column-definition name="JECD_RESPONSE_TIME_
SUM” SUM" data-type=
“FLOAT” "FLOAT" data-length=
“15” "15" null=
“FALSE” "FALSE" type=
“SUM” "SUM" default=
“0”"0"/><!-- counter definition -->
“JECD
<column-definition name="JECD_HIT_COUNT_
SUM” SUM" data-type=
“INTEGER” "INTEGER" data-length=
“19” "19" null=
“FALSE” "FALSE" type=
“SUM” "SUM" default=
“0”"0"/><!-- counter definition -->
“JECD
<column-definition name="JECD_INTERNAL_TIME_
SUM” SUM" data-type=
“FLOAT” "FLOAT" data-length=
“15” "15" null=
“FALSE” "FALSE" type=
“SUM” "SUM" default=
“0”"0"/><!-- counter definition -->
“JECD
<column-definition name="JECD_JDBC_TIME_
AVG” AVG" data-type=
“FLOAT” "FLOAT" data-length=
“15” "15" null=
“FALSE” "FALSE" type=
“AVG” "AVG" default=
“0”"0"/><!-- counter definition -->
“JECD
<column-definition name="JECD_ACTIVE_THREADS_
AVG” AVG" data-type=
“FLOAT” "FLOAT" data-length=
“15” "15" null=
“TRUE” "TRUE" type=
“AVG”"AVG"/><!-- counter definition -->
“IW
<index-definition name="IW_JECD_01_
T” T" unique=
“FALSE” "FALSE" primary=
“FALSE” "FALSE" clustered=
“FALSE” "FALSE" columns-order=
“JECD"JECD_PWII_INSTANCE_ID ASC JECD_RECIEVED_TIMESTAMP ASC JECD_TIMESTAMP
ASC” ASC" oracle-storage-clause=
“NEXT "NEXT 4M PCTINCREASE
0”0"/><!-- index definition -->
“PW
<summary-hour name="PW_JECD_CUSTOMER_DATA_
H”H"/><!-- indication to summarize the data at an hourly level -->
“PW
<summary-day name="PW_JECD_CUSTOMER_DATA_
D”D"/><!-- indication to summarize the data at a dayly level -->
“PW
<summary-week name="PW_JECD_CUSTOMER_DATA_
W”W"/><!-- indication to summarize the data at a weekly level -->
“PW
<summary-month name="PW_JECD_CUSTOMER_DATA_
M”M"/><!-- indication to summarize the data at a monthly level -->
“PW
<baseline name="PW_JECD_CUSTOMER_DATA_
B” B" oracle-additional-clause=
“NOLOGGING”"NOLOGGING"/><!-- indication to create a baseline for that table -->
nonstatistcs
</table-definition>
<!-- example for a non-statistcs table that should be part of the PMDB schema -->
“PW
<table-definition name="PW_ORSR_STRUCTURE_
CONTROL” CONTROL" type=
“PWOTHER” "PWOTHER" oracle-storage-clause=
“initial "initial 1M next 10M minextents 1 maxextents unlimited pctincrease
0”>0">
“ORSR
<column-definition name="ORSR_DATABASE_
ID” ID" data-type=
“VARCHAR” "VARCHAR" data-length=
“255” "255" null=
“TRUE”"TRUE"/>
“ORSR
<column-definition name="ORSR_UPDATE_
START” START" data-type=
“TIMESTAMP” "TIMESTAMP" null=
“TRUE”"TRUE"/>
“ORSR
<column-definition name="ORSR_
STATUS” STATUS" data-type=
“VARCHAR” "VARCHAR" data-length=
“30” "30" null=
“TRUE”"TRUE"/>
“ORSR
<column-definition name="ORSR_ROW_
TYPE” TYPE" data-type=
“VARCHAR” "VARCHAR" data-length=
“2” "2" null=
“TRUE”"TRUE"/>
“ORSR
<column-definition name="ORSR_PURGE_
DATE” DATE" data-type=
“TIMESTAMP” "TIMESTAMP" null=
“TRUE”"TRUE"/>
“ORSR
<column-definition name="ORSR_LAST_PURGED_
TABLE” TABLE" data-type=
“VARCHAR” "VARCHAR" data-length=
“30” "30" null=
“TRUE”"TRUE"/>
“ACTIVE
</table-definition>
<!-- example for a view creation -->
<view-definition name="ACTIVE_STATUS_
VIEW” VIEW" view-columns=
“DATABASE"DATABASE_ID DATABASE_
STATUS” STATUS" as-query=
“SELECT "SELECT ORSR_DATABASE_ID,ORSR_STATUS FROM PW_ORSR_STRUCTURE_CONTROL WHERE ORSR_STATUS=
‘ACTIVE’”'ACTIVE'"/>
“ORACLE”
<!-- example for DDL/DML commands that should be performed during installation -->
<ddl-definition dbms="ORACLE" version=
“” "" event=
“INSTALL” "INSTALL" statement=
“create "create sequence PRECISE_STATEMENT_ID_
SEQ”SEQ"/>
“ORACLE”
<!-- example for DDL/DML commands that should be performed during uninstallation -->
<ddl-definition dbms="ORACLE" version=
“” "" event=
“UNINSTALL” "UNINSTALL" statement=
“drop "drop sequence PRECISE_STATEMENT_ID_
SEQ”SEQ"/>
</tables-definition>
Retrieve Request Example
The following example sends one query to retrieve data.
<queries connection-pool="pw" single-connection="true">
<free-query id="501">
<!-- meta-data is optional -->
<meta-data>
<fetch-rows value="10000" /> <!-- number of rows to retrieve -->
<skip-rows value="0" /> <!-- number of rows to skip -->
<timeout value="30" /> <!-- maximum time to wait for database execution -->
</meta-data>
<query-text value="SELECT * FROM PS_PWTR_TABLE_RANGE WHERE PWTR_TABLE_NAME = ?" />
<bind-variable id="1" value="PW_NTAC_ACTIONS_M" type="string" />
</free-query>
</queries>
The following example sends several queries to retrieve data.
<queries connection-pool="pw" single-connection="false"> <!-- with single-connection set to false, queries are performed in parallel -->
<free-query id="601">
<!-- meta-data is optional -->
<meta-data>
<fetch-rows value="1" /> <!-- number of rows to retrieve (fetching only one row) -->
<skip-rows value="0" /> <!-- number of rows to skip -->
<timeout value="30" /> <!-- Maximum time to wait for database execution -->
</meta-data>
<!-- bind variables are optional -->
<query-text value="SELECT * FROM PW_PWII_INSTANCE_ID" />
</free-query>
<free-query id= "602">
<!-- meta-data is optional -->
<meta-data>
<timeout value="45" /> <!-- Maximum time to wait for database execution -->
</meta-data>
<query-text value="UPDATE PS_PWSE_SCHEDULED_EVENTS SET PWSE_START_TIMESTAMP = SYSDATE+4/1440, PWSE_STATUS = 'UPDATE' WHERE PWSE_ID = 6" />
</free-query>
<free-query id="603">
<!-- meta-data is optional -->
<meta-data>
<timeout value="45" /> <!-- Maximum time to wait for database execution -->
</meta-data>
<query-text value="SELECT * FROM PS_PWTR_T" />
</free-query>
.
.
.
</queries>
Retrieve Response Examples
The following example shows a retrieve response to one query executed without errors.
<rowsets>
<rowset id="501">
<row rownum="1">
<PWTR_PWII_ID>1005</PWTR_PWII_ID>
<PWTR_TABLE_NAME>PW_NTAC_ACTIONS_M</PWTR_TABLE_NAME>
<PWTR_START_TIMESTAMP></PWTR_START_TIMESTAMP> <!-- indication of null -->
<PWTR_END_TIMESTAMP></PWTR_END_TIMESTAMP>
<PWTR_LAST_PARTITION_TIMESTAMP>2008-08-01 00:00:00.0</PWTR_LAST_PARTITION_TIMESTAMP>
</row>
<row rownum="2">
<PWTR_PWII_ID>1011</PWTR_PWII_ID>
<PWTR_TABLE_NAME>PW_NTAC_ACTIONS_M</PWTR_TABLE_NAME>
<PWTR_START_TIMESTAMP>2003-08-02 12:00:00.0</PWTR_START_TIMESTAMP>
<PWTR_END_TIMESTAMP>2003-08-23 23:00:00.0</PWTR_END_TIMESTAMP>
<PWTR_LAST_PARTITION_TIMESTAMP>2008-08-01 00:00:00.0</PWTR_LAST_PARTITION_TIMESTAMP>
</row>
<rowset-info>
<affected-rows>2</affected-rows>
<more-rows>false</more-rows> <!-- indication that all the rows where fetched -->
</rowset-info>
<error>
<code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
</error>
</rowset>
<error> <!-- rowsets level error, indication that there were no problems with the database connection -->
<code>0/code>
</error>
</rowsets>
The following example shows a retrieve response to several queries. Note that some queries have encountered an error during execution.
<rowsets>
<rowset id="601">
<row rownum="1">
<PWII_ID>1005</PWII_ID>
<PWII_INSTANCE_NAME>network_instance</PWII_INSTANCE_NAME>
<PWII_TECHNOLOGY>NT</PWII_TECHNOLOGY>
<PWII_SERVER>my_server</PWII_SERVER>
</row>
<rowset-info>
<affected-rows>1</affected-rows>
<more-rows>true</more-rows> <!-- indication that there are more rows to fetch -->
</rowset-info>
<error>
<code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
</error>
</rowset>
<rowset id="602">
<rowset-info>
<affected-rows>1</affected-rows>
<more-rows>false</more-rows>
</rowset-info>
<error>
<code>0</code> <!-- rowset level error indication that there ware no errors with the query -->
</error>
</rowset>
<rowset id="603">
<error>
<code>8200</code> <!-- indication that there was an error performing the query -->
<description>com.precise.shared.retriever.RetrieverJDBCException: ERROR could not execute the sql command in query id : 502 for sql text : SELECT * FROM PS_PWTR_T</description>
<external-code>942</external-code>
<external-description>ORA-00942: table or view does not exist</external-description>
</error>
</rowset>
<error>
<code>0</code>
</error>
</rowsets>
The following example presents an error connecting to the database.
<rowsets>
<error>
<code>9100</code>
<description>ERROR at statement 72000</description>
<external-code>1034</external-code>
<external-description>ORA-01034: ORACLE not available</external-description>
</error>
</rowsets>
Load Request Example
Info |
---|
Do NOT enter blanks, nor new lines between the tags. |
The following example presents a request to load data.
<rowsets connection-pool="pw"><!-- the connection pool names should always be "pw" -->
<rowset object="PW_NTAC_ACTIONS_T" single-commit="true"> <!--table name and indication to commit only after all rows are loaded into PW -->
<columns> <!-- the list of columns should be kept in the rows creation -->
<column>NTAC_TIMESTAMP</column>
<column>NTAC_ID1</column>
<column>NTAC_CONSUMER_IP</column>
<column>NTAC_REQUESTS_SUM</column>
<column>NTAC_NETWORK_TIME_SUM</column>
<column>NTAC_TIME1_SUM</column>
<column>NTAC_STAT1_SUM</column>
<column>NTAC_STAT2_SUM</column>
<column>NTAC_SOURCE_ID</column>
<column>NTAC_PWII_INSTANCE_ID</column>
<column>NTAC_INSTANCE</column>
<column>NTAC_SERVER</column>
<column>NTAC_INSTANCE_GID</column>
<column>NTAC_SERVER_GID</column>
<column>NTAC_CONSUMER_IP_GID</column>
<column>NTAC_RED_SUM</column>
<column>NTAC_YELLOW_SUM</column>
<column>NTAC_GREEN_SUM</column>
</columns>
<row rownum="1"><![CDATA[2212003-08-2811:30:00.0^21010.1.0.218^1910.1.1.94^17175.000^1621.600^150.000^1514963^1820227220^12SQ^141009^210SAPSQLSRV2^210sapsqlsrv2^0^0^0^130.0^130.0^130.0^]]></row>
<row rownum="2"><![CDATA[2212003-08-2811:30:00.0^21010.1.0.218^1910.1.1.94^17175.000^1621.600^150.000^1514963^1820227220^12SQ^141009^210SAPSQLSRV2^210sapsqlsrv2^0^0^0^130.0^130.0^130.0^]]></row>
</rowset>
</rowsets>
Load Response Examples
The following example presents a response to a successful load request.
<?xml version="1.0" encoding="UTF-8"?>
<rowsets>
<error>
<code>0</code> <!-- indication that there was no error connecting to the database -->
</error>
<rowset object="PW_NTAC_ACTIONS_T">
<error>
<code>0</code> <!-- indication that there was no error loading the data into the table -->
</error>
</rowset>
</rowsets>
The following example presents an error connecting to the database.
<?xml version="1.0" encoding="UTF-8"?>
<rowsets>
<error>
<code>9200</code>
<description>Error connecting to the PW DB</description>
<external-code>12154</external-code>
<external-description>TNS:could not resolve service name</external-description>
</error>
</rowsets>
The following example presents the response to a load request that has encountered an error during execution.
<?xml version="1.0" encoding="UTF-8"?>
<rowsets>
<rowset object="PW_NTAC_ACTIONS_T">
<error>
<code>10200</code>
<description>Error loading table PW_NTAC_ACTIONS_T</description>
<external-code>1</external-code>
<external-description>Unique index violation</external-description>
</error>
</rowset>
<error>
<code>0</code>
</error>
</rowsets>