How to move an existing Altiris database from one SQL server to a new SQL server 2005

Article:HOWTO8627  |  Created: 2008-02-26  |  Updated: 2011-04-01  |  Article URL http://www.symantec.com/docs/HOWTO8627
Article Type
How To



Question
The Notification Server needs to be moved to a new SQL Server* 2005. How do you move an existing Altiris database to a SQL Server 2005?

Answer
Disclaimer: The following steps are provided as reference. Questions or concerns or for more details about how to migrate a database from a SQL Server, please contact Microsoft.

Note: For steps for how to move/migrate the Altiris Database from a SQL Server 2000 to another SQL Server 2000, see article HOWTO2574, "How to move an existing Altiris database from one SQL server to a new SQL server." 



There are two ways that you can take to approach this issue:

  1. Backing up your Notification Server and then moving the backup to the new SQL server.
  2. Detaching the Altiris database from the old SQL server and attaching it to the new SQL server.

Option 1: Using a Backup file
If you choose to move the backup file to the new SQL server (option 1), follow these steps:

From a SQL Server 2000 to a SQL Server 2005

 

  1. Back up database:
    1. Launch SQL Enterprise Manager.
    2. Locate your current server and open the Database folder.
    3. Right-click on the database you want to move and select Properties.
    4. Make note of the database Collation on the General tab.
    5. Right-click on the database and select All Tasks > Backup Database.
    6. The SQL Server Backup Dialog appears. Make sure that under Backup, Database-Complete is marked.
    7. Under Destination, click the Add button.
    8. The Select Backup Destination dialog appears. In the Filename field, browse to the path where to place the backup database file.
    9. Click OK.
    10. Repeat steps e-i for the Altiris_Incidents database used for Alert Manager and Helpdesk.
  2. Restore database:
    1. On the new SQL server, Launch Microsoft SQL Maintenance Studio.
    2. Under Databases folder > System Databases, right-click on the Master database and select Properties.
    3. Make sure that the Collation of the master database is the same as the database you are going to restore.
      In order for Notification Server to function both the Master and Altiris databases must have the same collation (collations cannot be changed on established databases).
    4. Move or copy the backup file to the new location on the new SQL server.
    5. Under the new server name, right-click on the Databases folder.
    6. Select All Tasks Restore Database.
    7. The Restore Database dialog appears. Select the database name or enter the database name that you would like to restore the backup database under Destination for Restore > To database. Example: "Altiris".
    8. Mark the From Device radio button under Source for restore.
    9. Click on the ... button. The Specify Backup dialog appears. Under Backup media, choose File.
    10. Under Backup Location, click the Add button to browse for the backup database file (usually a file with .bak extension) and click OK.
    11. Under Select the backup sets to restore, check the Restore box for the selected backup file.
    12. Switch to the Options page and make sure the restore path of the data files and log files have a valid path.
    13. Click OK to begin the restore and close.
    14. Repeat steps d-m for the Altiris_Incidents database
From a SQL Server 2005 to a SQL Server 2005 
  1. Backup database:
    1. Launch Microsoft SQL Management Studio.
    2. Locate your current server and open the Databases folder.
    3. Right-click on the database you want to move and select Properties > Maintenance.
    4. Make note of the database Collation on the General page
    5. Right-click on the database and select Tasks > Backup.
    6. The Backup Database dialog appears. Make sure that under Source > Backup Type > Full is selected.
    7. Under Destination, click the Add button.
    8. The Select Backup Destination dialog appears. In the Filename field, browse to the path where to place the backup database file.
    9. Click OK.
    10. Repeat steps e-i for the Altiris_Incidents database used for Alert Manager and Helpdesk.
  2. Restore database:
    1. On the new SQL server 2005, Launch Microsoft SQL Maintenance Studio.
    2. Under Databases folder > System Databases, right-click on the Master database and select Properties.
    3. Make sure that the Collation of the master database is the same as the database you are going to restore.
      In order for Notification Server to function both the Master and Altiris databases must have the same collation (collations cannot be changed on established databases).
    4. Move or copy the backup file to the new location on the new SQL server.
    5. Under the new server name, right-click on the Databases folder.
    6. Select All Tasks > Restore Database.
    7. The Restore Database dialog appears. Select the database name or enter the database name that you would like to restore the backup database under Destination for Restore > To database. Example: "Altiris".
    8. Mark the From Device radio button under Source for restore.
    9. Click on the ... button. The Specify Backup dialog appears. Under Backup media, choose File.
    10. Under Backup Location, click the Add button to browse for the backup database file (usually a file with .bak extension) and click OK.
    11. Under Select the backup sets to restore, check the Restore box for the selected backup file.
    12. Switch to the Options page and make sure the restore path of the data files and log files have a valid path.
    13. Click OK to begin the restore and close.
    14. Repeat steps d-m for the Altiris_Incidents database

