Sunday, February 8, 2015

Installing and Configuring MicroStrategy Web without IIS.

Hi All,

Today we are going to see a way to install MicroStrategy Web without IIS as a web server. IIS has some limitations if you are in one of the operating systems of windows mentioned below...

Microsoft Windows 7 Home Premium
Microsoft Windows 7 Home Basic
Microsoft Windows 7 Home Starter
Microsoft Windows Vista Home Premium
Microsoft Windows Vista Home Basic

Its basically a known product limitation as mentioned in the below link

https://technet.microsoft.com/en-ca/library/cc753473.aspx

However if you cannot upgrade to the higher versions of Windows. Here is one simple way to configure MicroStrategy Web with an opensource webserver named Apache Tomcat!

Here is how we can do it!


Download Apache 7.0 from the below link


Download JDK from the below link


Install both the software applications in the machine with the default machine installation.

To configure the JDK

·         From the Start menu, select Computer. The Computer dialog box opens.
·         Click System properties. The System dialog box opens.
·         Click Advanced system settings. The System Properties dialog box opens.
·          Click Environment Variables. The Environment Variables dialog box opens.
·         Under System Variables, click New to create a system variable. The New System Variable dialog box opens.

In the Variable Name field, type JAVA_HOME.

In the Variable Value field, type the path of the folder where you installed the JDK and click OK.

For example, if the fully qualified path to your JDK executable is C:\jdk1.6.0\bin\java.exe, the value of your JAVA_HOME variable is C:\jdk1.6.0.

If you have installed JDK under the Program Files folder, type Progra~1 when specifying the folder name in the Variable Value box

Assuming if you have installed JDK and its available in this location...

















Paths to be set when a default installation of JDK is made.

PATH
----
C:\Program Files\Java\jdk1.6.0_19\bin;.;

CLASSPATH
---------
C:\Program Files\Java\jdk1.6.0_19\lib;.;

JAVA_HOME
---------
C:\Program Files\Java\jdk1.6.0_19

 To configure Tomcat

·         From the Start menu, select Computer. The Computer dialog box opens.
·         Click System properties. The System dialog box opens.
·         Click Advanced system settings. The System Properties dialog box opens.
·         Click Environment Variables. The Environment Variables dialog box opens.
·         Under System Variables, click New to create a system variable. The New System Variable dialog box opens.
·         In the Variable Name field, type CATALINA_HOME
·         In the Variable Value field, specify the path of the folder where you installed Tomcat and click OK.

 For example, if you installed Tomcat directly to the C drive, the destination folder is C:\Tomcat.


Assuming if you have installed JDK and its available in this location... 















Your CATALINA_HOME should be set to : 

C:\Program Files (x86)\Apache Software Foundation\Tomcat_7.0

Locating the WAR file

·         The MicroStrategy Web Universal WAR file (MicroStrategy.war) is located in the path you specified when installing MicroStrategy Web Universal.
·         The default location when installing on 32-bit Windows environments is C:\Program Files\MicroStrategy\WebJSP.
·         The default location when installing on 64-bit Windows environments is C:\Program Files (x86)\MicroStrategy\WebJSP.

Deploying using Tomcat as a stand-alone Web container

·         To deploy MicroStrategy Web Universal or Mobile Server (JSP) using Tomcat as a stand-alone Web container
·         Copy the MicroStrategy.war file to the Tomcat\webapps folder.

To control access to the MicroStrategy Web Administrator and Mobile Server Administrator pages
·         In the Tomcat\conf folder, open the tomcat-users.xml file in a program that allows you to edit the file, such as Notepad.
·         Add the following tag and save the file:

<user name=”administrator” password=”administrator” roles=”admin”/>

Now stop and start the web server. That’s it you are done.

To configure MSTR Web Admin


To access MicroStrategy projects in Web.


Upon Successful configuration you should be able to see the version of the MicroStrategy web like below!

















.
Issues faced and resolution with MicroStrategy 10.3

Once the war file is deployed and while logging into the MicroStrategy web admin console I got the below error http://localhost:8080/MicroStrategy/servlet/mstrWebAdmin



To overcome this issue we need to add entries to the couple of files under the Tomcat Configuration folder.

