SQLA loses Session Info for current session but does not logoff the database - Generated new session

Database
Enthusiast

SQLA loses Session Info for current session but does not logoff the database - Generated new session

 We are currently working an incident where we appear to lose sessions in dbc.sessioninfo from SQLA connections.   TTU 15.0   .net driver does not write / update new session info when changing defaults int eh session.   (example database xxxxx) .   ODBC connections from SQLA write / update session infor but drop off thereby losing the new defaults for the session.  Has anyone else experienced this?


Accepted Solutions
Teradata Employee

Re: SQLA loses Session Info for current session but does not logoff the database - Generated new ses

Be sure Tools / Options / Query "Disconnect from database when no query is running" option is not selected.

 

And if you are using multiple tabs within one query window, only one tab should actually be executing requests at a time. Any temporary session that SQLA connects to run concurrent requests would start with user default settings rather than whatever options have been specified in the main session for the window; and conversely, any changes made in the temporary session will not be applied to the main session.

1 ACCEPTED SOLUTION
4 REPLIES
Senior Apprentice

Re: SQLA loses Session Info for current session but does not logoff the database - Generated new ses

Hi,

No I haven't specifically experienced this, you may need to open an incident with TD. Also remember that the recording of the 'default database' in the dbc.sessioninfotbl is a dbms function, not a client (SQLA) function.

 

However I think a couple of tests can help to narrow this down.

Using .NET connection:

1) logon and run the following: SELECT sessionno,defaultdatabase FROM dbc.sessioninfov WHERE sessionno = SESSION; Make a note of the sessionno value.

2) SELECT xxsessionno,defaultdatabase FROM dbc.sessioninfov WHERE sessionno = SESSION;  <== this will fail and is meant to.

3) execute a 'database **bleep**' command and re-run the first query (#1) from above.

 

Does the DefaultDatabase change to what is expected?

- YES: all is working as expected

- NO: did the command reach the database and work? Check this by pressing F11. This displays the last error TD message received by SQLA. Does it show the error message from #2 or a different error?

 

Also, are you running in ANSI or Teradata transaction mode?

 

Start with that and see where we get to?

 

Cheers,

Dave

 

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Teradata Employee

Re: SQLA loses Session Info for current session but does not logoff the database - Generated new ses

Be sure Tools / Options / Query "Disconnect from database when no query is running" option is not selected.

 

And if you are using multiple tabs within one query window, only one tab should actually be executing requests at a time. Any temporary session that SQLA connects to run concurrent requests would start with user default settings rather than whatever options have been specified in the main session for the window; and conversely, any changes made in the temporary session will not be applied to the main session.

Enthusiast

Re: SQLA loses Session Info for current session but does not logoff the database - Generated new ses

I think this may have something to do with it.  Disconnect from db was turned on on this machine.   We already have an open incident and have been working to recreate the issue on other locations and drivers.  For whatever reason, this version on this machine had the option on by default.  We did not notice that before.  This woudl explain why I have only been seeing this on SQLA connections.   

 

Maybe this explains how connections SQLA can appear to not be connectected, but still be able to execute a query without logging on again.   I think this helped point me int he right direction on a few other anomolies.  W e sometimes encountered long connected sessions that are not getting booted by our Monitoring actions through Viewpoint for idle sessions. 

 

Thanks for the memory jogger.. I am going ot keep testing now to see if this is the culprit.

Enthusiast

Re: SQLA loses Session Info for current session but does not logoff the database - Generated new ses

Thanks Dave, I  will work through these suggestions as well. We already had a case opened and was workign on recreating this issues outside of my machine.  I think the other reply on the disconenct from db might be casuing part of the problem.  I will keep testing thoguht to be sure and update here is I find anythign else.