Question : Exchange 2003 server generating NDR's for a few minutes every morning

The following has been happening every morning on our primary USER exchange server, causing people to have connection issues and NDR's to be generated for what seems to be about 5 - 10 minutes per day, in the morning:

Exchange Timeline:

8:07AM:
Event Type:      Warning
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Background Cleanup
Event ID:      9791
Date:            07/07/2010
Time:            8:07:22 AM
User:            N/A
Computer:      XXXX
Description:
Cleanup of the DeliveredTo table for database 'User Storage Group\User Mailbox Store A' was pre-empted because the database engine's version store was growing too large. 0 entries were purged.
Event Type:      Warning
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Background Cleanup
Event ID:      9791
Date:            07/07/2010
Time:            8:07:22 AM
User:            N/A
Computer:      XXXX
Description:
Cleanup of the DeliveredTo table for database 'User Storage Group\User Mailbox Store B' was pre-empted because the database engine's version store was growing too large. 0 entries were purged.
The above two warnings continue to log by the minute until 8:20, then this:
8:20AM:
Event Type:      Error
Event Source:      ESE
Event Category:      Transaction Manager
Event ID:      623
Date:            07/07/2010
Time:            8:20:46 AM
User:            N/A
Computer:      XXXX
Description:
Information Store (3796) User Storage Group: The version store for this instance (2) has reached its maximum size of 155Mb. It is likely that a long-running transaction is preventing cleanup of the version store and causing it to build up in size. Updates will be rejected until the long-running transaction has been completely committed or rolled back.
Possible long-running transaction:
      SessionId: 0x7FD31420
      Session-context: 0x00000000
      Session-context ThreadId: 0x0000150C
      Cleanup: 1


After the above error, the following events begin to happen:
 
Event Type:      Warning
Event Source:      MSExchangeIS Mailbox Store
Event Category:      General
Event ID:      1025
Date:            07/07/2010
Time:            8:20:48 AM
User:            N/A
Computer:      XXXX
Description:
An error occurred on database "User Storage Group\User Mailbox Store A".
 Function name or description of problem: EcGenerateNDR:
Error: 0xfffff9bf

Event Type:      Error
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Logons
Event ID:      1022
Date:            07/07/2010
Time:            8:20:49 AM
User:            N/A
Computer:      XXXX
Description:
Logon Failure on database "User Storage Group\User Mailbox Store A" - Windows 2000 account XXXX\XXXX; mailbox /o=XXXX Industries Ltd./ou=XXXX CAT/cn=Recipients/cn=xxxxxxxx/cn=xxxxxxxxxx.
Error: -1069
Event Type:      Error
Event Source:      MSExchangeIS
Event Category:      Performance
Event ID:      9582
Date:            07/07/2010
Time:            8:21:14 AM
User:            N/A
Computer:      XXXX
Description:
The virtual memory necessary to run your Exchange server is fragmented in such a way that normal operation may begin to fail. It is highly recommended that you restart all Exchange services to correct this issue.

Event Type:      Warning
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Background Cleanup
Event ID:      9791
Date:            07/07/2010
Time:            8:21:27 AM
User:            N/A
Computer:      XXXX
Description:
Cleanup of the DeliveredTo table for database 'User Storage Group\User Mailbox Store' was pre-empted because the database engine's version store was growing too large. 0 entries were purged.
 
Event Type:      Warning
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Background Cleanup
Event ID:      9791
Date:            07/07/2010
Time:            8:21:27 AM
User:            N/A
Computer:      XXXX
Description:
Cleanup of the DeliveredTo table for database 'User Storage Group\User Mailbox Store B' was pre-empted because the database engine's version store was growing too large. 0 entries were purged.

STARTING AT 8:21AM, LOGIN FAILURES ON DATABASE:

Event Type:      Error
Event Source:      MSExchangeIS Mailbox Store
Event Category:      Logons
Event ID:      1022
Date:            07/07/2010
Time:            8:21:46 AM
User:            N/A
Computer:      XXXX
Description:
Logon Failure on database "User Storage Group\User Mailbox Store B (XXXX)" - Windows 2000 account XXXX\xxxxxx; mailbox /O=XXXX/OU=XXXX/cn=Recipients/cn=xxxxxx.
Error: -1069
The above logs repeat themselves with the exception of the ESE error, citing all different users until 8:26AM where they stop. At this point there is a global address warning:

Event Type:      Warning
Event Source:      MSExchangeSA
Event Category:      OAL Generator
Event ID:      9327
Date:            07/07/2010
Time:            8:28:14 AM
User:            N/A
Computer:      XXXX
Description:
OALGen skipped some entries in the offline address list '\Global Address List'.  To see which entries are affected, event logging for the OAL Generator must be set to at least medium.
- Default Offline Address List

...and then regular logging and access resumes


If anyone can make sense of what is triggering this to happen, I would appreciate any feedback. Thank you.

Answer : Exchange 2003 server generating NDR's for a few minutes every morning

DB2 does support IN.  However, it would appear from the error that your query is returning an empty string for the "INT(REPLACE(LOWES.T572_SHP_LCT_GRP.T162_CGY_SHT_NME,'DC','')".  (In fact, if you copied the query into your question exactly as it appears, then you are missing a closing ')'.  So that would mean you are trying to check a string against a list of integers, because the INT function is not completing.  Please confirm this.)  You should probably add:
  REPLACE(LOWES.T572_SHP_LCT_GRP.T162_CGY_SHT_NME,'DC','') <> '' AND
ahead of the "INT(...) IN (...)" part of the WHERE clause.  This would make sure no empty strings are not being used with IN.
Random Solutions  
 
programming4us programming4us