Knowledgebase: SQL Server 2005
SQL Server Queries
Posted by - NA - on 06 July 2009 01:30 PM

SQL Server 2005:

The following is a list of SQL Server Queries that will prove useful in gathering information about your users:

select * from gleanerstatus where errorcode != 0 order by timestamp desc
-- This query will show you the unsuccessful checks of your users for email, beginning with the most recent. If you take out the exclamation point (!) in the query, it will show you all of the successful checks.

select * from pimstatus where errorcode != 0 order by timestamp desc
-- This query will show you the unsuccessful checks of your users for PIM, beginning with the most recent. If you take out the exclamation point (!) in the query, it will show you all of the successful checks.

select * from notificationcheckpoint where clientdevicesakey = xxxxx (where xxxxx is the users clientdevicesakey)
-- This query will show you what emails we have on record for the user. This table should mirror what is in the folders that the user is checking.

select * from hwp where deviceaddress = xxxxx and newmsg = 1 order by timestamp desc (where xxxxx is the users clientdevicesakey)
-- This will show you what messages are still on the server, waiting to be retrieved by the user's device.

select * from pendingresponses order by timestamp desc
-- This will show you what messages have been sent from the device, but not yet processed.

select * from responsestatus order by timestamp desc
-- This will show you the response codes for messages that have been sent from the device, and processed by NLES.

select * from gleanercheckpoint where active = 1
-- This will show you which users are currently being checked by NLES for email.