CA Service Management

  • 1.  Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 05:54 AM

    Hello,

     

    CA Service Desk 12.9

    I am looking for recommended approach to copy the CMDB from one environment to another environment (PROD to QA).

    what would be the recommended procedure to copy the CMDB between two systems.

     

    Regards,

    Venkat



  • 2.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 07:28 AM


  • 3.  Re: Recommended Procedure to copy the CMDB between environments
    Best Answer

    Posted Jul 28, 2017 08:00 AM

    Hi Venkat,  Are you looking to move just the database itself, or are you looking to build a replica of a current environment?  If you are looking to build a replica of a current environment, you can follow these steps:

     

    Steps to Replicate Prod to QA – For SDM 12.9 - Using SQL Backup and SQL Restore


    PART 1 – GATHER FILES/DATA FROM PROD SYSTEM
    1. Do a SQL Backup of the MDB – save as .bak file (usually a normal SQL backup)
    2. Make a copy of the “$NX_ROOT$\site\mods” directory – zip it up if possible.
    3. Make a copy of the “$NX_ROOT$\site\attachments” directory and zip it up if possible
    4. Copy above files to the QA SYSTEM – but don’t put them in place yet, just copy them to a stand-by directory on that machine.

     

    PART 2 – PREPARE THE QA SYSTEM & REPLICATE PROD ENVIRONMENT

    If your QA system has been previously used, and has some differences in the mods (customizations) from production, then you should follow these steps first:
    1. rename the \site\mods directory to “old_mods”
    2. rename the \site\attachments directory to “old_attachments”
    3. delete the existing QA MDB
    4. run the 12.9 MDB installer to create a vanilla MDB on the DB server
    5. run pdm_configure on the QA server and select “Load Default Data” – this will create a vanilla SDM install

    Follow these steps to Replicate Prod to QA:

    NOTE: You may skip steps 1-3 if you already have a running QA system. In that scenario, start with step 4.

    1. Install SQL in MIXED MODE Authentication
    2. Run a pdm_configure checking off the box to “load the default data” – against the newly installed SQL database (this will create a default MDB)
    3. After pdm_configure is complete – make sure you can log into service desk, and then STOP service desk services.
    4. Do the SQL Restore of your PROD mdb onto the newly installed SQL on this QA System
    5. Next, either you, or your DBA needs to run the stored procedure to fix the orphaned user(s) (ServiceDesk in this case) on the restored MDB in SQL:
    a. SHOULD BE SOMETHING LIKE THIS: sp_change_users_login 'AUTO_FIX','ServiceDesk'
    6. Using SQL, update the usp_servers table to set the host names properly for the new environment
    7. Run a pdm_configure – here you will get a warning stating that the database has been previously configured by xxxxx-server –you will say YES/OK to continue – this will then change the servername values in the dlgsrv table to be the correct servername for the QA application server.
    8. When pdm_configure completes, start Web Screen Painter (also called WSP) and log in
    9. Go to Tools > Schema Designer
    10. Click on any table on the tree on the left, and put an “X” (or any value) in the description field on the right (we refer to this as a “dummy update” in schema designer)
    11. In the schema designer window, go to File > Save
    12. Close the Schema Designer window
    13. In the main Web Screen Painter window, click File > Save and Publish
    14. Click OK on the dialog boxes
    15. Exit out of WSP and close all WSP windows and browser windows
    16. Run: pdm_halt -w (this stops all SD Services)
    17. Run: pdm_publish (this will merge the schema and load the correct schema files)
    18. Restore the $NX_ROOT$\site\mods directory (the one you backed up from the prod system earlier)
    19. Copy over the $NX_ROOT$\site\attachments (the whole directory that you copied from prod) into the site directory – overwriting the attachments folder that is already there on the QA SYSTEM (if you didn’t rename it earlier)
    20. Run another pdm_configure – BUT DO NOT SELECT TO LOAD DEFAULT DATA – MAKE SURE THE CHECK BOX FOR THIS IS NOT CHECKED!!!
    21. After configuration is complete – start service desk services if not started, and do a complete test of all Service Desk functionality.

     

    Hope this helps,

    Jon I.



  • 4.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 08:06 AM

    Thanks Brian,Jon

     

    The above procedure is to replicate the MDB, however, I am looking for any procedure to copy only the mdb database. Can this can be achieved using Webservices or Grloader?

     

    Thanks

    Venkat



  • 5.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 08:15 AM

    Hi Venkat,

     

    What you are trying to achieve can only be done with the steps myself & Jon provided.

     

    Kind Regards,

    Brian



  • 6.  RE: Re: Recommended Procedure to copy the CMDB between environments

    Posted Nov 26, 2020 08:44 AM
    Hello, the procedure works as is.  But could you please extend the step 6?. 

    In my setup I had two records, so I updated the first record which I guess belongs to the first main production server to my development server  then deleted the second record which I guess belongs to the secondary production server.  The system is up and running and I cannot find any problem, but I could like some confirmation about the procedure I did in the step 6. 

    Then when running the 2th pdm_config the system do not allow to continue due it said: this db is already used by a CA .. or something like that.. then I quit and continue with other steps without problems.

    I am conserned about any hidden problem because of the step 6 and the quit on the pdm_config step, hope to find any problem during my tests.

    By the way, my CA SDM is a 12.9 and I am training myself with some procedures prior to attempt an upgrade to 17.3 in the following weeks.


    ------------------------------
    Corporate Service Delivery & Achitecture Director
    Yanbal International
    ------------------------------



  • 7.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 11:35 AM

    Their is typo error in my previous message. Sorry for that.

     

     

    The above procedure is to replicate the MDB, however, I am looking for any procedure to copy only the CMDB configuration items only. Can this can be achieved using Webservices or Grloader?

     

    Thank you,

    Venkat



  • 8.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 28, 2017 01:39 PM

    We have no supported way to move only CIs/cmdb data.  We only support moving the whole mdb.


    Regards,

    Jon



  • 9.  Re: Recommended Procedure to copy the CMDB between environments

    Posted Jul 31, 2017 07:12 AM

    Hi Venkat,

     

    Perhaps you could upgrade to r14.1 or r17.0. and take advantage of the new 'Environment Promotion' feature introduced. It look like that might help with moving some items from one environment to another and save you the effort of moving\copying everything.. See:

     

    CA SDM Environment Promotion - CA Service Management - 14.1 - CA Technologies Documentation 

     

    Kind Regards,

    Brian