How to promote all content from SAP BI 4.x to SAP BI 4.x using LCM_CLI.bat (Command Line Tool) using Live to Live method.
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 :
- 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 )
- Edit all the .properties files and make the changes according to your environment like : CMS Name , Password , Source and Destination etc.
- Open Command Prompt as Administrator and Navigate to the Location of lcm_cli.bat file.
- Execute the lcm_cli and give the properties files as the parameters. [ lcm_cli.bat -lcmproperty “<pathofpropertiesfile>” ]
- 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.
- 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
Helpful, thank you!
Thnaks for sharing Mahak 🙂
Thank you Mahak.
@Raunak , @Sateesh @Henry
Your Welcome 😉 .
Regards,
Mahak
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?
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
Thanks Mahak! I'll look at the Master note. Where is the LCM .properties file you mentioned for includeSecurity=true?
Thanks
Jon
You can use my properties files. See the link in BLUE in First section. All 3 properties file is there. or you can also check my another Doc : How to do Live to Live Migration by LCM_CLI.bat
Hope this will help
Regards,
Mahak
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
Hi Mahak,
Can you tell me where I can download the properties files from please? If I try your link I get "Share is no longer available; contact the owner if you need access".
Thanks
John
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
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
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
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
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 :
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
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
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?
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?
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
FYI .
Admin Guide for BI 4.1 SP7
http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41sp7_bip_admin_en.pdf Page 516
Regards,
Mahak
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
Hi Pavan,
Yes,you can include the Application Security by adding :
Regards,
Mahak
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.
@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.
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.
you can enter an enhancement request in Idea place Idea Place: Enterprise Home and product managers will consider it.
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
in destination - do you have roles imported or only BW systems setup in SAP authentication tab ?
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
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
I'm not aware of BW roles promotion issues. Maybe a support incident and investigation is in order
HI Peerzada,
As per my knowledge below are the steps that I would be taking to promote it :
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
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
No extra steps is required. Once promoted simply check into destination you will see roles and aliases will come automatically.
regards
Mahak
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
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)")
#
#
#
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
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.
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:
I could do the promotion for all the document in the file but not for a specifique document.
Thank you
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.
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
Hi Mahak,
I have so far unfortunately not yet used the command line tool.
Can I first export the files from the source system and then import them into the target system?
My target system is a sandbox with no connection to the source system.
Thanks in advance,
Zaki
yes, you can export to lcmbiar first and then import those in another system. this is default reason lcmbiar exist.
Thanks Denis.
Can anyone help with the 3 properties files for Users and User’s Groups, Dependent Objects and Primary Objects? It will be very helpfull.
The files from Mahak are unfortunately no longer available.
Nice weekend.
Just use Promotion pattern book - it has real life example of properties files as well as what to do with common issues and best practices : https://wiki.scn.sap.com/wiki/display/BOBJ/Business+Intelligence+Platform+-+Pattern+Books+Index
Hey Mahak! Great article. Can I get access to those 3 property files? When I tried to access those files, it says it got expired.
Another question:
Does the SI_IDs and SI_CUIDs are same across the all the platforms?
For example in the pattern book, it says #Categories SI_ID=45. Is that same across all platforms?
Hi Mahak ,
We are trying to migrate contents between two environments (PROD to DEV) which are on the same version (BI 4.1 SP8).
We are using the LCM_CLI method for migration , but still it is taking a lot of time for the content to get migrated despite following the best practices listed in the SAP note (1969259 – LCM CLI Master Note).
We would like to know if there are any methods available to speed up the process or we would like to know if there is any other alternative method other than PMT and LCM_CLI.bat that would help us to copy the contents faster from PROD to DEV.
Any quick suggestion would be of great help. Thanks in advance!
Hello Mahak! Great article. Can I get access to those 3 property files? When I tried to access those files, it says it got expired.
Thanks!.
You can get the properties files from the BI admin guide here :-
https://help.sap.com/viewer/2e167338c1b24da9b2a94e68efd79c42/4.2.3/en-US/467d50b06e041014910aba7db0e91070.html
They are in the Promotion Management chapter.
Hello ,
Whilst exporting the CMS content of the source into LCMBIAR file , I just noticed that LCMBIAR files are being created in source Filestore as well as in the export location specified.
I'm running the lcm_cli.bat from target server to export the content of the source in to LCMBIAR file.
ExportLocation mentioned in the property file points to a folder in the target server. However the execution of lcm_cli.bat generates the LCMBAIR files in source Filestore/Input as well as in Target export location.
Is there any way to avoid the generation of LCMBIAR file in source Filestore/Input while exporting ?
Thanks ,
Vinayak
Maybe someone faces the same error as me.
Under Linux the prompt "Enter LCMBIAR Password:" is not displayed when running the skcript without lcmbiarpasswrd flag. So the script waits for the password and won't complete the job......
Env: BO 4.2.8.7