How to Move the BAM Analysis Database
You can use this procedure to move the BAM Analysis database to another server. From an end-to-end scenario perspective, moving the BAM Analysis database involves two major steps:
Prerequisites
You must be logged on with an account that is a member of the SQL Server sysadmin fixed server role to perform this procedure.
Moving the BAM Analysis Database
Perform the steps in the following procedure to move the BAM Analysis database.
To move the BAM Analysis database
Stop any BAM cube update and data maintenance SSIS packages, or prevent them from running until you have restored the BAM Analysis database.
Stop all BizTalk Server services. For more information, see the topic How To Start, Stop, Pause, Resume, or Restart BizTalk Server Services (https://go.microsoft.com/fwlink/?LinkId=154394) in BizTalk Server Help.
Stop the IIS service.
Stop the BAM Alerts Notification service:
Click Start, click Run, type cmd, and then click OK.
At the command prompt, type:
Net stop NS$BamAlerts
Back up the BAM Analysis database on the old server. For instructions on backing up a database, follow the instructions at How to: Back Up a Database (SQL Server Management Studio) (https://go.microsoft.com/fwlink/?LinkId=156510) in SQL Server Books Online on how to back up a database.
Copy the BAM Analysis database to the new SQL Server computer.
Restore the BAM Analysis database on the new server. For instructions on restoring the database, follow the instructions at How to: Restore a Database Backup (SQL Server Management Studio) (https://go.microsoft.com/fwlink/?LinkId=156511) in SQL Server Books Online on how to restore a database.
Updating References to the New BAM Analysis Database
After you have moved the database, you must update all the references to the new BAM Analysis Database. The following references must be updated:
Update the BAM configuration with the new database and server names. See To update the BAM configuration.
Update the new server and database names in all BAM analysis SSIS packages. See To update server and database names in all BAM SSIS packages.
To update the BAM configuration
Get a copy of the .xml file used for restoring BAM:
Click Start, click Run, type cmd, and then click OK.
On a computer running BizTalk Server, browse to the following folder:
If BizTalk Server is installed on a 64-bit version of Windows Server:
%ProgramFiles(x86)%\Microsoft BizTalk Server 2010\Tracking
If BizTalk Server is installed on a 32-bit version of Windows Server:
%ProgramFiles%\Microsoft BizTalk Server 2010\Tracking
At the command prompt, type:
Bm.exe get-config –filename:BAMConfiguration.xml -server:<servername> -database:<database>
Note
When running this command, substitute the actual name of the server from which to get the configuration information for <servername> and substitute the actual name of the database from which to get the configuration information for <database>. For more information about using the BAM Management (BM) utility, see Infrastructure Management Commands (https://go.microsoft.com/fwlink/?LinkId=156516) in BizTalk Server Help.
Edit the BAMConfiguration.xml file and change the ServerName in the
<DeploymentUnit Name="AnalysisDatabase">
section to the new server name.Save and close the BAMConfiguration.xml file.
Click Start, click Run, type cmd, and then click OK.
On a computer running BizTalk Server, browse to the following folder:
If BizTalk Server is installed on a 64-bit version of Windows Server:
%ProgramFiles(x86)%\Microsoft BizTalk Server 2010\Tracking
If BizTalk Server is installed on a 32-bit version of Windows Server:
%ProgramFiles%\Microsoft BizTalk Server 2010\Tracking
At the command prompt, type:
bm.exe update-config -FileName:BAMConfiguration.xml
To update server and database names in all BAM SSIS packages
Update the server and database names in all BAM analysis SSIS packages, which are prefixed with "BAM_AN_". To do so, click Start, click All Programs, click Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008 SP1, and then click SQL Server Business Intelligence Development Studio.
In SQL Server Business Intelligence Development Studio, create a new project. Click File, click New, and then click Project.
In the New Project dialog box, in the Project Types box, click Business Intelligence Projects. On the right pane, in the Templates box, click Integration Services Project, and then click OK.
In the Integration Services Project dialog box, in Solution Explorer, right-click SSIS Packages, and then click Add Existing Package.
In the Add Copy of Existing Package dialog box, in the Server drop-down list box, select the server that contains the BAM_AN_* packages.
In Package Path, click the ellipses button.
In the SSIS Package dialog box, select the package you want to update, click OK, and then click OK.
The package is now listed in Solution Explorer.
In Solution Explorer, double-click the package you added in the previous step. In Connection Managers tab (available towards the lower half of the screen), double-click data source number 2 (BAMArchive database).
In the Connection Manager dialog box, in the Server name box, enter the name of the server, and then click OK.
Note
Repeat this for data source number 3 (MSDB database).
In the Connection Managers tab, double-click data source number 4 (BAMAnalysis database). In the Add Analysis Services Connection Manager dialog box, click Edit.
In the Connection Manager dialog box, in the Server name box, enter the name of the server, click OK, and then click OK.
Click the Package Explorer tab, double-click the Variables folder, and then update the values for the AnalysisDatabase, AnalysisServer, PrimaryImportDatabase, PrimaryImportServer, StarSchemaDatabase, and StarSchemaServer variables. You must update the values to point to the new server and database.
Note
Repeat step 4 through 12 for all the packages that you want to update.
Click then File menu, and then click Save All.
Start the SQL Server Management Studio. Click Start, click All Programs, click Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008 SP1, and then click SQL Server Management Studio.
In the Connect to Server dialog box, from the Server type drop-down list, select Integration Services.
Specify the server name and credentials to connect to the server and click OK.
In the Object Explorer, expand Integration Services, expand Stored Packages, and then click MSDB.
In the Object Explorer Details tab, right-click the package that you updated earlier and then click Import Package.
In the Import Package dialog box, from the Package location drop-down list, select File System.
In Package Path, navigate to your saved project, select the .dtsx file for the package you want to import, and then click Open.
Click inside the Package Name box to automatically populate the box.
Note
Repeat step 18 through 21 for all the packages that you want to update.
Click OK, and then click Yes to overwrite.
Start all BizTalk Server services. For more information, see the topic How To Start, Stop, Pause, Resume, or Restart BizTalk Server Services (https://go.microsoft.com/fwlink/?LinkId=154394) in BizTalk Server Help.
Start the IIS service.
Start the BAM Alerts Notification service:
Click Start, click Run, type cmd, and then click OK.
At the command prompt, type:
Net start NS$BamAlerts
Enable any BAM cube update and data maintenance SSIS packages.