Go Back   The Unofficial BlackBerry Support Forum > BlackBerry Enterprise Server > General BES Discussion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-2006, 12:46 PM
BESadmin's Avatar
Administrator
Join Date: Aug 2006
Posts: 1,951
Images: 788
Move the BlackBerry Configuration Database to a new server instance

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:
  1. Back up the BlackBerry Configuration Database.
  2. Prepare the new Microsoft SQL Server.
  3. Restore the BlackBerry Configuration Database.
  4. 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:
  1. Open Enterprise Manager.
  2. Right-click the BlackBerry Configuration Database (the default name is BESMgmt).
  3. Select Backup Database.
  4. Click Add to specify the Directory Name and File Name. Click OK to accept the settings.
  5. Click OK to perform the backup.
  6. Close Enterprise Manager.
If you are using an Microsoft Data Engine (MSDE) Server, complete the following steps:
  1. Open a command prompt and type osql -E
  2. Type the following commands in the specified order: 1> backup database BESMgmt to disk = "C:\backup.bak"
    2> go
    1> quit
  3. 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:
  1. Open Enterprise Manager.
  2. Navigate to SQL Server Group/<SQL_Server_Name>/Security/
  3. Right-click Logins and select New Login.
  4. On the General tab, click the "" button
  5. Select the name of your BlackBerry Enterprise Server administration account from the Global Address List.
  6. Click Add, then click OK.
  7. On the Server Roles tab, select Server Administrators and Database Creators.
  8. 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:
  1. Log in to the new SQL Server.
  2. Right-click My Computer and click Manage.
  3. Expand Local Users and Groups.
  4. Go to Groups, then open the Administrators group.
  5. Click Add.
  6. Type the name of the service account and click Check Name.
  7. Click OK, then close the Computer Management window.
Step 2 - Enable the correct Server Protocols
  1. Go to Start > Run.
  2. Type the command svrnetcn and click OK. The SQL Server Network Configuration Utility opens.
  3. Make sure that TCP/IP and Named Pipes are both listed as enabled protocols.
  4. Close the SQL Server Network Configuration Utility.
  5. If you enabled a protocol in step 3, restart the SQL Services.
Step 3 - Ensure the SQL Agent is running
  1. Open the Microsoft Windows® Services. To do this, go to the Control Panel and open Administrative Tools > Services.
  2. Verify that the SQL Server Agent service is Started and that its startup type is set to Automatic.
  3. Close the Services Window.
Step 4 - Update the Database Server Schema
  1. Download the installation package for the version of the BlackBerry Enterprise Server you are using.
  2. Extract the contents.
  3. Copy the Database folder to the new SQL Server.
  4. At a command prompt, navigate to the Database directory.
  5. 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:
  1. Copy the BlackBerry Configuration Database backup to the C:\ path of the new SQL Server.
  2. Open a command prompt and type osql -E
  3. Type the following commands in the specified order: 1> restore database BESMgmt from disk = "c:\backup.bak" with recovery,replace
    2> go
    1> quit
  4. 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:
  1. Copy the BlackBerry Configuration Database backup to the C:\ path of the new SQL Server.
  2. Open a command prompt and type osql -E
  3. 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
  4. Close the command prompt.
Method 3 - Detach and Re-attach the BlackBerry Configuration Database



Perform the following steps:
Step 1 - Stop the BlackBerry Services
  1. Open the Windows Services. To do this, go to the Control Panel and open Administrative Tools > Services.
  2. 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:
  1. Log in to the original SQL Server.
  2. Open Enterprise Manager.
  3. Right-click the BlackBerry Configuration Database.
  4. Select All Tasks and click Detach Database.
  5. Close Enterprise Manager.
  6. Navigate to the SQL Data directory and make a copy of the MDF and LDF files.
  7. The default path is C:\Program Files\Microsoft SQL Server\MSSQL\Data\ and the default filenames are BESMgmt.mdf and BESMgmt.ldf.
  8. Move the file copies to the new SQL Server.
  9. Log in to the new SQL Server.
  10. Open Enterprise Manager.
  11. Right-click the BlackBerry Configuration Database.
  12. Select All Tasks and click Detach Database.
  13. Move the files you copied in step 6 into the SQL Data directory. When prompted to overwrite the files, click Yes.
  14. In Enterprise Manager, right-click the Database folder and click All Tasks.
  15. Select Attach Database.
  16. Select the MDF file to attach and click OK.
  17. Close Enterprise Manager.
