TI command to identify TM1 Server?

Post Reply
tomcoffingiii
Posts: 2
Joined: Thu Sep 05, 2013 3:31 pm
OLAP Product: TM1 9.5.2
Version: 9.5.2
Excel Version: 2007

TI command to identify TM1 Server?

Post by tomcoffingiii »

Hello Everyone,

The company I work for is currently running TM1 9.5.2 on a 64-bit windows box. We currently have about 10 different environments defined - 6 DEV servers, 2 UAT servers, and a PROD server. Each server has it's own "Server Environment" cube that is used to establish various directories to be used for the various processes and what not in each server.

Now, typically when we are working in our DEV servers on code upgrades or bug shakeout, we'll refresh the DEV server so that its code becomes in sync with what's currently in PROD. After the server is refreshed and restarted, our server environment cubes are then built based on files located in various directories for each server. The problem is that because we have different server information files in various locations, and our developers have full access to manipulate the files in these directories automatically, occasionally a server information file will be accidentally moved or deleted, which in turn causes problems building our server environment cube.

So my question is this - is it possible to build a TI that can self-identify which server it's running on, without relying on an 'outside' file?

If I'm in TM1 Architect or Perspectives - I can right-click on a server and click on "Who am I?", which will then tell me my username and which server I am on. If I can run something similar in a TI process, I can simply have a standard environmental cube that holds all of our various servers directories, then from there do lookups in our TI processes to know which directories to use.

Thanks for your time,

Tom

*EDIT* Please see the two posts below by FailureHappening and Lotsaram - both are very viable solutions.
+
Last edited by tomcoffingiii on Fri Feb 21, 2014 2:57 pm, edited 1 time in total.
failurehappening
Posts: 78
Joined: Tue Nov 30, 2010 1:18 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TI command to identify TM1 Server?

Post by failurehappening »

Hi Tom

Do each of your instances have a separate log directory with the same name as the instance? You could use this bit of code to get that:

Code: Select all

sLogDirectory = GetProcessErrorFileDirectory;

#Use the fact the log directory is always in e:\data\project\tm1\logs\

nLogDirLength = (LONG('e:\data\project\tm1\logs\') +1);
sInstance = SUBST(sLogDirectory , nLogDirLength, (LONG(sLogDirectory) - nLogDirLength));
CellPutS(sInstance , 'Control Cube','Server Name','String');
It does rely on you giving the log directory the same name as the instance...
RHR
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TI command to identify TM1 Server?

Post by lotsaram »

You could conceivably call a batch file that writes out a text file with computer name, ip config and current directory and pick this output up in a subsequent TI process and use that to then configure your environment cubes. Do this in a startup chore and the risk of corruption due to an overwrite/promotion should be managed.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
tomcoffingiii
Posts: 2
Joined: Thu Sep 05, 2013 3:31 pm
OLAP Product: TM1 9.5.2
Version: 9.5.2
Excel Version: 2007

Re: TI command to identify TM1 Server?

Post by tomcoffingiii »

FailureHappening - Good thinking! I had discovered that command last night and it just so happens that our message log directories do contain the name of the server. I was going to come to this thread and post the answer, but you beat me to it :)

Lotsaram - Thanks for the suggestion, we were going to go that route if FailureHappening's suggestion didn't work.
Post Reply