Select Page

Essbase Studio & OC4J as a Windows Service

Author: Christian Screen | | November 12, 2009

As you know, the Hyperion 11.1.1.3 release of Essbase Studio Server was not released 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
  3. Modify the Service Name
  4. Modify the necessary file paths & drive names
  5. Execute the _init_BuildAppAsWinServiceWrapper.bat file
  6. View the Services control panel.
  7. Start > Run > services.msc
  8. Connect to the CPL command line or connect using the Essbase Studio client (admin/password)
  9. 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.

Conclusion

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 (11.1.1.3 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

Oracle BI Publisher (BIP) Tips: Functions, Calculations & More

Check out these BI Publisher tips including functions & calculations so you can understand more about the production and support of BI Publisher reports.

Sherry Milad | January 15, 2018

Qlik vs. Tableau vs. Power BI: Which BI Tool Is Right for You?

Tableau, Power BI, and Qlik each have their benefits. What are they and how do you choose? Read this blog post for a quick analysis.

Tom Hoblitzell | June 6, 2019

How to Index a Fact Table – A Best Practice

At the base of any good BI project is a solid data warehouse or data mart.

Christian Screen | March 16, 2010

Subscribe to Our Blog

Never miss a post! Stay up to date with the latest database, application and analytics tips and news. Delivered in a handy bi-weekly update straight to your inbox. You can unsubscribe at any time.

Work with Us

Let’s have a conversation about what you need to succeed and how we can help get you there.

CONTACT US

Work for Us

Where do you want to take your career? Explore exciting opportunities to join our team.

EXPLORE JOBS