Option 2: Detaching/Attaching
If you choose to detach the Altiris database from the old SQL server and attach it to the new SQL server (option 2), follow these steps:

Note: Additional Notes can be found here.

From a SQL Server 2000 to a SQL Server 2005

 

  1. Detaching the database files:
    1. Make sure that you have a current backup of all of the databases you are planning to move. Open Microsoft SQL Management Studio on the new SQL server 2005
    2. Stop all of the Altiris Services. These are found on the Notification server, by clicking Programs > Administrative Tools > Services, and stopping all of the Altiris-related services.
    3. Launch SQL Enterprise Manager
    4. Right-click the database you want to move and select Properties.
    5. Make note of the database Collation on the General tab.
    6. Choose All Tasks > Detach Database.
    7. Verify that current connections are at 0. If not, clear all connections, by clicking the Clear Connections button.
    8. Once that is completed, browse to the existing database location in the file system.
    9. Grab both the .mdf file and the .ldf files for the databases you would like to move, and move or copy to the desired location on the new SQL server.
  2. Attaching the Database files:
    1.  
    2. Right-click on the Master database and select Properties.
    3. Make sure that the Collation of the master database is the same as the database you are going to restore.
      In order for Notification Server to function both the Master and Altiris databases must have the same collation (collations cannot be changed on established databases)
    4. Right-click on the Databases folder.
    5. Select Attach.
    6. Make sure the database has the same names.
    7. Specify that the database owner (DBO) to be the same SQL account as was used when the NS was installed.
    8. Click OK.
    9. Restart the Notification Server services.

From a SQL Server 2005 to a SQL Server 2005

  1. Detaching the database files:
    1. Make sure that you have a current backup of all of the databases you are planning to move. Open Microsoft SQL Management Studio on the new SQL server 2005
    2. Stop all of the Altiris Services. These are found on the NS server, by clicking Programs > Administrative Tools > Services, and stopping all of the Altiris-related services.
    3. Launch Microsoft SQL Maintenance Studio.
    4. Right-click the database you want to move and select Properties.
    5. Make note of the database Collation on the General page.
    6. Choose Tasks > Detach.
    7. In the Detach Database window, verify that current connections are at 0. If not, by clicking on the Active Connections link you should be able to see what the open connections are. In order to stop the active connections, check the 'Drop Connection' checkbox.
    8. Once that is completed, browse to the existing database location in the file system.
    9. Grab both the .mdf file and the .ldf files for the databases you would like to move, and move or copy to the desired location on the new SQL server.
  2. Attaching the Database files:
    1.  
    2. Right-click on the Master database and select Properties.
    3. Make sure that the Collation of the master database is the same as the database you are going to restore.
      In order for Notification Server to function both the Master and Altiris databases must have the same collation (collations cannot be changed on established databases)
    4. Right-click on the Databases folder.
    5. Select Attach.
    6. Make sure the database has the same names.
    7. Specify that the database owner (DBO) to be the same SQL account as was used when the NS was installed.
    8. Click OK.
    9. Restart the Notification Server services.

 

 

 

Option 3: 
If the database is simply being moved from one database server to another, and the Notification Server has not changed etc then simply do the following 5 steps: 

