Move the BlackBerry Configuration Database to a new server instance
PLEASE REFER TO UPDATED VERSION BELOW
Environment- BlackBerry® Enterprise Server software versions 2.1 through 4.1
- Microsoft® Exchange
Procedures
The BlackBerry Enterprise Server services will be stopped during the following procedure.
Important: Restarting the BlackBerry Enterprise Server services will delay message delivery to BlackBerry devices. For more information, see KB04789.
Perform the following tasks using the BlackBerry Enterprise Server administration account, unless otherwise stated:
- Back up the BlackBerry Configuration Database.
- Prepare the new Microsoft SQL Server.
- Restore the BlackBerry Configuration Database.
- Configure the BlackBerry Enterprise Server.
Task 1 - Back Up the BlackBerry Configuration Database
If you are using a full Microsoft SQL Server, complete the following steps:
- Open Enterprise Manager.
- Right-click the BlackBerry Configuration Database (the default name is BESMgmt).
- Select Backup Database.
- Click Add to specify the Directory Name and File Name. Click OK to accept the settings.
- Click OK to perform the backup.
- Close Enterprise Manager.
If you are using an Microsoft Data Engine (MSDE) Server, complete the following steps:
- Open a command prompt and type osql -E
- Type the following commands in the specified order: 1> backup database BESMgmt to disk = "C:\backup.bak"
2> go
1> quit
- Close the command prompt.
Task 2 - Prepare the New Microsoft SQL Server
Complete the four steps below.
Step 1 - Assign appropriate permissions
If you are using a full Microsoft SQL Server, complete the following steps using an account with administrative access to the new SQL Server:- Open Enterprise Manager.
- Navigate to SQL Server Group/<SQL_Server_Name>/Security/
- Right-click Logins and select New Login.
- On the General tab, click the "" button
- Select the name of your BlackBerry Enterprise Server administration account from the Global Address List.
- Click Add, then click OK.
- On the Server Roles tab, select Server Administrators and Database Creators.
- Close Enterprise Manager
Note: For BlackBerry Enterprise Server software version 4.1, the System Administrator role is needed for Role-Based Administration.
If you are using an MSDE Server, complete the following steps:
- Log in to the new SQL Server.
- Right-click My Computer and click Manage.
- Expand Local Users and Groups.
- Go to Groups, then open the Administrators group.
- Click Add.
- Type the name of the service account and click Check Name.
- Click OK, then close the Computer Management window.
Step 2 - Enable the correct Server Protocols
- Go to Start > Run.
- Type the command svrnetcn and click OK. The SQL Server Network Configuration Utility opens.
- Make sure that TCP/IP and Named Pipes are both listed as enabled protocols.
- Close the SQL Server Network Configuration Utility.
- If you enabled a protocol in step 3, restart the SQL Services.
Step 3 - Ensure the SQL Agent is running- Open the Microsoft Windows® Services. To do this, go to the Control Panel and open Administrative Tools > Services.
- Verify that the SQL Server Agent service is Started and that its startup type is set to Automatic.
- Close the Services Window.
Step 4 - Update the Database Server Schema- Download the installation package for the version of the BlackBerry Enterprise Server you are using.
- Extract the contents.
- Copy the Database folder to the new SQL Server.
- At a command prompt, navigate to the Database directory.
- Type the command for the version of BlackBerry Enterprise Server you are using: For BlackBerry Enterprise Server software versions 4.0 through 4.1
createdb.exe besmgmt.cfg
For BlackBerry Enterprise Server software versions 3.6
createdb.exe -o "c:\program files\microsoft sql server\80\tools\binn\osql.exe" -E -l "c:\program files\microsoft sql server\mssql\data"
where c:\program files\microsoft sql server\80\tools\binn\ is the location of osql.exe and c:\program files\microsoft sql server\mssql\ is the location of the data directory in SQL.
Once the command has finished executing, close the command prompt.
Note: For more information on the createdb command or editing the besmgmt.cfg file, please see the Installation Guide that is appropriate for the version of BlackBerry Enterprise Server you have installed.
Task 3 - Restore the BlackBerry Configuration Database
Use one of the following methods to restore the BlackBerry Configuration Database, then proceed to Task 4.
Method 1 - Backup and Restore the BlackBerry Configuration Database (on an SQL Server with the same directory structure)
Complete the following steps:
- Copy the BlackBerry Configuration Database backup to the C:\ path of the new SQL Server.
- Open a command prompt and type osql -E
- Type the following commands in the specified order: 1> restore database BESMgmt from disk = "c:\backup.bak" with recovery,replace
2> go
1> quit
- Close the command prompt.
Method 2 - Backup and Restore the BlackBerry Configuration Database (on an SQLServer with a different directory structure)
Complete the following steps:
- Copy the BlackBerry Configuration Database backup to the C:\ path of the new SQL Server.
- Open a command prompt and type osql -E
- Type the following commands in the specified order:
1> restore database from disk = "c:\backup.bak" with move "" to "<New Path>\MSSQL\Data\BESMgmt.mdf", move "_log" to "<New Path>\MSSQL\Data\.LDF"
2> go
1> quit
- Close the command prompt.
Method 3 - Detach and Re-attach the BlackBerry Configuration Database
Perform the following steps:
Step 1 - Stop the BlackBerry Services
- Open the Windows Services. To do this, go to the Control Panel and open Administrative Tools > Services.
- Stop each service that has a name that begins with BlackBerry.
Important: Restarting the BlackBerry Enterprise Server delays message delivery to BlackBerry devices. For more information, see KB04789.
Step 2 - Move the BlackBerry Configuration Database files to the new SQL Server
If you are using full SQL Server, complete the following steps:
- Log in to the original SQL Server.
- Open Enterprise Manager.
- Right-click the BlackBerry Configuration Database.
- Select All Tasks and click Detach Database.
- Close Enterprise Manager.
- Navigate to the SQL Data directory and make a copy of the MDF and LDF files.
- The default path is C:\Program Files\Microsoft SQL Server\MSSQL\Data\ and the default filenames are BESMgmt.mdf and BESMgmt.ldf.
- Move the file copies to the new SQL Server.
- Log in to the new SQL Server.
- Open Enterprise Manager.
- Right-click the BlackBerry Configuration Database.
- Select All Tasks and click Detach Database.
- Move the files you copied in step 6 into the SQL Data directory. When prompted to overwrite the files, click Yes.
- In Enterprise Manager, right-click the Database folder and click All Tasks.
- Select Attach Database.
- Select the MDF file to attach and click OK.
- Close Enterprise Manager.
If you are using MSDE, complete the following steps:- Log in to the first MSDE Server.
- Open a command prompt and type osql -E
- Type the following commands in the specified order:
1> exec sp_detach_db @dbname = ''
2> go
1> quit
4.Navigate to the SQL Data directory and make a copy of the MDF and LDF files. The default path is C:\Program Files\Microsoft SQL Server\MSSQL\Data\ and the default filenames are BESMgmt.mdf and BESMgmt.ldf.
5. Move the file copies to the new SQL Server.
6. Log in to the new MSDE Server.
7. Open a command prompt and type osql -E
8.Type the following commands in the specified order:
1> exec sp_detach_db @dbname = ''
2> go
1> quit
9.Move the files you copied in step 4 into the SQL Data directory. When prompted to overwrite the files, click Yes.
10. Open a command prompt and type osql -E
11. Type the following commands in the specified order:
1> exec sp_attach_db @dbname = '<Database Name>',
2> @filename1 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\.mdf',
3> @filename2 = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\log.ldf'
4> go
1> quit
12.Close the command prompt.
Task 4 - Configure the BlackBerry Enterprise Server to connect to the new BlackBerry Configuration Database
Complete the following steps:
- On the BlackBerry Enterprise Server.
- Click Start > Programs > BlackBerry Enterprise Server > BlackBerry Server Configuration.
- On the Database Connectivity tab, select Change Database.
- In the Change Database Wizard, specify the new SQL Server name and the original BlackBerry Configuration Database name.
- Continue with the wizard. Make sure that the Start Services check box is selected, then click Finish.
- Open the Windows Services and make sure all the BlackBerry services started successfully. The BlackBerry Database Consistency Service may be disabled (this is normal behavior).
- Open BlackBerry Manager and make sure that all BlackBerry device users display and show a Running state.
- Test message flow from the BlackBerry device.
- Close the command prompt.
Optional: If you are running BlackBerry Enterprise Server software version 4.1, install the Database Notification System. This is an optional component, however, and does not need to be installed.
- Copy the RimEsp.dll file to C:\Program Files\Microsoft SQL Server\MSSQL\Binn\ folder on the new SQL Server.
- In SQL Query Analyzer, browse to the \Database\DBInstallScripts\SQLServer\4.1\ folder on the installation media.
- Open the NotifyInstall.sql file and replace <_DATABASENAME_> with the name of the BlackBerry Configuration Database.
- Run the script.
- Confirm that the SQL Query Analyzer displays the message Function dbo.xp_RIM_xxxx registered.