You can use the WebSphere Application Server administrative console to trace queries serviced by the data service layer. You can also enable tracing for query parameters.
Procedure
- To trace the data service layer SELECT queries:
- Set the log level setting to 'all' for the com.ibm.commerce.foundation.server.services.dataaccess component in the WebSphere Application Server Administrative consoleNote: To trace the UPDATE and INSERT queries, set the log level setting to 'all' for all classes under component com.ibm.ws.sdo.mediator.jdbc(com.ibm.ws.sdo.mediator.jdbc*=all). You must restart the server after enabling this trace.
- The query name, SQL statement and the template file where the query is defined is displayed in the trace. An example of a trace entry is shown in the following sample:
getGraph(DMSQueryData) Query name: /CatalogEntry[CatalogEntryDisplayPageName[(UniqueId=)]]+IBM_CatalogEntryDisplayPage_Get [1/31/08 15:08:11:234 EST] 00000034 jdbc 1 com.ibm.commerce.foundation.internal.server.services.dataaccess.graphbuilderservice.jdbc.JDBCMediatorSupplyQuery getGraph(DMSQueryData) SQL query: SELECT DISPENTREL.CATENTRY_ID, DISPENTREL.DISPENTREL_ID, DISPENTREL.LANGUAGE_ID, DISPENTREL.DEVICEFMT_ID, DISPENTREL.STOREENT_ID, DISPENTREL.PAGENAME, DISPENTREL.CATENTTYPE_ID, DISPENTREL.AUCTIONSTATE, DISPENTREL.MBRGRP_ID, DISPENTREL.DESCRIPTION, DISPENTREL.FIELD1, DISPENTREL.RANK, DISPENTREL.FIELD2, DISPENTREL.OID, DISPENTREL.OPTCOUNTER FROM DISPENTREL WHERE DISPENTREL.CATENTRY_ID in (?, ?, ?, ?, ?, ?) OR DISPENTREL.CATENTRY_ID =0 AND DISPENTREL.STOREENT_ID IN ( ? ) [ '10651' '10655' '10660' '10665' '10670' '10675' '10702' ] [1/31/08 15:08:11:234 EST] 00000034 jdbc 1 com.ibm.commerce.foundation.internal.server.services.dataaccess.graphbuilderservice.jdbc.JDBCMediatorSupplyQuery getGraph(DMSQueryData) Template file: D:\WCToolkitEE60\xml\config\com.ibm.commerce.catalog\wc-query-CatalogEntry-admin-get.tpl
- Set the log level setting to 'all' for the com.ibm.commerce.foundation.server.services.dataaccess component in the WebSphere Application Server Administrative console
- To trace query parameters:
- Open the wc-attribute-masking.xml file:
- WC_eardir/xml/config/wc-attribute-masking.xml
- Developer WCDE_installdir/wc/xml/config/wc-attribute-masking.xml
- Find the following line:
<wc:MaskedAttribute name="extendedDataValue" compareType="starts" />
- Replace it with the following line, which simply comments the line out by adding <!-- and --> blocks around it:
<!-- <wc:MaskedAttribute name="extendedDataValue" compareType="starts" /> -->
- Open the wc-server.xml file:
- WC_eardir/xml/config/wc-server.xml
- Developer WCDE_installdir/wc/xml/config/wc-server.xml
- Remove the following line:
<Parameter display="false" name="extendedDataValue"/>
- Restart the server.
- Open the wc-attribute-masking.xml file:
No comments:
Post a Comment