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; and 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.