The Teradata database supports only 1 active request and up to 15 open requests on a session. A request is considered open when Teradata has completed processing the request and the application has not closed the request by invoking TdDataReader.Close. A request is active when it is being processed by Teradata.
A session is also considered active when a request is being processed. The provider will throw an exception indicating the session is busy if the session is active and an application attempts to submit another command asynchronously. However, in some situations this exception will be retry-able. That is, if a method is called and a retry-able exception is thrown by the provider, the application can call the method again to perform the specified operation. The provider can possibly throw a retry-able exception when the following method is called:
- TdDataReader.Read: When the data buffer maintained by the provider needs to be re-filled, a request to fetch more data will be sent to Teradata. Teradata will send data from the corresponding spool file back to the provider. However, if the session object is active a TdException will be thrown that will indicate that the method can be retried. The application will have to continue calling Read until the provider has completed the execution of the command.
- TdDataReader.GetTdBlob and TdDataReader.GetTdClob: To retrieve data from a Deferred LOB, a TdBlob or TdClob object must be created by calling the corresponding "Get" method from TdDataReader. When these objects are initialized, a request is sent to Teradata to begin retrieving the data of the deferred LOB. If the session is active the behavior is similar to the TdDataReader.Read method. A TdException will be thrown that indicates that the method can be retried. The application will have to call the "Get" method again in order to create the corresponding LOB object.