Monday, 21 November 2016

How to deploy Operations Manager


Operations manager is a new tool in MicroStrategy 10.MicroStrategy Operations Manager is a web-based administrative tool that allows you to view and monitor all of your MicroStrategy environments in one place. Operations Manager allows you to define thresholds for system usage and performance, and you can have the system send alerts when those thresholds are met or exceeded.

Steps to install Operations Manager

Step1.
During installation,You need to check Operations manager to Install it.
Step 2.
After installation,Go to MicroStrategy/Install folder,There you can see MicroStrategyOM.war file.
Step 3.
Deploy this war file on Tomcat and restart tomcat.

Prerequisite for Operations Manager

To access,Operations Manager,you first need to install Health center

After installation of Health center,You need to configure healthcenter from MicroStrategy Configuration wizard

Health center configuration option will be available only if you have GUI interface on Linux.To run Configuration wizard in GUI,You need a third party software

Make Master health agent on one server and health agents on others.

Connect Master Health agent to health agents through Windows health center console.

How to access Operation Manager

1 In your web browser, go to one of the following, according to the type of application server you are using for Operations Manager:

•JSP. http://server:port/MicroStrategyOM/servlet/mstrOM
•ASP. http://server:port/MicroStrategyOM/asp

where server:port are the machine name and port number where Operations Manager is installed and accessible.

2 On the Connect to Environment page, type your MicroStrategy user name and password in the fields provided.

3 Select whether to log in using Standard or LDAP authentication. For information on integrating LDAP with MicroStrategy, see the MicroStrategy System Administration Guide.

4 Click Login. The Landing page of Operations Manager is displayed.
To manage your Operations Manager configuration, at the upper right of the Landing Page, click the Configuration icon

Create new environment.


In the Environment Name field, type a descriptive name for the environment.

In the Intelligence Server Name field, type the hostname or IP address of your Intelligence Server.

In the Port field, type the port to your Intelligence Server. By default, this is 34952, but your installation may be different.

To associate the environment with a group:

a Click Associate with Group. A menu displays list of all your groups.
b Select the check box next to each group to associate the environment with.
c Click Apply.


Click Test Connection. The Connect dialog box displays.

Enter your MicroStrategy login credentials in the Username and Password fields.

Select whether to log in using Standard or LDAP authentication. For information on integrating LDAP with MicroStrategy.

Click Login.
Similarly,You can add Web and Mobile servers also.

MicroStrategy SDK setup or web set up with tomcat




Step 1.
Go to URL: https://tomcat.apache.org/download-70.cgi Download 32-bit/64-bit Windows Service Installer

Step 2.
Now install apache tomcat on your machine.

Step 3.
After installing tomcat,Run below URL.

Run this URL: to make sure tomcat is running. http://localhost:8080/ Change Java settings Initial Memory Pool and Maximum Memory pool Initial memory pool size-512 MB Maximum memory pool size-2048 MB

Step 4.
Go to this path: C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf Edit tomcat-users.xml Add this entry there in End just before

Step 5. From MicroStrategy Web Installer: Place “MicroStrategy.war” file at C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps

After placing war file wait for sometime.

Open http://localhost:8080/MicroStrategy/servlet/mstrWebAdmin

Enter admin/admin



Eclipse Setup for Web Customization Editor

Step 1.
Go to the URL: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliossr1

Download Windows 64-bit/32 bit Eclipse and Extract

Extract under eclipse-java-helios-SR1-win32-x86_64\eclipse

It will place “com.microstrategy.web.sdk.webcustomization.jar” file under eclipse-java-helios-SR1-win32-x86_64\eclipse\plugins

Step 2.
Open Eclipse.exe

Step 3.
Go to MicroStrategy Tab. Provide Application root and MicroStrategy WEB URL.

Application Root Path would be like C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\MicroStrategy

Folder created by war file which you deployed.

MicroStrategy WEB is the URL which is created after deploying your war file.

Step 4.

click on OK.

Now How to Open MicroStrategy in Eclipse

Click on Windows tab and then open Perspective and then others.

A list of perspective are opened,Choose MicroStrategy Web Customization Editor

Click on OK.

Tuesday, 29 December 2015

How to automate MicroStrategy Project duplication

                     
                   

                                   Project Duplication


We can automate duplication of MicroStrategy projects in two ways.

1. Projectduplicate.exe
2. System Manager


In both the cases,We need an xml file which stores all the information related to source project source,destination project source,project to duplicate and name of the target project etc.

This xml file can be created by running object manager manually and by choosing all the required options and at the end of that wizard,you will get an option to save all those setting in xml file.
Later,you can use this xml file for project duplication through Projectduplicate.exe or system manager.


Projectduplicate.exe file exists at C:\Program Files\Common Files\MicroStrategy.If your MicroStrategy is installed in 64 bit OS then it would be at C:\Program Files(x 86)\Common Files\MicroStrategy.if your MicroStrategy is installed in D Drive then use D drive instead of C.

C:\Program Files\Common Files\MicroStrategy>projectduplicate.exe -f c:\projdup.xml -sp src_pwd -dp des_pwd

  •  c:\ is the path to the saved XML settings file.
  • projdup.xml is the name of the saved XML settings file.
  • SourcePassword is the password for the source project’s project source.
  • TargetPassword is the password for the destination project’s project source.
  • Optional: -sup indicates that feedback messages will be suppressed (silent mode).
  • Optional: -md indicates that the metadata of the destination project source will be updated if it is older than the source project source’s metadata.
  • Optional: -dn OverwriteName specifies the name of the destination project. This overrides the name specified in the XML settings file


You can run this command from cmd to execute it manually.you can change
 the source or target project according to your requirement in xml file.


After testing it manually, you need to create a batch script.For that,you need below things.

1. Notepad file,
which contains name of the project to be duplicated.You can provide some other things like date which you may want to append at the end of target project.
You can also provide option if you want to copy subscriptions or not.

2. Projectduplicate.xml file

This file which you have created manually with object manager.This will act as a source xml file

Now what you can do,Create a batch script to do the below tasks

1. Replace project name,subscription flag or any other thing which you want to modify with variable  in source xml file.
2. provide source file and target file path in batch script.Target file will be created when script will replace variables with actual values.

something like this. delims=, means that values you provide in text file is separated 
tokens=1,2,3 means it will take first 3 values.If you want to provide more values,you can increase this count.

for /F "tokens=1,2,3 delims=," %%i in (myfile.txt) do 
3. After replacing these values,call projectduplicate.exe command.

if you are using system manager then call system manager.








Saturday, 28 November 2015

Security Filter

                              


                                    Security Filter


A security filter is a filter object that you assign to users or groups to restrict the result set when they execute reports or browse elements.

Security filters enables you at MicroStrategy level, What warehouse data users can see.

Criteria specified by the security filter is added to the where clause of every SQL pass.

Example: Two regional manager have their own security filters, according to the region that they manage. One with Northeast and other with southeast..
 If these two users with different security filters run the same report, they may get different results based on the criteria defined in their security filters.


Prerequisites

The security filter you want to assign to a user or group must already exist in MicroStrategy Developer.

To assign security filters, you must have the necessary privileges.

Lets run a report without security filter.
                 

How to create security filter-->

  • Go to the project where you want to create security filter.

  • Go to Project Objects and click on MD security filters.All security filter should be placed in this folder.

  • Create New and choose security filter.
             

  • Below window will appear.


  • Apply filter on the attribute on which you want to create filter.


  • Choose the region whose data you want to show to the user/group.

  • Go to user manager then search the user/group to which you want to assign security filter and edit the user/group.



  • Drag the required security filter to the right hand side.


  • Now execute the same report with security filter of Northwest and see the difference.



Wednesday, 11 February 2015

Command Manager

MicroStrategy Command Manager:


MicroStrategy Command Manager is a script based tool that is used to automate Intelligence server administrative tasks.Command Manager scripts reduce a lot of manual work and save a lot of time.

There are various feature available with command manager.We can write simple one line command as well as long procedures .Procedures in Command Manager uses some features of Java Script. But there is some limitations on it.All the java Scripts features are not supported in MicroStrategy Command Manager.

We can use Command Manager on both Windows and Linux machines.But You can find some commands which run fine on windows machine but not on Linux..Well that is limitation of MicroStrategy. Commands which are given in Outlines of Linux I-server can only work on Linux.

You can invorke command Manager on Windows machine by clicking on Start -->All Programs--->MicroStrategy Products---->Command Manager


On Linux machine--

You have to run mstrcmdmgr from bin folder of MicroStrategy on Linux

${BIN_PATH}\mstrcmdmgr -n ${Project_Source} -i -e -u {UserName} -p {Password}  -f {input file} -o {ouput file}

You can write all your commands in your input file.

You can do all type of tasks from Command manager like you can List projects from Command as well as apply ACL on a Project.You can also create new users or new database instances.


Some basic commands:-

Report Outlines:

LIST ALL PROPERTIES FOR REPORT "ABC" IN FOLDER "XYX" FOR PROJECT "TEST";

LIST ALL PROPERTIES FOR REPORT "Profit Forecast" IN FOLDER "\Public Objects\Reports\Subject Areas\Enterprise Performance Management" FOR PROJECT "MicroStrategy Tutorial";

LIST ALL REPORTS FOR PROJECT "MicroStrategy Tutorial";

LIST ALL REPORTS IN FOLDER "\Public Objects\Reports\Subject Areas\Enterprise Performance Management" FOR PROJECT "MicroStrategy Tutorial";


User Group Outlines:


CREATE USER GROUP "ManagersXYZ" MEMBERS "Developer","User";

ALTER USER GROUP "ManagersXYZ" DESCRIPTION "Managers of XYZ Company";

LIST NAME, DESCRIPTION, MEMBERS FOR USER GROUP "ManagersXYZ";

LIST PRIVILEGES FOR USER GROUP "ManagersXYZ";

LIST ALL MEMBERS FOR USER GROUP "ABC_ALL_Desktop_Designer";

DELETE USER GROUP "ManagersXYZ";


User Outlines:


LIST ALL PRIVILEGES FOR USER "demo";

CREATE USER GROUP "ManagersXYZ" MEMBERS "Developer","User";

ALTER USER GROUP "ManagersXYZ" DESCRIPTION "Managers of XYZ Company";

LIST NAME, DESCRIPTION, MEMBERS FOR USER GROUP "ManagersXYZ";

LIST PRIVILEGES FOR USER GROUP "ManagersXYZ";

LIST [ALL] REPORTS [IN FOLDER ""] FOR PROJECT "";

CREATE USER (IMPORTWINUSER "" | "") [FULLNAME ""] [DESCRIPTION ""] [LONGDESCRIPTION ""] [(NTLINK "" | NTSID "")] [PASSWORD ""] [LDAPLINK ""] [TRUSTEDLOGIN ""] [WHLINK "" [WHPASSWORD ""]] [ALLOWCHANGEPWD (TRUE | FALSE)] [ALLOWSTDAUTH (TRUE | FALSE)] [CHANGEPWD (TRUE | FALSE)] [PASSWORDEXP (NEVER | IN DAYS | ON )] [PASSWORDEXPFREQ DAYS] [(ENABLED | DISABLED)] [IN GROUP ""];

CREATE USER  "abc1" FULLNAME "abc xyz" ALLOWSTDAUTH FALSE TRUSTEDLOGIN "abc1" IN GROUP "group name";


Project Outlines:


UNLOAD PROJECT "MicroStrategy Tutorial";

LOAD PROJECT "MicroStrategy Tutorial";

LIST ALL PROJECT;

CREATE PROJECT "New Project" DESCRIPTION "A new empty project";

DELETE PROJECT "My first project";

ALTER PROJECT "My First Project" DESCRIPTION "A modified empty project";

Subscription Outlines:

If you want to find out list of subscriptions for a particular Project,Then you can write below command.

LIST ALL SUBSCRIPTIONS FOR PROJECT "PROJECT NAME";

Folder Outlines:



CREATE FOLDER "New Reports" IN "\Public Objects" DESCRIPTION "New Sales Reports" HIDDEN FALSE FOR PROJECT "MicroStrategy Tutorial";

CREATE FOLDER "Public Objects Backup" IN "\" DESCRIPTION "Backup of Public Objects" HIDDEN TRUE FOR PROJECT "MicroStrategy Tutorial";

ALTER FOLDER "New Reports" IN "\Public Objects" NAME "Sales Reports" FOR PROJECT "MicroStrategy Tutorial";

LIST ALL PROPERTIES FOR FOLDER "Sales Reports" IN "\Public Objects" FOR PROJECT "MicroStrategy Tutorial";

LIST FOLDERS IN "\Public Objects" FOR PROJECT "MicroStrategy Tutorial";

/* Removes all the contents of folder Sales Reports, including subfolders */
REMOVE FOLDER CONTENT CASCADE "Sales Reports" IN "\Public Objects" FROM PROJECT "MicroStrategy Tutorial";

/* Removes all the contents of folder Sales Reports, excluding subfolders */
REMOVE FOLDER CONTENT "Sales Reports" IN "\Public Objects" FROM PROJECT "MicroStrategy Tutorial";

DELETE FOLDER "Sales Reports" IN "\Public Objects" FROM PROJECT "MicroStrategy Tutorial";



DB Instance Outlines


LIST ALL PROPERTIES FOR DBINSTANCE "Production Database";

Event Outlines


LIST ALL EVENTS;

CREATE EVENT "My Daily Report" DESCRIPTION "My Daily Report";

TRIGGER EVENT "My Daily Report";

DELETE EVENT "DBMS Load";

Procedure: Procedure is step-by-step sequence of command that should be followed in the same order to do a task.Command Manager procedure uses some features of Java Script.

Sample Procedure:



Procedure to get the DB login with no dependent

String objectType = "DBLOGIN";

//find all dblogin
String sQuery = "LIST ALL " + objectType + "S;";
ResultSet objects = executeCapture(sQuery);

objects.moveFirst();
//let's process the objects in the topfolder
while(!objects.isEof()){
String objectName = objects.getFieldValueString(DisplayPropertyEnum.DB_LOGIN);
//get dependent result set for this dblogin
sQuery = "LIST DEPENDENTS FOR " + objectType + " \"" + objectName + "\";";
ResultSet dependents = executeCapture(sQuery);

//if there is no dependent, print this dblogin
if(dependents.getRowCount() == 0){
printOut(objectType + " '" + objectName + "' has no dependent." );
}
objects.moveNext();
}