You can stop a database in the following ways:
Disconnect from a database started by a connection string. The database stops automatically when the last user disconnects from it, unless you explicitly set the AUTOSTOP connection parameter to NO.
From Interactive SQL or Embedded SQL, use the STOP DATABASE statement.
For information, see STOP DATABASE statement [DBISQL] in Reference: Statements and Options.