Function to list TM1 version
Posted: Mon Jan 05, 2015 9:24 pm
Is there a function that would return the TM1 versions used?
Discussing all things TM1, Planning Analytics, PAx and PAW
https://www.tm1forum.com/
Mmm, wouldn't that be nice. Grown up programs actually have that on both the client side (any program in Office, right down to patch and build) and the server side (SQL Server) if applicable.bjones wrote:Is there a function that would return the TM1 versions used?
Code: Select all
Quote = CHAR(34);
# Need to escape the backslashes
Locationofbinary = 'D:\\Program Files\\ibm\\cognos\\tm1_64\\bin64\\tm1sd.exe';
Outputfile = 'G:\TM1 Version.txt';
# The command should look like this :
# cmd /c wmic datafile where Name="D:\\Program Files\\ibm\\cognos\\tm1_64\\bin64\\tm1sd.exe" get "Version" > "G:\TM1 Version.txt"
Command = 'cmd /c wmic datafile where Name=' | Quote | LocationOfBinary | Quote | ' get ' | Quote | 'Version' | Quote | ' > ' | Quote | Outputfile | Quote;
ExecuteCommand ( Command ,0 );
DataSourceNameForServer = Outputfile ;
Breaking this one down:
10.1.00100.24600
"10.1.0" = TM1 10.1.0
"00100" = FP1
"24600" = Build number, useful for us/dev.
The important numbers are the middle ones (00100).
The first is part of the major release (aka 10.1.10000 = TM1 10.1.1)
The next 2 numbers are for the FP.
The last 2 numbers are for the IF (aka Hotfix).
To provide more info:
10.1.00100.24600 = TM1 10.1.0 FP1
10.1.10000.26473 = TM1 10.1.1 Base Release
10.1.10100.31864 = TM1 10.1.1 FP1 (For 10.1.1 FP2 this would be 10.1.10200.xxxxx)
10.1.10104.34644 = TM1 10.1.1 FP1 IF4
Code: Select all
All TM1 build strings are formatted as A.B.CDDEE.xxxxx.
A is the Major version
B is the Minor version
C is the Release Pack version
DD is the Fix Pack version
EE is the Interim Fix version
xxxxx is the build number
That's very clever. More fiddly than we should ever need to bother with, but in the absence of something more straightforward it's an inspired piece of coding.failurehappening wrote:Assuming you're on windows you can use the wmic command to retrieve the version number
Yes, the terminology was why I was a touch reluctant to trust that fully without confirmation from Support, with "Maintenance Releases" clearly being left over from the old Applix days. But I agree that you're right, looking over various version installs it does seem to be more or less the same pattern as was established there.BrianL wrote:There is some official documentation on finding and understanding the version strings - http://www-01.ibm.com/support/docview.w ... wg21457063.
Looks like it needs some updating though. The terminology has changed over time, but I believe this numbering has been pretty consistent since 9.5 server
On the client side I'd think that the main user case is that every software company and its dog puts an About -> Version entry in its client software for an obvious reason; "what version are you on?" is the number 2 support question after "what program are you using?". If you have 150 users using a piece of client software and you find that some of them are having problems that should have been sorted in a patch, you don't want to have to go to their workstations and start digging through their hard drives when the (faster, quicker, cleaner) option is to ask them to just go to the Help menu and select About.BrianL wrote:Are you looking for just TM1 server version, or do you want clients too? Are you just looking for the version strings to be exposed in the UIs somewhere or do you actually want to dynamically retrieve (and use) them? If so, what's the use case?
Code: Select all
$PSVersionTable.PSVersion
Code: Select all
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
Code: Select all
I got nuthin', go search for the details of the .exe file.
Code branching as Lotsaram describes would be valuable, but wouldn't that require far more than just a new TI function to return the version?Alan Kirk wrote:Leaving aside that this is not a good look, if you want the specifics of why a function returning the version number from the server would be a seriously good idea I refer you to this post by Lotsaram, which expresses it as well as I've seen it expressed.