OpenSwitch maintains a list of any dynamic SQL commands that are prepared but not yet deallocated. If the list is not null, OpenSwitch resends the DYNAMIC_PREPARE statements for each command to the secondary server using statement ID and query content stored in the list for each of the threads. The clients are then switched over to the secondary server.
If a client connection is busy during failover, a 1205 error is issued back to the client. It is left to the client to reissue the command.
If any client was in a busy state at the time of failover, an error message is issued and the statement must be rerun.
If there are open cursors in the dynamic SQL statement, OpenSwitch redeclares the open cursors on the secondary server.