Deleting user objects

Note: Records in the USERS database table that correspond to guest users are populated with a timestamp value in the PREVLASTSESSION column. However, if you have migrated from WebSphere Commerce 5.1 or 5.4, some of the migrated guest user records may have a null value in this column. To properly run the Database Cleanup utility, ensure that each guest user record contains a timestamp value for the PREVLASTSESSION column, since this column value is used to determine the age of the user object. To determine if your database currently contains records that need to be populated, run the following SQL statement:

select users_id, prevlastsession from users where prevlastsession is null and registertype = 'G'

If this SQL query returns one or more records, run the following SQL statement to populate the PREVLASTSESSION column within the USERS database table:

To delete user objects:

  1. Type the following:
    • DB2
      • AIXi5/OSiSeriesSun Solaris Operating EnvironmentLinux./dbclean.sh -object user -type typename -db dbname -dbuser user -days daysold -loglevel loglevel -instancexml WC_installdir/instances/instance_name/xml/instance_name.xml
      • Windowsdbclean -object user -type typename -db dbname -days daysold -loglevel loglevel -instancexml WC_installdir/instances/instance_name/xml/instance_name.xml
    • Oracle
      • AIXSun Solaris Operating Environment./dbclean.sh -object user -type typename -db dbname -days daysold -loglevel loglevel -dbtype oracle -dbuser user -dbpasswd password -instancexml WC_installdir/instances/instance_name/xml/instance_name.xml
      • Windowsdbclean -object user -type typename -db dbname -days daysold -loglevel loglevel -dbtype oracle -dbuser user -dbpasswd password -instancexml WC_installdir/instances/instance_name/xml/instance_name.xml

      Use host:port:sid for the Oracle database name. For example, myhost:1521:mydb.

    For the -type parameter, you can specify guest to indicate a guest customer or registered to indicate a registered customer.

  2. Examine the WC_installdir/instances/instance_name/logs/DBClean/DBClean.timestamp.log file.

Feedback