Open ODBC Connections

Post Reply
cdhodge2002
Posts: 90
Joined: Tue Aug 19, 2008 4:56 pm

Open ODBC Connections

Post by cdhodge2002 »

So I have a IT person who is saying that for time I ping their database I open a new session to their server. This being true but apparently TM1 is not closing the session and Each new load opens a new session. So after a month or so 100+ sessions are open and don't close until the TM1 server is rebooted. Is there a way to close these sessions other than putting a ODBCClose formula at the end of every process?
Kyro
Community Contributor
Posts: 126
Joined: Tue Nov 03, 2009 7:46 pm
OLAP Product: MODLR - The CPM Cloud
Version: Always the latest.
Excel Version: 365
Location: Sydney, Australia
Contact:

Re: Open ODBC Connections

Post by Kyro »

I've only ever seen this happen when TI Processes (Which have a ODBC Datasource) abort. Perhaps check if thats been happening.
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Open ODBC Connections

Post by paulsimon »

Hi

Are you simply reading from ODBC or are you using ODBCOpen, ODBCOutput and ODBCClose to output data? If its the former, then check to see whether there is an error of some sort that is preventing the connection from being closed. For example, is the process completing successsfully or is it erroring? I have never had a problem with connections being left open but I guess it will depend on the version of TM1 and the database.

If its the latter, check that ODBCClose is always being executed, eg there is no conditional logic that could stop it.

If there is nothing obvious, work with the DBA to monitor the connection.

Regards


Paul Simon
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Open ODBC Connections

Post by lotsaram »

Likewise I have only ever seen ODBC connections stay open if a process aborts. If the process completes successfully or with minor errors then the connection should close. If a process aborting is causing your problem then adding ODBCClose to the Epilog won't do anything since the Epilog code won't be executed as the process has already aborted. You need to fix what is causing the abort error in the first place.
Post Reply