4、 FETCH CUR_ACCTINFO INTO ....... (取数据) IF @@SQLSTATUS <> 0 begin ...... end ........... 5、 CLOSE CUR_ACCTINFO (关闭) 6、 DEALLOCATE CURSOR CUR_ACCTINFO (释放)
Attempt to BEGIN TRANsaction in database '%.*s' failed because database is in BYPASS RECOVERY mode. Explanation Adaptive Server can start various types of transactions such as local (in response to a local command), internal (for the server's own use), external (started by an external client like a TP Monitor) and subordinate (child transactions started by a parent transaction in parallel). Bypass recovery starts Adaptive Server without recovering one or more databases. A database in this mode can be accessed even though it is not recovered. You use this mode to allow access to the database for problem analysis, to copy out data, and so on. Error 3908 is raised when a transaction is attempted while the database is in bypass recovery. Although certain commands are permissible in this mode, no transactions - regardless of type - can be started when the database is in bypass recovery. Error 3908 is raised in the following states:
State Meaning 1 Attempted to start a transaction when the database is not available for update. Applies to all possible transaction types. 2 Attempted to start a subordinate transaction when the database is not available for update. Action Do not attempt to start a transaction while the database is in bypass recovery. Check if any automated jobs may have submitted a batch job that attempted such a transaction. First restore the database to the original working status it had (prior to bypass status) before attempting any transactions. Use the following steps to reset the database status: