Open ODBC Connections
-
- Posts: 90
- Joined: Tue Aug 19, 2008 4:56 pm
Open ODBC Connections
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?
-
- 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
I've only ever seen this happen when TI Processes (Which have a ODBC Datasource) abort. Perhaps check if thats been happening.
- 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
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
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
-
- 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
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.