BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   BES Admin Corner (http://www.blackberryforums.com/bes-admin-corner/)
-   -   Migrating SQL Database to new server (http://www.blackberryforums.com/bes-admin-corner/178292-migrating-sql-database-new-server.html)

GiantGuineaPig 02-25-2009 08:05 PM

Migrating SQL Database to new server
 
Hi,
I'm struggling trying to migrate my BES SQL Database to a newer server.

I'm following the official instructions here:

blackberry.com/btsc/microsites/search.do?cmd=displayKC&docType=kc&externalId=KB03 112&sliceId=1&docTypeID=DT_SUPPORTISSUE_1_1&dialog ID=34328712&stateId=0 0 34334201

(it won't let me post links)

I'm getting stuck at the step:

Step 4

Update the BlackBerry Configuration Database schema.

Important: If the BlackBerry Enterprise Server software was installed to create a blank BlackBerry Configuration Database on a new Microsoft SQL Server instance, do not perform the following task because the schema has already been updated.

Download the installation package for the version of the BlackBerry Enterprise Server being used.
Extract the contents of the installation package.
Copy the Database folder to the new Microsoft SQL Server.
Go to the Database folder and open the BESMgmt.cfg file in a text editor, such as Notepad.
Locate the DB_NAME=BESMgmt line and make sure that the name specified matches the BlackBerry Configuration Database name.
If you are using a named instance of Microsoft SQL Server, change the SERVER=local line to SERVER=<Microsoft_Server_Name>\ <instance_name> and close the file. Save the changes.
From a command prompt, go to the Database directory.
Type createdb.exe BESMgmt.cfg and press ENTER.
After the command has finished executing, close the command prompt.


Every combination of trying to run this command results in this error from the log file:

Result of call to BESDBInstaller: Problem trying to connect. See log

[20000] (02/26 11:19:10.974):{0xC90} COM Error 0x80004005 in ConnectionItem::ConnectToDB() - [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. - Unspecified error (connection string - Provider=SQLOLEDB;Server=(local);Database=BESMgmt; uid=besadmin;pwd=)

I've tried using the sa account, the domain admin account, the besadmin account, and tried using local, the SQL name, ., and other variants.

Anyone got any ideas?

The new server is a SQL 2005 cluster, and running this off the active node.

knottyrope 02-25-2009 08:34 PM

I used this doc and used the createdb.exe instead.

View Document

GiantGuineaPig 02-25-2009 08:49 PM

Quote:

Originally Posted by knottyrope (Post 1299466)
I used this doc and used the createdb.exe instead.

Yes that's exactly what I'm doing.

> createdb.exe BESMgmt.cfg

knottyrope 02-25-2009 09:05 PM

You did run this on the SQL server itself correct?

I ran it under administrator and changed the permissions back.

GiantGuineaPig 02-25-2009 09:12 PM

Quote:

Originally Posted by knottyrope (Post 1299515)
You did run this on the SQL server itself correct?

I ran it under administrator and changed the permissions back.

Correct - running off the active cluster in the node.

Logged in as domain admin - but in the cfg file also tried using the besadmin account and the SQL sa account.

knottyrope 02-25-2009 09:49 PM

did you create the BESMgnt database in SSMS before you ran it?

and edit the cfg file?

GiantGuineaPig 02-25-2009 10:41 PM

Quote:

Originally Posted by knottyrope (Post 1299578)
did you create the BESMgnt database in SSMS before you ran it?

and edit the cfg file?

I tried both before and after... doco says before but as a desperate measure tried importing the database anyway then ran it again with no luck.

Yes the cfg file has been changed, that's where I've been specifying the different accounts to use, and the different names for the database. Yes I tried 'local' which was the default :)

knottyrope 02-25-2009 11:05 PM

Did you do this too?

1: Assign appropriate permissions

In the SQL Enterprise Manager, go to Microsoft SQL Servers > SQL Server Group > <SQL_server_name>.
Expand the Microsoft SQL Server selection and expand Security.
Right-click Logins and click New Login.
Type the new name.
For Windows Authentication

On the General tab, click the button to the right of the Name field.


Select the new service account name from the Name list.
Click Add.
Click OK.
For Microsoft SQL Server Authentication

On the General tab, type the name of the Microsoft SQL Server account.
Select the SQL Server Authentication option.
Type the password for the Microsoft SQL Server account.
Click Add.
Click OK.
From the Server Roles tab, select Server Administrators and Database Creators from the Server Role list.
Note: If you are running BlackBerry Enterprise Server software version 4.1 or later, adding the System Administrators role allows you to add BlackBerry smartphone users in a role-based administration environment. For instructions, see the BlackBerry Enterprise Server for Microsoft Exchange: System Administration Guide.

On the Database Access tab, perform the following steps:
Select the check box for the BlackBerry Configuration Database (for example, BESMgmt).
In the Database Roles for <BlackBerry_Configuration_Database_name> list, select the db_owner check box.
Close SQL Enterprise Manager.

GiantGuineaPig 02-25-2009 11:32 PM

Quote:

Originally Posted by knottyrope (Post 1299668)
Did you do this too?

1: Assign appropriate permissions

In the SQL Enterprise Manager, go to Microsoft SQL Servers > SQL Server Group > <SQL_server_name>.
Expand the Microsoft SQL Server selection and expand Security.
Right-click Logins and click New Login.
Type the new name.
For Windows Authentication

On the General tab, click the button to the right of the Name field.


Select the new service account name from the Name list.
Click Add.
Click OK.
For Microsoft SQL Server Authentication

On the General tab, type the name of the Microsoft SQL Server account.
Select the SQL Server Authentication option.
Type the password for the Microsoft SQL Server account.
Click Add.
Click OK.
From the Server Roles tab, select Server Administrators and Database Creators from the Server Role list.
Note: If you are running BlackBerry Enterprise Server software version 4.1 or later, adding the System Administrators role allows you to add BlackBerry smartphone users in a role-based administration environment. For instructions, see the BlackBerry Enterprise Server for Microsoft Exchange: System Administration Guide.

On the Database Access tab, perform the following steps:
Select the check box for the BlackBerry Configuration Database (for example, BESMgmt).
In the Database Roles for <BlackBerry_Configuration_Database_name> list, select the db_owner check box.
Close SQL Enterprise Manager.

I did the relevant parts to MS SQL there, you've mixed up MSDE into it so I didn't do those bits...

knottyrope 02-25-2009 11:58 PM

Have you tried to create another instance?

Might not be possible in your situation but you can add one with out a reboot of SQL if you can. Then you can be sure of a clean area to try it in. Also I have found some password with special chars have made things go wrong too.

also there is one thing about
If you are using Microsoft SQL Server, install the program using the default case-insensitive collation setting.

GiantGuineaPig 02-26-2009 12:08 AM

Hmm well I've ended up now just continuing on anyway - I've connected BES to the new server and it 'seems' to be running at it should... so I'm not sure if it's missing anything. Fingers crossed :)

knottyrope 02-26-2009 12:24 AM

I will cross mine too for you

GiantGuineaPig 02-26-2009 08:48 PM

Everything smooth so far, except someone's claimed that their contacts for mobiles have the wrong country code, where it should be putting in +61 for Australia, it's putting in +1 for US.

Any ideas on this? I thought it was a device setting and not a server setting...

bbnotes 05-06-2009 01:11 AM

I am getting ready to migrate our config database from SQL 2k to 2k5 but do not see how this step applies. This step in the instructions is confusing me.

I am planning on backing up the existing database from the SQL 2000 server and then restoring it on the new 2005.

What is this step actually doing? Why would I create a new database on the server when I actually need to restore the current production one.


All times are GMT -5. The time now is 07:26 PM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.