Truncate Table with 'ALTER TABLE' Statement in DB2

Truncate Table with ‘ALTER TABLE’ Statement in DB2

I was recently trying to clear out an entire table within a DB2 database, actually the CACHEIVL table within my local WebSphere Commerce toolkit instance containing roughly 9,000,000+ records, and I wanted to simply remove the data. I was attempting to run a TRUNCATE statement; however, that kept failing miserably, and realized that there was another way to truncate a table, without having to run a TRUNCATE statement.

[ Read More ]

Delete Using Commit Count DB2 Stored Procedure

Delete Using Commit Count DB2 Stored Procedure

I recently have come across the need to delete millions of rows from a variety of tables within my WebSphere Commerce instance, but have been unable to as the transaction log fills all the way up and the transaction errors out. Granted, there are several options that I could have taken such as to increase the transaction log size; however, that isn’t always feasible depending upon the environment you are working with.

[ Read More ]

Refresh Resource Bundles in WebSphere Commerce

Refresh Resource Bundles in WebSphere Commerce

For those that use WebSphere Commerce, especially if you’re taking advantage of internationalization and localization, you’ve used many a resource bundles. You also understand how challenging it can be when you have to consistently modify your properties, only to have to restart your application server in order to view the updates. Here is a solution that will allow you to change your property files, and refresh them automatically without restarting your application server.

[ Read More ]

Quick Lookup of SQL Error Codes in DB2

Quick Lookup of SQL Error Codes in DB2

I was recently writing some DB2 SQL queries, and was seeing some DB2 error codes returned when attempting to run those queries. Typically I lookup the error codes on the DB2 InfoCenter; however, I recently just discovered a significantly quicker way to determine what the cryptic DB2 error codes are trying to say without using InfoCenter.

[ Read More ]