Skip to Content

Hi,

What is Lcm_cli.bat ?


It is Command line interface for running the  Promotion Management when you wanted to migrate the content more than 1000+ objects between SAP Business Intelligence BI 4.x environment.

When using GUI method i.e. Promotion Management it is not possible to promote/create a lcmbiar file with more than 1000+ objects.


Note : Promotion Management has 200+ objects limit in GUI Mode and its not a hard limit. Simple objects can be had in 1000’s. It’s not objects that are limitation – its the time the script takes to populate list and calculate dependencies. If it can be done in 20 minutes or less GUI can handle it, otherwise we run up against web session timeouts and ultimately it will give some error and i.e. we use LCM_CLI.bat tool as the alternate method

  • The promotion management command line tool takes a properties file as a parameter. The properties file contains the required parameters to communicate the promotion management tool about the actions to perform, system(s) to connection to, connection methods, objects to promote, and so on.
  • The file must be in the form of <File Name>.properties
  • Please refer to the Administrators guide for a complete list of parameters to use with Lcm_cli.bat


Files Included :

  1. 3 Job Properties Files for Users and User’s Groups, Dependent Objects, Primary Objects (Job1_userandgroups.properties , Job2_dependencies.properties, Job3_primaryobjects.properties)


Pre-requisites:

  • SAP BusinessObjects Business Intelligence platform 4.0\4.1 should be installed on the machine and promotion should be done between Same version or From Lower to Higher ( Example. Source (BI 4.0 SP9) to Destination (BI 4.1 SP6) etc.

Note : Use LCM of Higher Version only when promoting the objects from lower version to higher version.

  • Ensure to Run the command prompt as “Run as Administrator”
  • For Better Results ensure you make the changes for Resources using KBA – “1969259 – LCM CLI Master Note – How to promote thousands of objects across BI4 environments” For More queries and Sample queries.
  • If you are using third party authentication then ensure you follow the above article and make the necessary changes.
  • Changes need to be done in .properties files for Source and Destination.



Steps to Prepare the Files and Execute them:


  • Download the 3 properties files from the link : [DOWNLOAD : LCM_CLI Properties File]
  • Place these files on the server in any directory and ensure the path is small (Example : D:\content , C:\lcmpromote etc )

1.JPG

  • Edit all the .properties files and make the changes according to your environment like : CMS Name , Password , Source and Destination etc.


2.JPG

5.JPG

4.JPG


  • Open Command Prompt as Administrator and Navigate to the Location of lcm_cli.bat file.

6.JPG

7.JPG

  • Execute the lcm_cli and give the properties files as the parameters. [ lcm_cli.bat -lcmproperty “<pathofpropertiesfile>” ]8.JPG


9.JPG


  • Do the same for all the properties files and ensure the jobs are completed successfully. These Job’s will be visible in the CMC >> Promotion Management of the Server which is mentioned in “LCM_CMS” in properties file.


10.JPG

11.JPG

12.JPG

13.JPG

14.JPG

15.JPG

16.JPG


  • Once the promotion is done you can verify the content and also if there would be any error you can navigate to Promotion Management and check the Jobs . Jobs Will be created like “Query_Administrator_Day_Date_Time”.


Regards,

Mahak Rathore

 

To report this post you need to login first.

41 Comments

You must be Logged on to comment or reply to a post.

  1. Jon Fortner

    How large was the repository you tried this on? Do you have a sample Query to move one Top Level Public folder tree instead of the entire repository and how would I include folder security for that scenario?

    (0) 
    1. Mahak Rathore Post author

      Hi Jon,

      This tool is actually created to migrate the large repository/object. Only the time will matter. Also For Best practice use : 1969259 – LCM CLI Master Note – How to promote thousands of objects across BI4 environments” For More queries and Sample queries. For the Changes required so that it will work smoothly.


      For a Folder i.e. if you wanted to promote Folder and all content under its Folder you can use :


      We need 1 query to bring the root folder and the 2nd query to bring the objects in the folder

      exportQuery1=select * from ci_infoobjects where si_kind=’Folder’ and si_name=’ROOT name’.

      exportQuery2=select * from ci_infoobjects where si_ancestor=’ROOT object ID’ AND (si_kind=’WebI’ OR si_kind=’CrystalReports’ OR si_kind=’Folder’).

      Also set exportDependencies=TRUE; This will also include the dependencies of the folders, WebI reports, CrystalReports, etc.

      For Security i.e. if you wanted to promote the security you can change the parameter in the .properties file : includeSecurity=true


      Hope this will help.


      Regards,

      Mahak

      (0) 
          1. Christian Renlund

            Hi Mahak,
            Thanks for this post! I’m in the process to move all my content from 4.1 sp6 to 4.2 sp4.
            I am now trying to access your properties files for insights on how to formulate the export queries but get the error message:

            “Share is no longer available; contact the owner if you need access” 

            Any chance that you can make the properties files accessible again?

            Thanks,
            Christian

            (0) 
        1. Siddhartha Nirgudkar

          Jon,

          The properties file needs to be created manually, which will include the queries, options, etc. depending on the job requirement.

          The job is then executed when you run the “.bat” file and the properties file together.

          The admin guide (Promotion Management chapter) contains all the switches/parameters that can be used.

          -Sid

          (0) 
  2. Doug Amadio

    BOBI 4.0 SP7 –> BOBI 4.1 SP4

    Mahak this works great but I have one problem.  It doesn’t get all my instances.  All the reports are there but none of each reports history, (past generated reports). How do I get these?

    If I use UMT on the source to create a BIAR, I can only go up to about 6000 objects but this does get all the report histories, (only what I could select because of the size limitation).

    So obviously I need to use LCM_CLI but the scripts above don’t get Histories.  Assistance would be appreciated.

    Doug

    (0) 
    1. Mahak Rathore Post author

      Hi Doug,

      You can also bring the Instances by doing simply Method.

      Go to CMC >> Promotion Management >> Settings ( Menu Bar of Promotion Jobs) >> Job Settings >>Check the First option “Show Completed instances in Manage Dependencies page” and Save it.

      This changes will be done in the server which is mentioned in the .properties files as “LCM_CMS” then Re-Run the Job.

      Mahak

      (0) 
      1. Doug Amadio

        Settings checked.

        Old server: Setting>>view global system metrics>>successful processed jobs = 19943

        New server after promotion = 1183

        So I am getting the reports plus something else using the 3 scripts.  When I look at any of the report histories there is nothing on the new and many on the old.

        I have modified the top of 3 scripts to match my machines.  Other than that no changes.  Do you know why I am not getting the other 18760 jobs?

        Doug

        (0) 
        1. Mahak Rathore Post author

          Hi Doug,

          Its because of the dependencies. If you check the properties files you will fine “exportdependencies=false” .

          So Basically you need to do this :

          • Edit the Primaryjob.properties.
          • Make exportdependencies=true.
          • Run the single properties file and you will get the reports and their instances.

          If running the whole job is time consuming first verify by doing it for 1 single report. either refer :

          http://scn.sap.com/docs/DOC-57628 and add

          “exportdependencies=true” parameter to it. Once it worked for 1 report you will be able to do it for all 🙂

          If not let me know.

          regards,

          Mahak

          (0) 
          1. Doug Amadio

            I have changed the exportdependencies=true, which does give me more reports but it does not give me any/all the history. 


            The only thing that I have found that works consistently is to run all 3 scripts with exportdependencies=false, then run them again with exportdependencies=true,

            then run the UMT with the switch -internal_use_only_noversioncheck and selecting only the ‘folders and Objects’, since all the other settings have been imported/upgrade by the scripts. 

            This only gets all the history since the reports are already there.

            Do you see any problem with doing this?

            Doug

            (0) 
            1. Jon Fortner

              In Promotion Manager under Job settings, there is a checkbox for [ ] Show completed instances. I wonder if the command line version needs an additional switch besides exportdependencies=true to make it include all instances?

              (0) 
          2. Doug Amadio

            Above you mention using this command: “si_ancestor”, but I do not see this command in any of your 3 downloadable scripts.  Of the three which one would be best to but it in, and how would you modify one of the lines to include everything,(objects and instances) in “all folders”?

            Most important question, will this command make it possible to get all objects and their instances?

            (0) 
            1. Mahak Rathore Post author

              Hi Doug,

              The command line is just a sample queries to promote the content and users from one environment to another. You will notice when you will migrate the content things like instances and other stuff will not be included because it a fresh promotion  and then Customer add the schedules, security etc .

              The best way is to check the Admin Guide and you will get all the different parameters and queries for different promotions.

              regards,

              Mahak 

              (0) 
  3. Pavan K

    Hi Mahak,

    Nice post

    I have observed that LCM_CLI does not promote the security for “Applications”.

    User security for reports and other infoobjects are promoted fine.

    I came across this issue in my previous project. I did not get a positive response from the support.

    Was curious to know if you were you were able to promote security for “Applications” in CMC while testing using CLI.

    Regards,

    Pavan

    (0) 
  4. Richard Sharp

    Nice post.

    What is your advice for copying all content when the users in the source and target environments are not the same?

    We use SAP authentication, which means in production BO our users are validated against (and imported from) the production BW environment but in development BO the users are validated against (and imported from) the development SAP environment.

    Therefore, although all physical users exist in Production and Development, their internal identifiers are not the same in each environment. The same goes for BW Roles which are imported from their respective SAP BW environments.

    (1) 
    1. Denis Konovalov

      @Richard – in your scenario you cannot promote users and their documents (in Inboxes/favorites) between environments, unless users in source are assigned enterprise aliases and then those aliases are promoted to destination instead.

      (0) 
      1. Jon Fortner

        SAP needs to provide an overwrite feature for this user/group scenario. Otherwise, we have no hope of keeping security in sync across Test/Cert and QA systems. Import Wizard use to have that (overwrite or rename). Also, when moving smaller amounts of content, we should be able to ask it to set security the same as the source system and to include related groups (except the BO Everyone group). Perhaps as a compromise, it could do that by path/titles when needed and ignore CUID that may not match.

        (0) 
  5. Peerzada Tauseef

    Very helpful article and comments by experts.

    @Denis, Mahak and other experts

    I am unable to promote BW roles from source BO system to target BO system

    When I run first job (Job1_userandgroups.properties) all the users, BOE groups and their member AD groups are promoted but BW Roles are not getting promoted to the target system. I have already configured the SAP authentication plugin with the same setting as Source system. 

    Is it possible to promote SAP BW Role from Source to Target BO system ?

    If yes, do I need to add any additional option or take any additional steps ?

    Both Source and target systems are pointing to the same BW system.

    Many Thanks

    Peer

    (0) 
    1. Richard Sharp

      Hi Perzada

      BW roles do not get promoted between different systems. This seems to be because they are identified differently in different systems. For example the role TOTO is called P04~100/TOTO on our production system and S04~100/TOTO on our sandbox system.

      Basically once you’ve transported the BO User Groups, you have to manually link the BW Roles to them in the target system (assuming they’ve previously been imported). It’s long winded and I eventually wrote a routine in the JDK to do this.

      Hope this helps

      Richard

      (0) 
  6. Peerzada Tauseef

    Hi Denis,

    Thanks for a quick response. Only the BW system is setup no roles were important prior to the promotion using LCM_CLI. I was of the view that BW roles will be promoted /imported as part of promotion like Windows AD.

    Is it not the case and are there any additional steps ?

    @Richard, Thanks for the comments.

    I am creating BO 4.2 system in parallel to our existing BO 4.1 system. These both are pointing to the same BW system and therefore BW system and Roles are same. 

    I have done a quick test using LCM GUI (CMC) and it did promoted and imported the BW Roles but when I use LCM_CLI it does not promote / import (into SAP authentication tab) BW Roles.

    In past we used UMT for such things but as it does not support no-version flag it is not possible and using LCM GUI is just too slow  🙁

    Regards

    Peer

    (0) 
    1. Mahak Rathore Post author

      HI Peerzada,

      As per my knowledge below are the steps that I would be taking to promote it :

      • Navigate to the destination.
      • Open CMC>Authentication >> SAP
      • Configure the system, username, password and BW system info and simply save it.
      • Now promote the users and groups.
      • Ideally this should promote all the roles and users automatically.

      IMP : In Authentication you will only configure ENTITLEMENT SYSTEM tab information that’s it. And then promote it. Most important BW system info should be EXACTLY same as SOURCE.I believe you have mentioned it that they are same so there would be no issue.

      regards,

      Mahak

      (0) 
  7. Peerzada Tauseef

    Thanks Mahak,

    Do you know if I have to do any additional steps to promote user aliases or should they be promoted as part of Job1 (Job1_userandgroups.properties) ?

    Regards

    Peer

    (0) 
    1. Mahak Rathore Post author

      No extra steps is required. Once promoted simply check into destination you will see roles and aliases will come automatically.

      regards

      Mahak

      (0) 
  8. Peerzada Tauseef

    Thanks For the reply.

    Final Comments:

    I continued to have issue with Job1 ((Job1_userandgroups.properties). Some user CUIDs were getting changed and aliases were also not getting promoted across. Moreover, BW roles were not getting promoted.


    However, it could be down the source system. I replaced job one LCM GUI (CMC) Job. It was not that bad creating a job, selecting everyone group and excluding system accounts such Administrator, etc.


    Rest of the jobs worked fine and we got system replicated using these.

    Thanks for a nice article.

    Regards

    Peer

    (1) 
  9. Thierry Baraton

    Hi
    I use lcm_cli.bat  betwen 4.1sp5 and 4.2 sp3 patch 1

    with query builder i see in my destination 5400  webi document
    my source contain 14 000 webi document

    job is running for 2 days
    where can i see the problem

    this is my command line
    lcm_cli.bat -lcmproperties=”E:\BOE4_FULLPROMOTE\Job3_primaryobjects_public.properties

    this is my properties files
    #
    # Automatic LCMbiar Generator for Primary Objects
    #
    action=promote
    Source_CMS=xx:6400
    Source_userName=Administrator
    Source_password=adminBO2012
    LCM_CMS=xxx:6400
    LCM_userName=Administrator
    LCM_password=xxx
    Destination_CMS=xx:6400
    Destination_userName=Administrator
    Destination_password=XXXXX
    exportDependencies=false
    includeSecurity=true
    stacktrace=true
    consolelog=true
    limitQueryBatchSize=false
    #
    # PRIMARY OBJECT (JOB 3)
    #
    #total number of queries (if > 1)
    #exportQueriesTotal=1
    #All Public Folders
    exportQuery1=SELECT static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE DESCENDENTS(“SI_NAME=’Folder Hierarchy'”, “SI_ID in (23)”)
    #
    #
    #

    (0) 
    1. Mahak Rathore Post author

      HI,

      Did you made the changes prior to using LCM_CLI. According to the lcm_cli master note you need to do some changes in the APS and LCM_CLI.bat files to increase the xmx value.

      Your properties files looks correct and please check with the settings mentioned in the LCM_CLI it will work for sure.

      regards,
      Mahak

      (0) 
  10. Thierry Baraton
    Thank you for your response
    
    my lcm_cli.bat is:
    
      @echo off
    SET PARAM=
    :LOOP
    SET PARAM=%PARAM% %1
    SHIFT
    IF "%~1" == "" GOTO ENDLOOP
    GOTO LOOP
    :ENDLOOP
    pushd E:\BOE4\\SAP BusinessObjects Enterprise XI 4.0\java\lib\
    "E:\BOE4\SAP BusinessObjects Enterprise XI 4.0\win64_x64\sapjvm\bin\java" -Xmx8g -Dtracelog.process=LCMCLI -cp "lcm.jar" com.businessobjects.lcm.cli.LCMCLI %param%
    popd
    
    is it correct ?
    
    i'm wondering: With  Command Line Interface (CLI) is there a timeout ?
    
    thanks very much
    
    
    
    
    
    (0) 
    1. Brian Kudera

      Thierry, you can check your local TEMP directory for the user logged in.
      Eg, mine is C:\Users\BIService\AppData\Local\Temp
      Here under temp you’ll see the ultimate LCMBIAR files being built.
      Under temp I have a folder named “2”, and under here is several dat files that get built.
      Monitoring these two folders should help you understand if something is still running or rather if it is stuck.

      (2) 
  11. Mohamed SOLAANI

    Hi, Thanks for your post.

    I would like to know if it is possible to promote a single specifique object (WebI document for example) from a LCMBIAR file using CLM_CLI.bat ?

    The LCMBIAR file was created with this properties:

    exportDependencies=false
    includeSecurity=false
    stacktrace=false
    consolelog=false
    lcmbiarpassword=lcmbiar
    exportQuery1=SELECT TOP 1000000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS  WHERE DESCENDANTS (“SI_NAME=’Folder Hierarchy'”,  “SI_ID in (55071)”) AND SI_KIND=’Webi’

    I could do the promotion for all the document in the file but not for a specifique document.

    Thank you

    (0) 
    1. Denis Konovalov

      With 4.2 Sp2 and up you should be able to import just the specific object from that lcmbiar, but only using PM GUI in CMC. You can’t import a specific object from lcmbiar using CLI.

      (0) 
  12. Stefan Zumbühl

    Hi All

    I have created all the three properties file and the export is working fine.

    But the file primaryobjects.properties will create 10 files. the file size is about 750MB. Here are the names from the files:

    primaryobjects.lcmbiar
    primaryobjects1.lcmbiar
    primaryobjects2.lcmbiar
    primaryobjects3.lcmbiar
    primaryobjects4.lcmbiar

    primaryobjects9.lcmbiar

    Now weh have two problems, everytime if the job is running the files are more. the first run i had only 2 Files, the second run i had 4 files and so on.

    It looks that he save the file also in the filestore directory, since yesterday the filestore is gowing up about 6GB space, the same space as the export files.
    I have deletet the created jobs in the cmc – promotion management. After the deletion the filestore hast the right size again (about 1.5 GB versus 16GB).

    Is it possible to create a Job tha deletet the export jobs from promotion management? and also delete the jobs from Recycle Bin?

    Regards Stefan

     

    (0) 

Leave a Reply