C:\Program Files\Apache Tomcat 7.0\conf\web.xml


 <security-constraint>   
    <web-resource-collection>   
        <web-resource-name>Protected Admin Area</web-resource-name>   
        <url-pattern>/Admin</url-pattern>   
    </web-resource-collection>
    <auth-constraint>
        <role-name>Admin</role-name>
    </auth-constraint>   
  </security-constraint>  
  <login-config>   
        <auth-method>BASIC</auth-method>
  </login-config>
C:\Program Files\Apache Tomcat 7.0\conf\tomcat-users.xml
<tomcat-users>
<user username="admin" password="admin" roles="manager-gui"/>
<user username="administrator" password="administrator" roles="manager,admin"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <role rolename="manager-gui"/>
 <user username="tomcat" password="tomcat" roles="tomcat"/>
 <!-- <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  <user username="role1" password="<must-be-changed>" roles="role1"/>
  -->
</tomcat-users>

This should help you resolve this issue.

Command Manager Procedures roundup

Hi All,

Today we are going to see a very handy and programmatic solution oriented tool named MicroStrategy Command Manager(CM). This is one of the coolest features in MicroStrategy where we can script the repetitive tasks and execute in bulk to get the task done!

And it supports scripting of procedures which is nothing but programmatically making the existing scripts to run in a recursive pattern to get the work done...

Let see a very practical example of how to write a Command Manager Procedure to solve a very cumbersome requirement...

So now how do we write a CM procedure to get to a specific requirement. The answer is always in the in the Sample Procedures that are already available in the CM UI like below...

Navigate to the procedures--> Sample Procedure--> Right click on a procedure.



















Sample Procedure....





















There are lots of sample procedures available and these procedures can be effectively tuned and reused to suit our requirement.

One of my favorite command manager procedure implementation was when we were doing impact analysis for a database migration for our MicroStrategy projects. And the task was to list out all the expressions of Public Objects and Schema Objects. Basically to find out whether any database specific passthrough functions were used in the definition. Initially we got a project documentation and ended up manually getting the object expressions which was very cumbersome!

Then we came up with a command manager procedures to get the list of the expressions of all the public and schema objects and got them in an excel sheet! which really saved hours of impact analysis!

Below is the script which I developed to list out all the expressions of an attribute...

 Command Manager Procedure...
// property to display  
 DisplayPropertyEnum iProperty = DisplayPropertyEnum.EXPRESSION;  
 // Retrieve all attributes in the project  
 ResultSet oAttributes = executeCapture("LIST ALL ATTRIBUTES FOR PROJECT '" + sProjectName + "';");   
 ResultSet oPropertySet = null;  
 oAttributes.moveFirst();    
 while (!oAttributes.isEof()){  
      String sAttributeName = oAttributes.getFieldValueString(DisplayPropertyEnum.NAME);   
      String sAttributePath = oAttributes.getFieldValueString(DisplayPropertyEnum.PATH);        
      oPropertySet = executeCapture("LIST PROPERTIES FOR ATTRIBUTE '" + sAttributeName + "' IN FOLDER '" + sAttributePath + "' FOR PROJECT '" + sProjectName + "';");  
      oPropertySet.moveFirst();  
      // print out expressions  
      printOut("\n");  
      printOut("Attribute Name : '" + sAttributeName + "'");  
      printOut("Attribute Path : '" + sAttributePath + "'");  
      ResultSet oAttributeForms = (ResultSet)oPropertySet.getFieldValue(DisplayPropertyEnum.ATTRIBUTE_FORM);  
      oAttributeForms.moveFirst();         
      while(!oAttributeForms.isEof()){  
           //get expression list for this attribute  
           ResultSet oExpressions = (ResultSet) oAttributeForms.getFieldValue(DisplayPropertyEnum.ATTRIBUTE_EXPRESSION_LIST);          
           if(oExpressions != null){  
                printOut("--------------------------------------------------");  
                printOut("Attribute Form Name : '" + oAttributeForms.getFieldValueString(DisplayPropertyEnum.ATTRIBUTE_FORM_NAME) + "'");  
                oExpressions.moveFirst();  
                while(!oExpressions.isEof()){  
                     printOut("Expression : " + oExpressions.getFieldValueString(0));  
                     oExpressions.moveNext();  
                }             
           }  
           oAttributeForms.moveNext();  
      }  
      printOut("\n ======END OF ATTRIBUTE DEFINITION=======");  
      oAttributes.moveNext();  
 }  

