As you know, the Hyperion 22.214.171.124 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.
- 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]
- Inspect/Review the “RegisterService.bat” and ServiceRegistration.reg” files
- Modify the Service Name
- Modify the necessary file paths & drive names
- Execute the _init_BuildAppAsWinServiceWrapper.bat file
- View the Services control panel.
- Start > Run > services.msc
- Connect to the CPL command line or connect using the Essbase Studio client (admin/password)
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 (126.96.36.199 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
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.
EPM applications help measure the business performance. This post will help you choose the best EPM solutions for your organization’s needs and objectives.