Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP SQL Anywhere, on-demand edition 1.0 SP 6 » Task syntax

ForgetDatabase task

Removes the metadata of the database.

Syntax 1 (SQL)
CALL DBCloud.ForgetDatabase ( database=database [, optional-parameters ] )
Syntax 2 (Cloud Command utility)
dbcloudcmd run ForgetDatabase database [ optional-parameters ]
Parameters
  • database

    The database to forget. Accepts a search query that identifies one database, for example a database name or ID. (Required)

  • unconditionally

    Set to 1 to forget the dependent objects when forgetting the database. If a dependent object exists, setting to 0 returns an error. The default is 0.

Required privileges

Administrator

Remarks

If unconditionally is set to 0, the task returns an error if the database has a copy or there is a backup of the database. If unconditionally is set to 1, it forgets the target database, as well as the database copies and the backups of the database.

Forgetting a cloud object should only be done if repairing the object fails, and the object cannot be dropped from the cloud.

When possible, databases should be removed from the cloud using the DropDatabase task. The DropDatabase task removes system resources (files, directories, and processes), and the database's metadata from the cloud. The ForgetDatabase task should be used only when the DropDatabase task cannot be used. The ForgetDatabase task does not attempt to remove or update system resources.

Since the ForgetDatabase task does not delete data files, you may want to delete the database's data files from the cloud data directory to ensure that subsequent cloud operations are not affected.

Example

Run the following task to remove the metadata of the database mydb:

dbcloudcmd run ForgetDatabase database=mydb