A.4 Configuring Restored Repositories

After you restore the repository on the new SQL Server, additional configuration is required to ensure proper operation.

To configure the restored repository:

  1. To verify that the compatibility level of the restored repository is set to the appropriate version of SQL Server, complete the following steps in Microsoft SQL Server Management Studio:

    1. Expand SQL_Server_name\Databases.

    2. Right-click the restored repository and select Properties.

    3. On the Options page, ensure that the compatibility level is set to SQL Server 2012 (110) or SQL Server 2014 (120).

  2. To identify the SQL Server user accounts you must recreate for the repository, complete the following steps:

    1. Expand SQL_Server_name\Databases.

    2. Right-click the repository and select New Query.

    3. In the query window, type the following command, and then click Execute:

      SELECT  name,
              CASE WHEN type = 'S' THEN 'SQL'
                   ELSE 'Windows'
              END AS 'Type'
      FROM    sys.database_principals
      WHERE   type IN ( 'S', 'U' )
              AND name != 'dbo'
              AND default_schema_name IS NOT NULL
              AND default_schema_name != 'guest'
      ORDER BY name ASC
      
    4. Expand repository_name\Security\Users and compare the accounts listed in the results table for the query to the accounts in the Users folder. Note the accounts that appear in both locations.

  3. To recreate the SQL Server logins for the repository, complete the following steps for each account you noted in Step 2:

    1. Right-click the repository and select New Query.

    2. In the query window, type the following command, and then click Execute:

      sp_dropuser 'user_name'
      
    3. Expand SQL_Server_name\Security\Logins.

    4. With the exception of the probe account, for each account you removed in Step 3.b, right-click Logins and select New Login.

    5. Configure the login with the properties you noted in Step 4 of Section A.2, Preparing to Migrate the Repositories.

    6. (Conditional) If a repository account you removed already exists as a SQL Server account, use AppManager Security Manager (for the QDB) or the Control Center console (for the CCDB) to assign the accounts to the repository.

  4. To verify the repository owner, complete the following steps:

    1. Right-click the restored repository and select New Query.

    2. In the query window, type the following command, and then click Execute:

      sp_helpdb 'repository_name'
      
  5. (Conditional) If the repository owner is not correct, to change the owner, type the following command, and then click Execute:

    sp_changedbowner 'repository_owner'
    
  6. (Conditional) If you restored the repository on a different computer or with a different name, complete the following steps to restore SQL Server jobs in the restored repository:

    1. (Conditional) If you restored the repository on a different computer or with a different name, use the Task Scheduler Configuration Utility to remove the old repository from the Task Scheduler Service and add the restored repository to the service. For information about removing and adding repositories, see Configuring the Task Scheduler Service and SQL Server Jobs in the Administrator Guide for AppManager.

    2. (Conditional) If you restored SQL Server jobs in the QDB, verify that the following jobs are listed for the QDB in the Task Scheduler Configuration Utility:

      • NetIQ Archive Event

      • NetIQ Dynamic View

      • NetIQ MS Healthcheck

      • NetIQ Monitoring Policy

      • NetIQ Purge Archive Event

      • NetIQ Rule Based Dynamic View

      • NetIQ Update MG Server Membership

      • NetIQ Uphold Parameter Overrides

      • NetIQ Daily

      • NetIQ Hourly

      • NetIQ Minutely

      • NetIQ Weekly

      • NetIQ License Audit

      • NetIQ Remove Old Data

      • NetIQ Rebuild Data Views

      • NetIQ VSG Modtime Update

    3. (Conditional) If you restored SQL Server jobs in the CCDB, verify that the following jobs are listed for the CCDB in the Task Scheduler Configuration Utility:

      • NetIQ Daily

      • NetIQ Half-Hourly Task

      • NetIQ Hourly

      • NetIQ Manage SQL Jobs

      • NetIQ SMV Hourly Task

    4. (Conditional) If you previously customized the schedule for a job, use the Task Scheduler Configuration Utility to customize the schedule again.

  7. (Conditional) If you are migrating the QDB and Control Center manages it, complete the following steps to update the ComponentCurrentVersion table with the new SQL Server information for the restored QDB:

    1. In SQL Server Management Studio on the CCDB computer, right-click the CCDB and select New Query.

    2. In the query window, to obtain the DataSourceIntID value for the QDB, type the following command, and then click Execute:

      Select DataSourceIntID from dbo.ComponentCurrentVersion
      where ComponentName = 'NetIQ AppManager Repository'
      and MachineName = 'old_SQL_Server_name\instance'
      
    3. In the results table, note the DataSourceIntID value. You will need this value for Step 7.e.

    4. Right-click the CCDB and select New Query.

    5. In the query window, type the following command, and then click Execute:

      update dbo.ComponentCurrentVersion
      set MachineName = 'new_QDB_SQL_Server_name\instance'
      where ComponentName = 'NetIQ AppManager Repository'
      and DataSourceIntID = 'DataSourceIntID_value_from_Step 7.c'
      
  8. (Conditional) If you are migrating the CCDB, type the following command and then click Execute to update the ComponentCurrentVersion table with the new SQL Server information:

    update dbo.ComponentCurrentVersion
    set MachineName = 'new_SQL_Server_name\instance'
    where ComponentName = 'NetIQ AppManager Control Center Repository'
    
  9. (Conditional) If you are migrating the CCDB and restored it on a different computer, complete the following steps to update the Version table with the new computer name:

    1. Right-click the restored CCDB and select New Query.

    2. In the query window, type the following command, and then click Execute:

      update dbo.Version
      set MachineName = 'new_computer_name'
      where Component = 'CCDB'
      
  10. (Conditional) If you are migrating the CCDB and it manages remote QDBs, complete the following steps to restore SQL Server links to the remote QDBs:

    1. Expand SQL_Server_name\Server Objects.

    2. Right-click the Linked Servers folder and select New Linked Server.

    3. On the General page, in the Linked server field, specify the name and instance, if applicable, of the SQL Server that hosts the QDB for which you are restoring the link.

    4. On the General page, for Server type, select the SQL Server radio button.

    5. On the Security page, to add local logins defined before you migrated the CCDB, click Add.

    6. On the Server Options page, set the RPC and RPC Out values to True.

    7. Click OK to restore the SQL Server link.

After you configure the restored repository, update components and services that connect to it. For more information about the components and services to update, see Section A.5, Updating Connected Components and Services.