Many a time I have worked on MTM and gone through many blogs, however I have never found the information about updating Database information for Crystal Reports.
We deal in the Airline industry wherein we provide the sets of standard reports to all of our clients. These sets of standard reports contain Crystal Reports. We use MTM to create tenants on BI4.1 servers. After creating a tenant we copy the standard reports and manually update the database information for Crystal Reports. This was a time consuming and difficult process for us until we found a way of automating this process by using MTM.
I was really not sure whether it works or not until I tried it in our environments and it worked for us as expected.
This document will describe all the required steps to use MTM in BI4.1 environments. Here, we will create a new tenant and will update the Crystal Report’s Database information. We will also apply the security to the tenant using a template. I have used BI4.1SP04 and Oracle 11G DB to test this on Windows 2012 server.
Before running MTM command we will create the required templates as below:
- Create the folder template as required:
2. Create the user group templates:
3. Assign Access Rights as required on the template folders:
4. Copy the required Crystal Reports 2013 to one of template folders:
Now, we will configure the template configuration file:
This file can be found at the location: <BI installed path>\java\apps\multitenancyManager\jars\tenant_template_def.properties.
NOTE: Do not modify this file, take the backup and rename this file to the tenant name something like “TestMTM_def.properties”. You can rename this file to anything you want. File name should always contain the string “_def.properties”. I have renamed this file as “TestMTM_def.properties”.
Here are the contents of this file:
- Speciy the tenant name: tenantName= Test[PROD] (This can be anything you like.)
- Specify the template token: $tenant_template$ (This is nothing but a template name what we have created in CMC, root folder of the template.)
- Specify the logon information of the BO server where you want to create this new tenant.
- reviewBeforeProceed=true (This option will review all paramters specified in this properties file, always keep this true.)
- tenantConcurrentUserLimit=100 (This option is to distribute the license deployed on the same BO server. You can chnage the value as required.)
- statusLog=E:\BOADMIN (This will be loggin directory where the MTM logs will be stored. We will discuss this later in detail.)
- abortANDRollback=true (Always keep this true, if anything goes wrong with MTM then it will revert all the changes it has done while creating a tenant.)
- templateContentFolder=$tenant_template$ (This should be a root folder of the template folder structure.)
- Now, we will specify the database information for all of the Crystal Reports.
NOTE: “crystalreport.templatedb” will be the database information of the crystal reports what we have in the template folders. “crystalreport.tenantdb” will be the database information of the new tenant which will be created by MTM. I have removed the DB information what I have used in our environments for this activity. If you have mutiple CR reports using multiple DB information then you would need to mention all of them in the following manner. We had only two DB information specified for all of the CR reports. We have to ensure that the BO server can communicate with all of the DB servers we are going to use in the following DB information.
I have used following two database information in this file.
Let’s discuss about how to specify this DB information for CR reports.
- crystalreport.templatedb1 and crystalreport.tenantdb1 => You would need change the number (1) to specify multiple DB information. E.g. crystalreport.templatedb2, crystalreport.tenantdb2 and so on.
- templateserver and tenantserver => This would be data source name of the CR reports. To find this, go to the database configuration of CR reports from CMC as shown below.
iii. templatedbname and tenantdbname => would be a database name if you have specified any on the CR reports as shown below highlighted in red.
iv. odbc => This would be a database server type, I have used oracle DB so I have mentioned oracle in the screenshot above.
Valid database server types are odbc, oracle, db2, sybase, informix, crdb_xml.
v. administrator;password and administrator;mypassword => This would be database usernames/passwords for the template and
tenant’s CR reports.
vi. Save the properties file.
Time To Run MTM command:
Command: java -jar multitenancymanager.jar -configfile TestMTM_def.properties -tenantName=Test[PROD]
The output of the above command will be shown as below if everything goes well with MTM.
After the successful execution of the above command, it will create the following objects.
2. Created Folder Structure.
3. Copied all CR reports to the new folder “Test[PROD] Ad Hoc Reports”.
4. Replicated access rights on the tenant’s folders from template folders.
NOTE: You would find that all new CR reports are using Custom Database logon information.
Points To Be Noted:
- MTM will not move any report from the template folder structurte to the new tenant folder structure. It will copy all the CR reports in the new tenant’s folder.
- BO server where we will use MTM should be able to communicate with all the DB servers i.e. all DB servers what we have specified in the properties file.
- Table prefix can also be updated using MTM, however I have not mentioned that in this document.
- To increase the memory for MTM, use the parameter below in the command.
Command: java -XX:MaxPermSize=128m -jar multitenancymanager.jar -configfile TestMTM_def.properties
- Enable tracing by creating a BO_trcae.ini file as below. Please note that few parameters are changed for this file which can be found in the admin guide.
2. Logs will be generated the location “BOInstallDIR\SAP BusinessObjects Enterprise XI 4.0\logging” as multitenancymanager_XXXXXXX_trace.glf. This file can be opened using a notepad or notepad++.
3. You can also check the CSV file generated by MTM while creating a new tenant. This file would be created at the location what we have mentioned in the properties file, here it was “E:\BOADMIN”. This CSV file will contain the information about all the objects which would be created during the creation of the new tenant.
- It will first review the properties file.
- Will check all the templates created in CMC.
- Will look for the objects placed in the templates.
- Will fetch all the objects from the templates.
- Will copy/update the objects in the new tenant’s folders.
- Will refresh the DB information for the reports.
More with MTM:
- We can also update the Crystal Reports for Enterprise, WEBI reports, universes(UNX and UNV), relational connections.
- There are some limitations for updating UNX and UNV using MTM.
To Know More About MTM: Please refer this guide and following blogs.
To map/update Universes, Webi Reports and Connections using MTM in BI4.1, please refer to blog How To Use Multi Tenancy Management Tool(MTM) For Refreshing Web Intelligence Reports, Universes, Connections in BI 4.1-…by Swapnil Yavalkar
I hope this document would be helpful. 🙂 I am really not good with the formatting still I have given my best today 😉