Page 1 of 1

Ensuring ODBC connection is closed

Posted: Wed Feb 26, 2014 2:57 pm
by ATD
Hi,

I have a process that uses ODBCOpen(), ODBCOutput() and ODBCClose()

If the ODBCOutput() function calls a procedure on the remote database and that fails, how do I ensure that the ODBCClose() function is always called so that the connection is always closed?

I've tried the ODBCClose() in Prolog and Epilog but in either case, if the ODBCOutput() call fails, the ODBCClose() is not run and the connection remains open on the remote database.

Any suggestions welcome!

Thanks

Andy

Re: Ensuring ODBC connection is closed

Posted: Thu Feb 27, 2014 12:42 pm
by Gabor
There is a known issue, which is addressed with TM1 10.2 FP1 IF2.
PI09375 ODBC connections TM1 server leaves ODBC connections open to Oracle when the TM1 process fails
I think you need to involve support to see if there is a Fix available for your version and if it catches your problem.
Unfortunately most fixes only reside in private sections of Fix Central these days.

Re: Ensuring ODBC connection is closed

Posted: Thu Feb 27, 2014 12:59 pm
by ATD
Gabor wrote:There is a known issue, which is addressed with TM1 10.2 FP1 IF2.
PI09375 ODBC connections TM1 server leaves ODBC connections open to Oracle when the TM1 process fails
I think you need to involve support to see if there is a Fix available for your version and if it catches your problem.
Unfortunately most fixes only reside in private sections of Fix Central these days.

Hi Gabor,

Thanks for that. We've just done an upgrade to 10.2 in our dev system, so we'll check it there

Regards

Andy

Re: Ensuring ODBC connection is closed

Posted: Thu Feb 27, 2014 4:26 pm
by Gabor
Please keep in mind, 10.2 FP1 has a build number 39992, but you need to look for a build 40547 (IF2) or higher.

Re: Ensuring ODBC connection is closed

Posted: Fri Feb 28, 2014 7:41 am
by ATD
Thanks, Gabor

I'm not sure what the build is that has just been installed - so have sent a request to find out

Regards

Andy

Re: Ensuring ODBC connection is closed

Posted: Fri Feb 28, 2014 1:15 pm
by whitej_d
The interim fix mentioned is officially termed Interim Fix 1 by IBM, however there seems to be some confusion on IBMs part with the accompanying documentation which states IF2 in places.

Another option might be to Open and close connections in a master process and run a sub-process to do the ODBC outputs. That way you can do something like:
ODBCOpen(....);
sResult = ExecuteProcess('ODBCOutputTI');
ODBCClose(...);

Re: Ensuring ODBC connection is closed

Posted: Fri Feb 28, 2014 1:21 pm
by ATD
whitej_d wrote:The interim fix mentioned is officially termed Interim Fix 1 by IBM, however there seems to be some confusion on IBMs part with the accompanying documentation which states IF2 in places.

Another option might be to Open and close connections in a master process and run a sub-process to do the ODBC outputs. That way you can do something like:
ODBCOpen(....);
sResult = ExecuteProcess('ODBCOutputTI');
ODBCClose(...);
Hi

According to our consultant, the fix was issued on 24 Feb and does include the fix for ODBC connections - so, we'll be installing that at some point

I did try something similar to your example - however, each process wanted its own ODBC connection (ie, you can't pass the connection between processes), so the subprocess wouldn't run unless it had its own ODBCOpen/Close function calls which, of course, brings you back to Square 1!

Regards

Andy

Re: Ensuring ODBC connection is closed

Posted: Fri Feb 28, 2014 4:07 pm
by Gabor
After a major issue with MTQ (Multi Threaded Query) IBM has decided to back out the prior Interim Fixes IF1 & IF2 and combine both into a new "IF1" and make this one available in the public area of Fix Central. Version 10.2.102.40547.
http://www-01.ibm.com/support/docview.w ... wg24037000