03-28-2007, 12:17 PM
Join Date: May 2006
Post Thanks: 0
Thanked 0 Times in 0 Posts
You can perform following tasks on SQL server.
Run SQL maintenance jobs for the BlackBerry Configuration Database
Doc ID : KB04426
Last Modified : 2006-11-07
Document Type : How To
Print this page
BlackBerry® Enterprise Server software versions 4.0 and 4.1
IBM® Lotus® Domino®
In some environments, large numbers of transactions may cause the BlackBerry Configuration Database to increase in size. In some instances, this may be caused by the Microsoft SQL Server not running BlackBerry maintenance jobs automatically. The BlackBerry maintenance jobs should run automatically once a week by default; however, unless the SQLSERVERAGENT service is running, these jobs do not execute.
To run the SQL Server maintenance jobs
Go to Control Panel>Administrative Tools>Services and double-click the SQLSERVERAGENT service. This opens the SQLServerAgent Properties window.
Click Start and wait until the following jobs complete:
RIMPurgeMDSStatsBESMgmt (for version 4.1 only)
Upon completion of the job for RIMPurgeDeletedUsersBESMgmt, the BlackBerry Configuration Database retains entries from the last 30 days or the last 10,000 entries, and deletes all prior entries.
Upon completion of the RIMPurgeHistoryBESMgmt task, the BlackBerry Configuration Database retains entries from the last 60 days or the last 10,000 entries, and deletes all prior entries.
Upon completion of the job for RIMPurgeMDSMsgBESMgmt, the BlackBerry Configuration Database deletes the old data from push messages table and does not retain any old messages.
Upon completion of the job for RIMPurgeMDSStatsBESMgmt, the BlackBerry Configuration Database deletes the old statistic data for the BlackBerry Mobile Data Service (BlackBerry MDS) and does not retain any old statistics.
Upon completion of the job for RIMPurgeWorkQueueBESMgmt, the BlackBerry Configuration Database retains entries from the last 15 days or the last 10,000 entries, and deletes the prior entries.
From the Startup type drop-down list, selectAutomatic so that the BlackBerry Configuration Database jobs run at consistent intervals, and so its size is kept to a manageable level.
Note: The SQLSERVERAGENT service is set to a Startup type of Manual in the default installation. If you set the service to Automatic, all BlackBerry maintenance jobs execute regularly, as in the following:
RIMPurgeDeletedUsersBESMgmt starts every week on Sunday at 2:00 AM.
RIMPurgeHistoryBESMgmt starts every week on Sunday at 1:00 AM.
RIMPurgeWorkQueueBESMgmt starts every week on Sunday at 2:00 AM.
RIMPurgeMDSMsgBESMgmt starts every day at 3:33 AM.
RIMPurgeMDSStatsBESMgmt starts every day at 2:22 AM.
You can run a job at any time. Alternatively, you can manually execute the stored procedures called by these jobs.
For Microsoft SQL 2000 Server
In SQL Enterprise Manager, go to Microsoft SQL Servers\SQL Server Group\<BlackBerry_Enterprise_Server_name>\Manageme nt\SQL Server Agent and double-click Jobs.
Right-click the name of the job you want to run and clickStart Job.
If you do not have SQL Enterprise Manager
Open a command prompt.
Type osql -E and press ENTER. The 1> prompt appears.
The -E switch uses the Microsoft Windows® current account credentials to log in to the default BlackBerry Configuration Database. If you do not use the default database, add the -S<BlackBerry_Enterprise_Server_name><database_name > switch to the end of your osql command line.
If a user does not have sufficient Windows permissions, or needs to use an SQL account to log in, replace -E with -U<username> -P <password>, where<user_name> is the SQL login name and <password> is the user account password.
Type the following commands in the specified order:
where <database_name> is the name of the BlackBerry Enterprise Server database.
where <stored_procedure_name> is the name of the stored procedure called by the job you want to run, and<days_retained> is the number of days for which to retain entries.
See the Additional Information section for the equivalent commands.
Close the command prompt window.
This is a list of osql commands to specify a stored procedure for which you want to run calls, and the number of days to retain entries. You use these commands at the 2> prompt.
Job Name Stored Procedure Name Default Days Retained Value
RIMPurgeDeletedUsersBESMgmt RemoveDeletedUsers 60
RIMPurgeHistoryBESMgmt RemoveOldHistoryRows 30
RIMPurgeMDSMsgBESMgmt RemoveMDSPushMsgs None
RIMPurgeMDSStatsBESMgmt RemoveOldMDSStats None
RIMPurgeWorkQueueBESMgmt RemoveOldWorkQueue 15
Some examples of usage are the following:
2>exec RemoveDeletedUsers 30
2>exec RemoveOldHistoryRows 60
2>exec RemoveOldWorkQueue 15
The jobs without a Default Days Retained Value do not have the function to retain any old information. Do not specify a day value.
Products & Services:
* BlackBerry Enterprise Server for IBM Lotus Domino
* BlackBerry Enterprise Server for Microsoft Exchange
* BlackBerry Enterprise Server for Novell GroupWise