Post-Migration Tasks

About Running the Migration Scripts

To migrate to SAS Business Rules Manager 2.2, you must run migration scripts as part of the SAS post-migration process. These scripts update the structure of the database tables, and add new tables, sequences, and triggers that are new with SAS Business Rules Manager 2.2.
Note: In a multi-tier environment, copy the migration scripts to the server tier before you run them.

Migrate from SAS Business Rules Manager 1.2 to 2.2 for Oracle

The scripts for migrating an Oracle database are located in the following directory:
!SASHOME/SASDecisionManagerCommonMidTierforDecisionManager/2.2/Config/Deployment/dbscript/oracle/migration/
To migrate an Oracle database from SAS Business Rules Manager 1.2 to 2.2:
  1. Edit the migration_brm_1.2m1_to_brm_2.2_sql migration script. Replace @schema.name@ with the schema name for your database.
  2. Run the migration_brm_1.2m1_to_brm_2.2_sql migration script.
  3. Review the Business Rules Manager Web 2.2 properties in SAS Management Console to ensure that the values are appropriate for your environment.
  4. In SAS Management Console, add all users that need access to SAS Business Rules Manager to the Decision Manager Users group.
  5. Update your user group memberships as needed. See Update User Group Membership for more information.
  6. Sign in to SAS Business Rules Manager and republish rule flows if needed. You must republish rule flows that were published with SAS Business Rules Manager 1.2 in order for them to be valid in a SAS Data Integration Studio job. The previous version can no longer be referenced through SAS Data Integration Studio, and the rule flow cannot be edited in SAS Business Rules Manager 2.2. However, scheduled jobs will continue to work.

Migrate from SAS Business Rules Manager 2.1 to 2.2 for Oracle

The scripts for migrating an Oracle database are located in the following directory:
!SASHOME/SASDecisionManagerCommonMidTierforDecisionManager/2.2/Config/Deployment/dbscript/oracle/migration/
To migrate an Oracle database from SAS Business Rules Manager 2.1 to 2.2:
  1. Edit the migration_brm_2.1_to_brm_2.2_sql migration script. Replace @schema.name@ in each file with the schema name for your database.
  2. Run the migration_brm_2.1_to_brm_2.2_sql migration script.
  3. Review the configuration properties in SAS Management Console. Ensure that the values are appropriate for the new environment. See Review Business Rules Manager Web Properties for more information.
  4. Update your user group memberships as needed. See Update User Group Membership for more information.

Migrate from SAS Business Rules Manager 2.1 to 2.2 for SAS Decision Manager Data Server

You need to run PostgreSQL commands to migrate and upgrade the database. These commands are located in the following directory:
!SASHOME/SASWebInfrastructurePlatformDataServer/9.4/bin
When you run these commands, substitute the correct values for the host name, port number, and user ID for your database. These commands prompt you to enter a password.
Note: If you are performing the migration in a UNIX operating environment and these commands fail, you might need to set environment variables. See Set Environment Variables for UNIX for more information.
To migrate to SAS Business Rules Manager 2.2 and use the SAS Decision Manager Data Server:
  1. On the source machine, run the pg_dump command. This command creates a script file that contains the SQL commands that are needed to reconstruct the database:
    pg_dump --host=host_name --port=nnnn --username=database_owner_userID 
    --password –Fp -O brmdb > brmdb.dump
    The –O option exports the database without commands that set ownership of any of the database objects.
  2. Copy the generated file brmdb.dump to the target server.
  3. Stop SASServer7.
  4. If SAS Model Manager 13.1 is installed on the target server, run the following command to create a backup of the SAS Model Manager tables:
    pg_dump --host=host_name --port=nnnn --username=userID 
    --password -t sas mm* database_name > mmbackup-131.dump
    Note: Specify the user ID for Decision Manager Common Middle Tier. Do not specify the user ID of the database owner account.
  5. On the target server, run the dropdb command to drop the database that was created by the SAS Deployment Wizard:
    dropdb --host=host_name --port=nnnn --username=database_owner_userID 
    --password database_name
    
  6. On the target server, run the createdb command to create a new, empty database:
    createdb --host=host_name --port=nnnn --username=database_owner_userID 
    --password database_name
  7. On the target server, restore the exported database:
    psql --host=host_name --port=nnnn -f brmdb.dump database_name userID
    Note: Specify the user ID for Decision Manager Common Middle Tier. Do not specify the user ID of the database owner account.
    Note: You might see messages such as no privileges were granted for "public" or role userID does not exist. These messages mean that these users are no longer applicable to the upgraded database instance and can be ignored.
  8. Run the migration_brm_2.1_to_brm_2.2_sql migration script that is located in the following directory:
    !SASHOME/SASDecisionManagerCommonMidTierforDecisionManager/2.2/Config/Deployment/dbscript/postgres/migration
  9. Run the edm_workflow_interface_create_*.sql scripts. These scripts are located in the following directory:
    !SASHOME/SASDecisionManagerCommonMidTierforDecisionManager/2.2/Config/Deployment/dbscript/postgres
    Note: In a multi-tier environment, copy the scripts to the server tier before you run them.
    Run the following scripts in the order listed:
    1. edm_workflow_interface_create_table.sql
    2. edm_workflow_interface_create_sequence.sql
    3. edm_workflow_interface_create_constraint.sql
    4. edm_workflow_interface_create_trigger.sql
    5. edm_workflow_interface_required_inserts.sql
  10. Restore the SAS Model Manager tables by using the backup that you created in Step 4:
    psql --host=host_name --port=nnnn -f mmbackup-131.dump database_name userID
    Note: Specify the user ID for Decision Manager Common Middle Tier. Do not specify the user ID of the database owner account.
  11. Review the configuration properties in SAS Management Console. Ensure that the values are appropriate for the new environment. See Review Business Rules Manager Web Properties for more information.
  12. Update your user group memberships as needed. See Update User Group Membership for more information.

Migrate from SAS Business Rules Manager 2.2 to Version 2.2 (Hardware Upgrade)

You need to run PostgreSQL commands in order to migrate the SAS Decision Manager Common Data Server database. These commands are located in the following directory:
!SASHOME/SASWebInfrastructurePlatformDataServer/9.4/bin
When you run these commands, substitute the correct values for the host name, port number, and user ID for your database. These commands prompt you to enter a password.
Note: If you are performing the upgrade in a UNIX operating environment and these commands fail, you might need to set environment variables. See Set Environment Variables for UNIX for more information.
  1. On the source machine, run the pg_dump command. This command creates a script file that contains the SQL commands that are needed to reconstruct the database:
    pg_dump --host=host_name --port=nnnn --username=database_owner_userID 
    --password –Fp dcmdb > dcmdb.dump
  2. Copy the generated file dcmdb.dump to the target server.
  3. Stop SASServer7.
  4. On the target server, run the dropdb command to drop the database that was created by the SAS Deployment Wizard:
    dropdb --host=host_name --port=nnnn --username=database_owner_userID 
    --password database_name
    
  5. On the target server, run the createdb command to create a new, empty database:
    createdb --host=host_name --port=nnnn --username=database_owner_userID 
    --password database_name
  6. On the target server, restore the exported database:
    psql --host=host_name --port=nnnn -f dcmdb.dump database_name userID
    Note: Specify the user ID for Decision Manager Common Middle Tier. Do not specify the user ID of the database owner account.
    Note: You might see messages such as no privileges were granted for "public" or role userID does not exist. These messages mean that these users are no longer applicable to the upgraded database instance and can be ignored.