How To Refresh Digital Workplace Catalog Environment - Lower Environment with Production Database copy

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Digital Workplace Advanced


    APPLIES TO:

    DWP 18.x 19.x



    QUESTION:

     
       How To Refresh Digital Workplace Catalog Environment - Lower Environment with Production Database copy  


    ANSWER:

     

      Step 1: Take Database of System and Tenant Database from Production Environment  
     
    Step 2: Stop DWP Catalog (./dwpcontroller stop ) in lower environment  
     
    Step 3: Restore the System and tenant database to Lower Environment  
     
    Step 4: Before starting server, clean up the entries from below forms  
                 select * from servgrp_applic;  
                 select * from servgrp_board;  
                 select * from servgrp_config;  
                 select * from servgrp_ftslic;  
                 select * from servgrp_resources;  
                 select * from servgrp_userlic;  
                 select * from AR_System_Server_Group_Operati;  
                 select * from AR_System_Service_Failover_Ran;  
                 select * from AR_System_Service_Failover_Whi;  
     
     
    Step 5:           Update the AR_System_tenant Table in the System database with appropriate database user name, password, and database name.   
       
     
    Step 6:        Check the ar.conf on the /opt/bmc/digitalworkplace/conf directory for the below parameters  
     
                   Db-name: dwp_db_app  
                   Db-user: dwp_admin_app  
                   Db-Server-Port: 1433  
                   Db-Type: sqlserver  
                   Db-Character-Set: UTF-16  
                   Db-Host-Name: xxxxxxx  
                   Db-password: vxxxxxx  
     
     
    Step 7:          Start the DWP Catalog Server ( ./dwpcontroller start )  
     
    Step 8:          Configure the Operation Ranking  
     
    Step 9:         Enable FTS and perform FTS reindex  
     
    Step 10:      At this point, you should have all the data from DWP Catalog Production database to Lower Environment  
                       Note: Make sure to disable below parameter if you do not want the email to be sent out from lower environment  
     
                      Location : /opt/bmc/digitalworkplace/sb/env/set_script_variables.sh  
     
                     export SMTP_ADDRESS=xxxxxxx  
                     export SMTP_PORT=25  
                     export SMTP_USER_NAME=xxxxxxxxxxx  
                     export SMTP_PASSWORD=xxxxxxx  
     
    If above steps does not help to resolve the issue. you can run below steps to update  and re-compile some views in Tenant DB.  
     
    Using DB Admin user, login to the target Tenant DB  
    Run this query to check if there are views that are referencing source System DB  
     
    SELECT count(*)  
    FROM sys.sql_modules WHERE definition LIKE '%<SOURCE  SYSTEM DB>%'  
    If result from previous step shows more than 0 rows, generate sql script to update the views by running this sql command.   
    Replace "SOURCE SAAS SYSTEM DB" and "TARGET SYSTEM DB"  
     
    SELECT  
    REPLACE(  
            REPLACE(definition,'CREATE VIEW','ALTER VIEW'),  
            '<SOURCE SYSTEM DB>','<TARGET SYSTEM DB>'  
            )  + CHAR(13) + CHAR(10) + 'GO' + CHAR(13) + CHAR(10)  
    FROM sys.sql_modules WHERE definition LIKE '%<SOURCE SYSTEM DB>%'  
    Run the sql scripts generated from previous step to update the database views.  
     
    There are views that have the database name hardcoded. They may need to be updated  
      
      

     


    Article Number:

    000173888


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles