How to troubleshoot stagingprop execution in DB2

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

[stagingprop utility]

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]

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=”
+ (
+ “;”;

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

./ -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

./ -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_SQLJ (1024)
  • TRACE_XA_CALLS (2048)*
  • TRACE_ALL (-1)”

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: Logo

You are commenting using your 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: