Wednesday, May 25, 2016

Using Non root user for MicroStrategy


Using non-root user for Microstrategy is simple and required some basic change. Consult your Microstrategy Admin team for changes.

It requires file permissions changes on below file rw access to non-root user/group:

Login with root user.

export $MICROSTRATEGY_HOME= e.g. /var/opt/Microstrategy 

(Tip ! you can have this in profile file as well)

1.       chmod o+w $MICROSTRATEGY_HOME/MSIReg.reg $MICROSTRATEGY_HOME/odbc.ini

2.       chmod o+x $MICROSTRATEGY_HOME/bin/mstrodbcadx.10.2.0008.0052

3. chmod o+w

After these changes non-root user can execute commands on Microstrategy

Wednesday, May 18, 2016

MicroStrategy Connection to Secured Hadoop Cluster

Connecting MicroStrategy Server to Kerberized involved below Steps:

1. Downloading and Installing the Hive Driver
2. Created DSN in MicroStrategy in odbc.ini
3. Accessing the DSN connection from MicroStrategy Gui
4. Kerborizing the user at MircroStrategy Server

Let's see how to do each of these one by one:

PreRequisites:

 Hive Details
       1. Hive Host Details- fully qualified name
       Default Hive Port

2.                Kerberos Details
        krb5.conf file
        Kerberos principal
        Keytab file of user which will invoke MicroStrategy let’s say bdauser.keytab

3.                   MicroStrategy Details

       Server and Root access where MicroStrategy Intelligent Server is installed.
       Non-root user to be created in MicroStrategy which will connect to Hadoop.

4.                   Hive odbc driver


This document is created for Hortonworks, however process is same for any vendors driver.

Hive Driver Installation:


In Server hosting MircroStrategy get the hortonworks hive odbc driver from Net/ or from below location
Location /root/hive-odbc-native-2.1.2.1002-1.el6.x86_64.rpm
User root

Command rpm –Uhv hive-odbc-native-2.1.2.1002-1.el6.x86_64.rpm

Make sure it is successful.

DSN Definition in MicroStrategy

In odbc.ini do the changes as below
 [ODBC Data Sources]
          =Hortonworks Hive ODBC Driver


[<DSN_NAME>] – Name of the DSN
Description=Hortonworks Hive ODBC Driver   – Driver Details
Driver=/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so– Hive driver Path host Name
DriverUnicodeEncoding=2
HOST=  – Hive host Name
PORT=10000
Database='' – Schema name
FastSQLPrepare=0
UseNativeQuery=0
RowsFetchedPerBlock=10000– Rows to be  name
HiveServerType=2
HS2AuthMech=1 – 1 for Kerberos
HS2HostFQDN= – Hive host Name
HS2KrbServiceName=hive
UserName=root – Not Required
Trace=Yes– Not Required
TraceFile=/tmp/odbc.log– Not Required



#### Note: Make sure DSN_NAME is same at both places.

Kerberos Changes in MicroStrategy Server

   1. Backup existing /etc/krb5.conf in microstrategy server
   2. Bring /etc/krb5.conf from hadoop secured cluster
   3. Bring the user.keytab file from hadoop cluster to mico
   4. Execute below commands:
          a. kinit -kt
    5. Generate Kerberos ticket
          a. kinit -Vkt


ODBC.inst changes


Above file should have an entry for Driver as
[Hortonworks Hive ODBC Driver 64-bit]

Driver=/usr/lib/hive/lib/native/Linux-amd64-64/libhortonworkshiveodbc64.so Description=Hortonworks Hive ODBC Driver (64-bit)



Verification :

cd $MICROSTRATEGY_HOME/bin

[18-May-16 3:48 PM] Saurabh Pandey:
./mstrtodbcx
MicroStrategy ODBC Test Tool
  Version 10.1.0008.0027
Type .help (including the period) for help.
- > .connect -d

 ## You are in hive prompt now if there are no errors
type  "show tables; " and press enter to get tables in hive.


Follow Regular Process of Creating DSN in MicroStrategy  Database Connection wizard. You should be able to see DSN created above there.






Wednesday, November 11, 2009

Why to save time where we shouldn't ?

I was going to office at ten minutes past nine;as the signal turned green, all atmosphere was filled with the sounds(of horn ofcourse) a race started, people were banging horns as if some sunami has come and they need  to rush to saves life.
I asked to myself what is this pushing for? How much time will be saved banging horns.
After all these are the people who will spend time in bed while getting up,cling to newspaper, spending countless minutes over tea gupshup. Why to save time where one shouldn't? .

Even before plane could be on a complete halt, ignoring the message of sweet voice, people started to switch on the mobiles, a few stand and started opening overhead compartment. What for? Anyways you will have to wait for checked in luggage. Have patience dear.

Having waited for 15-20 minutes for food to be served and then spending an hour enjoying delicous meal, we become restless once we have request for it.Started eyeing waiter for bill. Man what is you going to make in those two to three minutes. Anyways you will go out and have a final words before leaving.

I myself did these in past but now I don't try to save time where I shouldn't