How to troubleshoot stagingprop execution in DB2

If you didn’t apply FP6 yet, you can’t use the -trace parameter

[stagingprop utility]

http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/refs/rssstageprop.htm

and even in that case you can only choose between 4 predefined trace levels

0 – (default) High-level summary only.
1 – Table level information and Global summary report.
2 – Table summary report and row level information.
3 – SQL statements and diagnostic.

But stagingprop is using a JDBC type 4 connection underlying

“Note: For DB2 UDB databases, the DB2 Type 4 JDBC driver is used, where the Type 4 database name is prefixed with the database server and port. For example, db_server:db_port/db_name.”

This means you can trace stagingprop execution exactly as you do with any other JDBC type 4 connection using the DB2 JCC driver

[Collecting Data: Tracing with the IBM Data Server driver for JDBC and SQLJ]

http://www-01.ibm.com/support/docview.wss?uid=swg21196160

To apply the technote to the Commerce environment, you just need to “play” a bit with the JDBC url parameters

String databaseUrl = “jdbc:db2://localhost:50000/sample”
+ “:traceDirectory=c:\\temp”
+ “;traceFile=trace”
+ “;traceFileAppend=false”
+ “;traceLevel=”
+ (com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL)
+ “;”;

The standard way to execute stagingprop command is specifying the db name only (DB2SRCDB and DB2TGTDB)

./stagingprop.sh -scope _all_ -sourcedb DB2SRCDB -sourcedb_user dbsrcuser -sourcedb_passwd dbsrcpwd -destdb DB2TGTDB -destdb_user dbtgtuser -destdb_passwd dbtgtpwd

but if you apply a specific JDBC URL syntax

./stagingprop.sh -scope _all_ -sourcedb “DB2SRCSRV:<port>/DB2SRCDB:traceFile=/var/log/stagingTrace.log;traceLevel=567” -sourcedb_user dbsrcuser -sourcedb_passwd dbsrcpwd -destdb “DB2TGTSRV:<port>/DB2TGTDB:traceFile=/var/log/productionTrace.log;traceLevel=567” -destdb_user dbtgtuser -destdb_passwd dbtgtpwd

you will be able to trace stagingprop execution using the trace level you need activating correspondent trace flags

“If the URL is specified outside application code, specify a numeric value for traceLevel. Possible values:

  • TRACE_NONE (blank)
  • TRACE_CONNECTION_CALLS (1)
  • TRACE_STATEMENT_CALLS (2)
  • TRACE_RESULT_SET_CALLS (4)
  • TRACE_DRIVER_CONFIGURATION (16)
  • TRACE_CONNECTS (32)
  • TRACE_DRDA_FLOWS (64)
  • TRACE_RESULT_SET_META_DATA (128)
  • TRACE_PARAMETER_META_DATA (256)
  • TRACE_DIAGNOSTICS (512)
  • TRACE_SQLJ (1024)
  • TRACE_XA_CALLS (2048)*
  • TRACE_META_CALLS (8192)
  • TRACE_DATASOURCE_CALLS (16384)
  • TRACE_LARGE_OBJECT_CALLS (32768)
  • TRACE_SYSTEM_MONITOR (131072)
  • TRACE_TRACEPOINTS (262144)
  • TRACE_ALL (-1)”
Advertisements

Websphere Commerce and Portal Architect ✔ Motivated IT professional with more than ten years of experience, combining Java and JEE developer skills with systems and IBM products installation knowledge. ✔ Strong experience and skills on planning, architecting and implementing complex commerce and portal solutions based on IBM middleware products. ✔ Reliable with a strong network attitude, experience on leading developer's teams and manage international relationships. Specialties ✔ Pleasant manner, reliable. ✔ Ability to consider issues from different point of views. ✔ End-oriented work capacity and problem-solving attitude. ✔ Ability to work with deadlines and under pressure. ✔ Ability to prioritise tasks and manage people. ✔ Ability to increase the whole team skills. ✔ Ability to generate commercial leads

Tagged with: ,
Posted in websphere commerce utilities

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: