Removes the metadata of the database copy.
CALL DBCloud.ForgetDatabaseCopy ( databasecopy=databasecopy [, optional-parameters ] )
dbcloudcmd run ForgetDatabaseCopy databasecopy [ optional-parameters ]
The database copy to forget. Accepts a database copy name, ID, or a search query that returns a database copy. (Required)
Set to 1 to forget the dependent objects when forgetting the database copy. If a dependent object exists, setting to 0 returns an error. The default is 0.
If unconditionally is set to 0, the task returns an error if the target database copy is either a mirror or a primary database. If unconditionally is set to 1, it forgets the target database copy. If the database copy has scale-out database copies, they are also forgotten.
Forgetting a cloud object should only be done if repairing the object fails, and the object cannot be dropped from the cloud.
When possible, database copies should be removed from the cloud using the DropScaleOutDatabaseCopy task. The DropScaleOutDatabaseCopy task removes system resources (files, directories, and processes), and the database copy's metadata from the cloud. The ForgetDatabaseCopy task should be used only when the DropScaleOutDatabaseCopy task cannot be used. The ForgetDatabaseCopy task does not attempt to remove or update system resources.
Since the ForgetDatabaseCopy task does not delete data files, you may want to delete the database copy's data files from the cloud data directory to ensure that subsequent cloud operations are not affected.
Run the following task to remove the metadata of the database copy of the database mydb running on the cloud server my-server#4:
dbcloudcmd run ForgetDatabaseCopy databasecopy=mydb@my-server#4