1. Open Regedit on the Notification Server and go to "HKLM\Software\Altiris\eXpress\Notification Server"
2. Modify the "DBDsn" string value in the right colum.  Look for the separated value: SERVER= and change it to the name of the server and the instance the database resides in.   Verify that the DATABASE= tag reflects the correct name of the restored database.
  If the database is in the default instance then just put the name of the database server. If the database is in a named instance then specific the instance.
 
  Examples:
 SERVER=ServerName;   {If the database is in the default instance}
 SERVER=ServerName\Instance {If the database is restored in a named instance}
 
3. Using Notepad++ or a text editor capable of editing xml files without stripping out certain xml tags edit .\Program Files\Altiris\Notification Server\Config\CoreSettings.config
  
   Search for "DbServer" and change the name in the value tag has the name and instance of the new database server.
   Search for "DbCatalog" and verify that the name specified in the value is the same name as the database as it was restored on the new DB server.
4. Verify that the database access\logon account used by the NS has rights to the database on the new server. It should have dbo.
5. Restart the Altiris Service

If problems arise in accessing the console or other errors, it may be necessary to reconfigure the NS. You can do so by doing the following:


If you are running NS 6.x:: 
 
Database Settings page - This method will work as long as  you have not changed out or reinstalled the server on which the NS Resides.

  1. Open the NS Console
  2. Navigate to Configuration -> Server Settings -> Notification Server Settings -> Database Settings
  3. Specify the new SQL Server
  4. If your database is correctly attached to the new SQL Server, you should see it available in the "Use existing Database" dropdown. Select your Database
  5. Click Apply

After making the change using the above instructions, you may have some difficulty accessing the NS console and/or reports. If you can't access the console, see HOWTO2501. If you have issues opening / running reports, see TECH17463 (NS Report Builder does not display all available tables).

NSSetup
NOTE: If you choose to run NSSetup, some Notification Server and Solution settings will revert to their Defaults.

After you finished moving the Altiris database to the new SQL server, you may need to run NSSetup to make sure that Notification server is pointing to the right SQL server and database. To run NSSetup, open your browser on the Notification server and type the following link: http://localhost/Altiris/NS/install/nssetup.aspx or http://<server name>/Altiris/NS/install/nssetup.aspx

Then follow the steps for the NSSetup configuration: 

  1. Make sure that you add/create the proper username. You can use the previous Altiris admin username or you can make a new one. Usually the format is DOMAIN\username or ComputerName\username. Then use a password that follows the criteria for your organization.
  2. Then the next screen will ask you about email accounts, mail server, etc. Add that information.
  3. The last step, select the new SQL server, and select to use your previous database, and then select use application credentials (this option make sure that the username and password that you are using also it is associated to your database) or the SA account that you have on your SQL server.

Then the configuration will continue and it will take few minutes.

When the installation is done, go to Start > All Programs > Altiris > Altiris Console. It should open the Notification Server Console.

Note: This note is in case you left attached a copy of your Altiris database in the old SQL server after moving the Altiris database to the new SQL server (some customers like to have the Notification Server still pointing to the old SQL server for few more days until everything is ready on the new SQL server). In order to make the change on the Notification Server from one SQL server to another without running NSSetup, See the above section titled Database Settings Page and follow the instructions.

 

If you are running Symantec Management Platform (NS 7.x)::

After you finished moving NSSetup does not function on Notification Server 7.x. You can move the database by following this procedure:

  1. Re-attach a copy of the NS 7 Database to the Old SQL Server
  2. Open the NS 7 Console and navigate to All Settings -> Notification Server Settings -> Database Settings
  3. Change the database settings to point to the new SQL Server
  4. Some customers have needed to run the Reconfigure Database option listed on this page as well.

 Additional information regarding HP's RDP additional migration techniques can found in article HOWTO2249


Legacy ID



40605


Article URL http://www.symantec.com/docs/HOWTO8627


Terms of use for this information are found in Legal Notices