Saturday 15 November 2014

TM1 and MySQL Workbench

If you have chance to work with TM1 and MySQL, you probably will use MySQL workbench and it is really very handy. However, if you copy SQL directly from workbench into TI SQL window, you will have some problem, especially when you are on Windows platform. You will find that SQL in TI is truncated into some limitation automatically for some reason after you reboot the server.

See the following explanation,
How MySQL workbench add invisible char into the end of each line (only LF, which is Unix way)




After copying same SQL into Notepad++ and how Notepad++ display the end of each line (CR+LF, which is windows way)




And the SQL window in TI only recognize the common Windows way of displaying end of each line, which is CR+LF. If you copy SQL directly from workbench into TI window, at first, you won't see any problem and that SQL will be only displayed into one line. Once you reboot your server, TI would automatically truncate the whole SQL at the first place of LF. That caused the failure.

For anyone who is not familiar with CR or LF. Read this,

CR an LF are control characters, respectively coded 0x0D (13 decimal) and 0x0A (10 decimal).
They are used to mark a line break in text file. A you indicated, Windows uses two characters the CR LF sequence; Unix only uses LF and MacIntosh CR.
An apocryphal historical perspective
As indicated by Peter, CR = Carriage Return and LF = Line Feed, two expressions which have their roots in the old typewriters / TTY. LF moved the paper up (but kept the horizontal position identical) and CR brought back the "carriage" so that the next character typed would be at the leftmost position on the paper (but on the same line). CR+LF was doing both, i.e. preparing to type a new line. As time went by the physical semantics of the codes were not applicable, and as memory and floppy disk space was at a premium, some OS designers decided to only use one of the characters, they just didn't communicate very well with one another ;-)
Most modern text editors and text-oriented application offer options/settings etc. that allow the automatic detection of the file's end-of-line convention and to display it accordingly.

Wednesday 5 November 2014

TM1 on Linux

A few things to notice:
1. When run issetup, you might see some lib files are missing. Google and find them put them into /usr/lib with required file names. They are all in 32-bit if you are installing 64-bit TM1.
2. Don't trust cogconfig.sh GUI. It somehow doesn't work and can't see the error behind it.
3. To bring up the sample, you need to check tm1s.cfg first to make sure it is in Unix format.
4. Use startup_tm1s.sh command to start your TM1 server and shutdown_tm1s.sh to stop it. They may ask for missing lib files as well. Google and find them put them into /usr/lib with required file names. They are all in 64-bit if you are installing 64-bit TM1.
5. To test ODBC, you need to setup unixODBC and corresponding linux ODBC drive for your DB.
6. Once ODBC is successful, you still need odbc_test.exe to testify your ODBC connection in TM1. It may also ask for missing lib files as well. Google and find them put them into /usr/lib with required file names. They are all in 64-bit if you are installing 64-bit TM1. They should match your TM1 and OS versions for 64-bit or 32-bit. DB version is not relevant here.
7. Setup ODBCINI environment variable and put ODBCLibraryPath into your tm1s.cfg.
8. All TM1 clients should still be in windows platform. You have to setup them in other machines.
9. All in all, in Linux/Unix, better to use command all the time, they are you best friends and can tell you where your errors are. Have fun in TM1 on Linux/Unix!

Monday 14 April 2014

Olapedia - TM1

The following is a wiki website for TM1. It contains lots of fundamental concepts. It is a good start point if you are interested in it.