Want to know The Truth About CPM?

26 February 2012

Stupid Programming Tricks #10

Running Essbase in a foreground window aka what oh what version is Essbase?

I am using John Booth’s excellent (and free) Amazon Web Services Planning AMI, and wanted to move to Smart View 11.1.2.1.102 (.103, actually) so I could get all of the goodies that come with the Smart View and of course get a copy of Smart View that finally looks like the Classic add-in.  It’s like a time machine to 1994, only I have more grey hairs.  Bummer about the last bit, but hooray for Smart View finally (I am talking about the below interface, btw) adopting the everything-on-the-grid look:
Versus the floating POV which just never felt natural to me.  Now we get to have both ways:


Given all of the really nice functionality Smart View has with Planning, I can finally start to move away from the Classic Add-In.  About time.

What must be patched

There are three components that need to be patched to the .102 level:  Essbase, Application Proivider Services, and Smart View itself.  Going backwards, Smart View is dead easy – it’s a simple case of installing it over whatever you already have.  But Essbase and APS must be patched.  The thing is, I didn’t know if John had already patched them on his AMI or not.  How to to tell?

NB – I am not going to cover figuring out APS as figuring out Essbase was adventure enough.  I’ll cover APS when I show how to use OPatch in a future post.

In days of yore

Essbase used to default to running in a Window.  Ah yes, the halcyon days of Windows NT.  This was also back when Essbase came on a CD, and all it took to look like a pro was to know that typing essbase.exe –service install made Essbase run as a service.  Days long past.

Today, Essbase only runs as a service.  So what you say?  Well, how do you know what release of Essbase you are running?  Oh, you can open up a MaxL window from the Start menu, and type display system version ;, but that isn’t going to give you detailed information. 
Nope, what you need is that Essbase windowed application where you can type VERSION.  Or you could try to patch Essbase (a subject for a different post to be written soon as mentioned above) and see what happens.

When I stated that I just couldn’t figure out how run Essbase in a foreground window (a feature of every version of Essbase up to and including 11.1.2.0 but not in 11.1.2.1), MMIC, who, sad but true, is immeasurably smarter than me, emailed me:
“To run Essbase in fore ground, modify the startessbase.bat file (or is it cmd file) and change it to just run the essbase.exe. I had to do it for a client, but cant (sic) get to the server to look at it from this client arrrrg”

Well, the sad news is that as of 11.1.2.1 there is no startEssbase.bat.  Actually, scratch that, there are four versions of startEssbase.bat, but none of them are designed to start Essbase as foreground window.  OPMN rules over all.  Read about it all here in Oracle Support document Starting and Stopping the Essbase Server 11.1.2 using OPMN [ID 1114453.1].

Here are the four instances of startEssbase.bat:

So how the he-double tootpicks do I run essbase.exe in a foreground window?

I like to subscribe to the Infinite Monkey Theorem because when it comes to anything infrastructure-related nowadays, I am most definitely ape-like.  After a frankly embarassing amount of searching, guessing, cursing (I am keeping this oh so safe for work so just use your imagination), it finally hit me that starting Essbase was sort of like starting the MaxL shell.  And so it was.

The contents of startMaxL.bat

When I examined C:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxL.bat I saw:
@ECHO OFF
@REM This file is created to startMaxl
rem Set ESSBASEPATH
call "%~dp0\setEssbaseEnv.bat"
set PATH=%ESSBASEPATH%;%PATH%

%ESSBASEPATH%\bin\essmsh.exe %*

I thought to myself, “Self, what happens if you changed essmsh.exe to essbase.exe?”  I did a Save As from Notepad and called the new file EssbaseInAWindow.bat.  Here’s the contents:
@ECHO OFF
@REM This file is created to Essbase in a foreground window
rem Set ESSBASEPATH
call "%~dp0\setEssbaseEnv.bat"
set PATH=%ESSBASEPATH%;%PATH%

%ESSBASEPATH%\bin\essbase.exe %*

And what do we see?
HAH!  Success!  Boil in bag!

And lookie-lookie, right after the Single Sign-On Initialization succeeded:
There we are – Essbase 11.1.2.1.102.  Typing VERSION is almost anticlimatic:

What, it was in front of me all the time?

Remember that MaxL window up above?  The one that doesn’t show 11.1.2.1.102 as the version?  Well, it all depends on what startMaxL you’re running (at least on my box).  Why?  Regardez-vous C:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxL.cmd’s output:
As Charlie Brown would say, “AAAAAAAAAAUUUUUUUUUUUUGGGGGGGGGGGGHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!”

FWIW, now that you’re done with your mocking laughter (oh, I can hear it all too well, just like ol’ Charlie Brown), why exactly are the seven versions of startMaxL?  And to make it fun, why are some  templates, some .cmd files and others .bat?  Beats me.  Looks like I picked the wrong one to see the version.  In my defense, the instance of startMaxL.cmd  is the one that launches from the Start menu.  Sigh.
I’m sure bigger brains than mine could explain all of this.  I did take a peek inside the .cmd versus the .bat files – there are differences in how the paths are set.  

NB – Smarter minds:  please send me an email/write a comment to this post so my feeble brain can comprehend the madness that is startMaxL.

Conclusion

Well, that was an interesting trip into the bowels of EPM 11.1.2.1.  We’ve learnt a bunch of things:
  1. 11.1.2.1 really doesn’t want you to run Essbase as a foreground window.  For production and probably even test reasons, this is a Good Thing.
  2. Running 11.1.2.1 as a foreground window is possible, if you are stubborn/stupid enough to persist in figuring out/stumbling upon the answer.
  3. There are four valid ways to launch MaxL, two of which will give you the right version number, but neither of these .bat files are opened  from the Start menu.  Why?
  4. You can get the version from the Essbase foreground window if you do a wee bit of code modification.
  5. Yr. Obdnt. Srvnt. should probably not muck about in infrastructure-related tasks.
  6. Figuring this out was a pretty cool Essbase hack.


2 comments:

er77 said...

To view essbase version -
check in eas server properties menu.

Cameron Lackpour said...

er77,

Believe me, I thought of that. But EAS (at least my install) does NOT show anything beyond major release levels.

Take a look at this screenshot:
https://docs.google.com/open?id=0B_qdhXKUMwSdVU1QbDBNZnBTeldZTmdsYnZVaTRFZw

I still want to know why there are multiple versions of startMaxL (some with .cmd and others with .bat) and why the pathing on MaxL sometimes doesn't show the minor release levels (.cmd) and sometimes does show the minor release levels (.bat). Soooo frustrating.

Regards,

Cameron Lackpour