A database server is a software product that provides database services to software applications in response to requests received therefrom. Such database services may include but are not limited to storing, retrieving, analyzing or manipulating database data. Depending upon the implementation, the software applications may be running on the same machine on which the database server is running or may be running on other machines that are connected to the machine on which the database server is running via one or more networks. To send requests to the database server, an application opens a connection to the database server and establishes therewith what is referred to as a session. A session represents an ongoing interactive information exchange between the application and the database server. A session is set up or established at a certain point in time and then torn down at a later point in time. An established session often involves the sending of more than one message from the application to the database server and from the database server to the application.
After an application has initiated a session with a database server, it may send one or more commands to the database server for execution within the context of the session. At some point in time, the connection between the application and the database server may fail. For example, in a scenario in which the application and the database server are running on different machines, the connection may fail if the machine on which the database server is running is shut down or crashes or if there is a problem with a network that connects the different machines. If the connection fails, then the session also fails. In a conventional implementation, when the session fails, the application must open a new connection with the same database server or an alternate database server and then establish an entirely new session therewith in order to continue executing commands. Any state information that was maintained by the original database server in association with the failed session is lost. Such state information may include temporary results (e.g., temporary tables), transaction state information, a database cursor handle, or other information accumulated by the database server in association with a session to facilitate successful and/or efficient processing of commands received within the context of the session. The requirement of the establishment of an entirely new session and the loss of session state information are undesirable results of a failed connection, as they impair system performance and place additional burdens on both the application and the database server(s).
The features and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings, in which like reference characters identify corresponding elements throughout. In the drawings, like reference numbers generally indicate identical, functionally similar, and/or structurally similar elements. The drawing in which an element first appears is indicated by the leftmost digit(s) in the corresponding reference number.