1. A method of controlling a dump for a database, comprising: in response to a structured query language (SQL) statement being executed for the database, determining a state of a diagnosis flag associated with the SQL statement, the diagnosis flag indicating whether to perform a dump; performing, by a computer, a dump for the SQL statement in response to determining that the diagnosis flag indicates that a dump is to be performed; and for each of one or more processing steps for the SQL statement: executing the processing step; determining the state of the diagnosis flag in response to executing the processing step; accessing dump configuration information associated with the processing step; and performing the dump for the processing step based on the dump configuration information, in response to the dump configuration information indicating a dump is to be performed.