Can anyone tell me how locking works on the TM1Server.log? It seems to be possible to open this file even while the server is running (and apparently writing to it). What happens if someone has the file open in notepad when TM1 wants to write something to it? The answer seems to be nothing, but I'd like to understand why.
thanks ..........hugh
Accessing TM1Server.log
-
- Site Admin
- Posts: 6647
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Accessing TM1Server.log
It's not something specific to TM1; it's just plain ol' vanilla Windows file locking.hbell wrote:Can anyone tell me how locking works on the TM1Server.log? It seems to be possible to open this file even while the server is running (and apparently writing to it). What happens if someone has the file open in notepad when TM1 wants to write something to it? The answer seems to be nothing, but I'd like to understand why.
When you open a file for input or output in VB or VBA, for example, you can specify the locking mode for the file. That can be any one of: Shared (Any process can read or write to the file), LockRead (other processes can't read the file), LockReadWrite (Other processes can't read or write to the file) or LockWrite (Other processes can't write to the file). In earlier versions of TM1 from memory all of the TM1 logs were LockReadWrite and you couldn't get to them while the server was running. By 9.4, though, only tm1s.log (the transaction log) is, because obviously if anyone messes with that while the server is running then there could be hell to pay especially (in 9.5) with an Undo operation.
However TM1Server.log is not as critical; it's for information only. And if the server gets stuck in a loop, it's useful to be able to see what the last action was, although TM1Top can also help with that. In any case, there's no reason to hold an exclusive R/W lock on that file, so the server would open it as a shared file. Making the change was a good call on Applix/Cognos' part, since it can be a useful source of information.
Bear in mind that what you're seeing in Notepad is really just a copy of the file (as it existed at the time of opening) read into your computer's memory. That being the case if TM1 wants to write to it, TM1 will go ahead and do exactly that since it has full shared access to the file as well. What will then happen is that the file on disk will be changed, though what you're looking at won't be because as I said what you're seeing isn't really the file itself but merely the data that was in it at the time you opened it. The only problem would be if you were to save the file before closing it, in which case you'd overwrite any changes that TM1 made while you had it open but since the server log is not as "mission critical" as the transaction log file that won't cause your system to crash or anything nasty like that.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: Accessing TM1Server.log
Alan
... thanks for the comprehensive reply. I wanted to exclude it as a suspect in some recent server crashes - and I think you've just done that..........hugh
... thanks for the comprehensive reply. I wanted to exclude it as a suspect in some recent server crashes - and I think you've just done that..........hugh