Art of BI: Essbase Studio & OC4J as a Windows Service

By | In Art of BI, Big Data, Business Intelligence | November 12th, 2009

As you know, the Hyperion release of Essbase Studio Server was not release as a windows service. After my last Essbase Studio implementation project, and being repeatedly asked, “How do we run Essbase Studio as a Windows Service?”, I decided to dig deep into the details and deliver a concrete answer to those that care to read on.  Of course, I was successful in my endeavor, hence this post. Now, I ask, Do you want to see Essbase Studio Server launchable in your services panel like this…?


I keep getting asked “Was the Essbase Studio installation ever provided as a windows service?”. My reply to that now is “Who cares?”. If the Oracle think-tank decided not to make life easier for us with a Windows Service for Essbase Studio upon install then so be it. At least now, I’ve got a great rebuttal and a top-notch solution. Now, no longer must this one piece of the Hyperion BI suite be the outcast with only the startServer.bat file to launch the server.

As I move forward in this post, you’ll cross-reference that the title also mentions OC4J. I’ve got that covered as well but I will mainly be focusing on Essbase Studio since it ranks higher on my priority list.  With this blog I am providing a Zip file with the source code to this solution via the Creative Commons BSD License.

Don’t Use a Third Party Solution
There is nothing wrong with the enterprising capitalizing third-party tools that will let you convert these Oracle/Hyperion Java based applications into a Windows service. And there are few good ones out there, both for free and pay. However, the main point to make in this section is that most companies frown at using third-party tools that are not pre-approved. Also, their infrastructure teams know nothing about the tools if something does go wrong. With the solution I am going to show you, getting Essbase Studio to run as a Windows Service is all Microsoft Tool centric. Just to prove I am not hating on the third-party vendors, I have listed links to their sites at the bottom of this blog post.

A Long Road with a Solution at the End
I must say that typically I am more on the business side of things, but since I wear many hats in BI Consulting, when I arrive at a technical conundrum, its easy for me to switch on the tunnel vision. In seeking a solution for this Windows Service problem, I wanted the easiest to follow silver bullet answer. To keep you up-to-speed with the correct jargon, the solution is referred to as a User-Defined Service (UDS).  This UDS had to be easy to replicate, easy to understand, and presentable. So, that leaves out crazy solutions involving Visual Studio.NET, third-party software, compiling any code, and holding your breath until it magically just works.

I went down several roads including using an really neat executable sc.exe (more detail) which installs with Windows Server 2003+, located in C:WindowsSystem32.  I spent a decent amount of time with this approach but it just would not launch a Java or JVM based application.  Ultimately it was to weak to be the final solution albeit you will see an ancillary use of it in the final solution.  This was a painful process to find this great solution. So, if you appreciate the effort for this contribution or end up using it, please leave a comment to let me know the late night twas not in vein.

How-To Get the Windows Service Your Way
At the core of the solution are two executables from the Windows Server 2003 Resource Toolkit, called instsrv.exe and srvany.exe.  Don’t feel bad if you had never heard of this toolset from Microsoft before – It’s only been around for 6 years or so.  It contains a lot of files that you may be interested in learning about but we are only focused on two of them.  You will need to download the rktools.exe from Microsoft and install it on the server where your issue resides. Use the defaults during installation, however, it doesn’t matter because this solution recommends copying the two required files in to a different directory.

If you don’t feel like reading any further, here is the download that I am providing free of charge with the Create Common BSD License, Download Zip.

  1. You will need to download the Zip file provided in this blog.  It houses a container folder called “WindowsService” which will need to be extracted to your Essbase Studio Server root path, HYPERION_HOMEproductsessbaseessbaseStudio.  (Note:  You can place this any where on the Essbase Studio Server however, I like this file path as it centralized everything to Essbase Studio’s world). [simage=81,320,y,center]
  2. Inspect/Review the “RegisterService.bat” and ServiceRegistration.reg” files
    • Modify the Service Name
    • Modify the necessary file paths & drive names
  3. Execute the _init_BuildAppAsWinServiceWrapper.bat file
  4. View the Services control panel.
    • Start > Run > services.msc
  5. Connect to the CPL command line or connect using the Essbase Studio client (admin/password)
  6. Rejoice.

I’ll soon have a video tutorial posted showing how to implement this solution, but if you just read through the logic of the files that I have provided you should have no problems.  Here is the video tutorial.

In regards to using this solution for OC4J, first locate your OC4J.cmd file and note its path. Change the paths and service names in the “ServiceRegistration.reg” file to match the execution file path inside of the OC4J.cmd when it is executed with “OC4J.cmd -start”.  I’ll write a full-blown post on this later on.

When I originally researched this issue I came across one blog that said it was impossible to run a Java application, specifically Essbase Studio as a Windows Service “without a third-party product”.  That blog went on to suggest a third-party application.  I like the notion that even a resource toolkit that was released 6 years ago can in some way still have a solid impact on new technology ( release) of today. It also exemplifies one of my favorite quotes from Mark Twain, “What gets us into trouble is not what we don’t know. It’s what we know for sure that just ain’t so.”

Although this solution was probably one of the biggest pains in the ass to come up it, it has allowed me to expand my arsenal in BI infrastructure and MS Windows Services capabilities.  This was almost as good of a find for me as psexec.exe and the Microsoft SysInternals pstools toolkit years ago.  I hope it does the same for you.

Links to Third-Party Windows Service Software
As mentioned above here are some third-party tools if you are not comfortable with the Microsoft Windows solution I have designed.

Further References Worth Mentioning

Contact Us
Christian Screen
Christian is an innovator in analytics and data warehousing design, best practices, and delivery. With more than fifteenyears of decision support and data warehousing with key experiences at Office Depot HQ, Sierra-Cedar, and Capgemini, he oversees the Oracle Analytics Practice which includes the technical development and delivery of Oracle BI collaboration software, data warehouse solutions, Oracle BI/EPM projects, and packaged analytics solutions at Datavail.

Leave a Reply

Your email address will not be published.
Required fields are marked (*).

5 thoughts on “Art of BI: Essbase Studio & OC4J as a Windows Service”
  1. Hi Christian

    Please send me Oracle DDL and DAL scripts for the article Oracle Essbase Studio Deep-Dive. Its really awesome. Please share all the tutorials that you have in Essbase Studio.

    Please email the scripts to

    Thanks in advance.


  2. Thanks! I was looking for some help installing OC4J as a service and this post was a good starting point. I’m not sure if my situation is unique or not, but I ran into some problems getting it to work. Here is what I had to do.
    1. Install a service to execute the srvany.exe process
    2. Set up an environment variable called %JAVAPARMS% with the Java command line
    (Had to do this because srvany will not process a AppParameters value longer than 259 characters – It just ignores it completely)
    (To do this, add a reg value called “Environment” of type MULTI-SZ under your services key)
    3. Set up the Application value as cmd.exe
    (Had to do this because starting java.exe directly would not ever start the app server)
    4. Set up the AppParameters value as /c java.exe -Xrs %JAVAPARMS%

    Only issue with this is that stopping the service only kills the cmd.exe process and leaves the app server running. You still have to use the oc4j.bat -shutdown command to stop the app server. I was hoping to find a way around that using native Windows tools, but alas, I’ve given up that quest.

    1. Step 4. should read:
      Set up the App Parameters value as /c *path*java.exe -Xrs %JAVAPARMS%
      (Replace *path* with the path to your java bin directory)