If you are using MSDE, complete the following steps:
  1. Log in to the first MSDE Server.
  2. Open a command prompt and type osql -E
  3. 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:
  1. On the BlackBerry Enterprise Server.
  2. Click Start > Programs > BlackBerry Enterprise Server > BlackBerry Server Configuration.
  3. On the Database Connectivity tab, select Change Database.
  4. In the Change Database Wizard, specify the new SQL Server name and the original BlackBerry Configuration Database name.
  5. Continue with the wizard. Make sure that the Start Services check box is selected, then click Finish.
  6. 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).
  7. Open BlackBerry Manager and make sure that all BlackBerry device users display and show a Running state.
  8. Test message flow from the BlackBerry device.
  9. 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.
  1. Copy the RimEsp.dll file to C:\Program Files\Microsoft SQL Server\MSSQL\Binn\ folder on the new SQL Server.
  2. In SQL Query Analyzer, browse to the \Database\DBInstallScripts\SQLServer\4.1\ folder on the installation media.
  3. Open the NotifyInstall.sql file and replace <_DATABASENAME_> with the name of the BlackBerry Configuration Database.
  4. Run the script.
  5. Confirm that the SQL Query Analyzer displays the message Function dbo.xp_RIM_xxxx registered.
Reply With Quote
  #2 (permalink)  
Old 24-03-2008, 12:50 AM
BESadmin's Avatar
Administrator
Join Date: Aug 2006
Posts: 1,951
Images: 788
How to move the BlackBerry Configuration Database to a new Microsoft SQL Server or instance

Doc ID : KB03112
Last Modified : 2008-03-03
Document Type : How To

Environment
  • BlackBerry® Enterprise Server software version 2.1 through 4.1 for Microsoft® Exchange
  • BlackBerry® Enterprise Server software version 2.1 through 4.1 for IBM® Lotus® Domino®
  • Microsoft® SQL Server™ 2000 Service Pack 3
  • Microsoft® SQL Server™ 2005
Procedure

The BlackBerry Enterprise Server services must be stopped during the process described in this article.

Important: Restarting certain BlackBerry Enterprise Server services will delay email message delivery to BlackBerry smartphones. For more information, see KB04789.

To move the BlackBerry Configuration Database to a new Microsoft SQL Server or instance, complete the following tasks:
Note: In a Microsoft Exchange environment, complete the tasks using the BlackBerry Enterprise Server service account unless otherwise stated.
  1. Back up the BlackBerry Configuration Database.
  2. Prepare the new Microsoft SQL Server.
  3. Restore the BlackBerry Configuration Database.
  4. Configure the BlackBerry Enterprise Server.
Attached Files
File Type: pdf KB03112.pdf (63.1 KB, 302 views)
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Service failed to start, generating error 5305 BESadmin Microsoft Exchange 0 18-02-2009 10:11 PM
How to merge BlackBerry Configuration Databases BESadmin General BES Discussion 1 22-01-2009 01:55 PM
Move X amount of users from one environment to another with diff SQL versions. Live2Ride General BES Discussion 3 12-09-2007 11:43 AM
MSDE to SQL Server 2005 migration JeffreyK Microsoft Exchange 1 28-08-2007 08:07 PM
How to move from MSDE to SQL BESadmin General BES Discussion 1 23-10-2006 12:10 AM


All times are GMT +11. The time now is 08:18 AM.

Copyright ©2006 - 2010 BLACKBERRYFORUMS - This website and its members are not affiliated with Research in Motion (RIM). RIM and BlackBerry are Registered Trademarks of Research In Motion


Search Engine Friendly URLs by vBSEO 3.5.0 RC2