The challenging part of this procedure is to find out the above highlighted keywords as these keywords are MicroStrategy API defined and unless we use these specific keywords its very hard to get the desired output!

It actually took a while for me to figure out how to get these keywords with ease! The below link actually helps you to get these keywords! The solution is available in the command manager help in your local installation and can be access with the below link... or search for "Project source statement syntax" in your CM web help. Assuming the default installation...

file:///C:/Program%20Files%20(x86)/Common%20Files/MicroStrategy/Help/English/CommandManagerUniversal/cmdmgrhelp.htm#html/statement_syntax_reference_guide.htm

Good Luck!

Wednesday, February 4, 2015

9.5.0: New Feature - Integrity Manager manual report matching for report testing.

Hi All,

Here is one of the coolest features in MicroStrategy 9.5.0 in Integrity Manager(IM). We all know that Integrity Manager is a automated report testing tool provided by MicroStrategy. And with this tool we can compare MicroStrategy reports between projects from one environment to another or withing the same environment.

Basically until 9.4.1 IM had support only to match reports either by report's Object ID or by its Path. So the reports would not be matched until they have the same Object ID or in the same path between the projects.

But now from 9.5.0 onwards there is a new feature to manually match reports between projects. Here is how we can do it... Lets check it out!

First create a report in the source project...



Then create the same report in the other duplicated project in the same project source...














Now lets create an Project Vs Project IM test between these two reports with different object ID and path

Select the source project report


























Click on the advanced options to select the manually match option...


Select the target project manually to select the matching report in the target project

























Thats it!!! Run the the test to check the results...



If you see the above test results page... The SQL, Data and Graph's match and the Excel and the PDF's does not match. But its just because the report names match!

So this is how we compare the reports between the projects with different report object ID and different path! Really a cool feature isn't it!

Sunday, February 1, 2015

Multi-Tenant MicroStrategy Project Implementation.

Hi All,

Today we are going to discuss about an implementation which I had lived for a few years. Its nothing but setting up Multi-Tenant Architecture in MicroStrategy.

Project Scenario:

Say you are based out of  a product based software services company and you have multiple customers of the same business domain. And you have a dedicated business datawarehouse for each customer and also indeed you have one MicroStrategy project for each customer as well!

And it so happens that there is a customer who keeps asking for lots of requirements... very innovative and so on! However the same kind of requirements aren't even being thought about by other customers.

In such cases your BI Projects aren't been well utilized by your customers or the customers are not well advised on how to use the product that effectively.

Or else few of the customers are asking for the same project functionality as your premier customer has asked for!

In this case you might end up deploying the same project objects for multiple customers since multiple customers use their own MicroStrategy project! Which could be quite cumbersome in administrative effort and project management.

Proposed Solution:

One of the best and easiest proposed solution is to have a single project and make it hit multiple datawarehouses based on the customer's login! Something like if Customer A logs in and runs the reports the reports hit the Customer A's datawarehouse and if Customer B logs in and runs the reports the reports hit the Customer B's datawarehouse and so on...

Implementation Details:

Now what we do now is to have one single project and make the project hit multiple datawarehouse databases based on user's login.

MicroStrategy has a unique feature called Connection mapping where you can easily create a single project and and make it hit multiple datawarehouse databases.

To know more about this you can check out the below technical note from MicroStrategy.

TN20740: What is Connection Mapping and how is it configured in MicroStrategy Desktop 8.x

TN45331: Is there any hard limit on the amount of connection mappings to be implemented in MicroStrategy 9.x?

If you are in need to make a report in a single project to hit multiple database instances then you might need to choose freeform SQL approach.

TN39932: Is it possible to map different reports within the same 9.2.1 project to data warehouses of different types using connection mapping?

Command Manager Scripts Automation for repetitive object tasks

Hi All,

Starting to blog after a very long time and this time it about a real time usage about the Command manager scripting. There are a few project scenario's where it demands you to create the same MicroStrategy public and schema objects multiple times. And this is one such scenarios where command manager scripts automation can be done.

But if you keep writing scripts for each and every object you might end up creating the scripts for month's together. However there is a way to automate this using Microsoft excel and thereby we can create the scripts easily. One such template is what you can download below....

Click downlod MicroStrategy Command Manager automation template

Note: This template is not a finalized tool for all implementations. This is one of the template that I had developed for a generic requirement. However you can download this template and feel free to modify the scripts and the flow as per your project needs!