4.3.8.3 DELETE DATABASE
Syntax
DELETE DATABASE
WHERE
{ ID=database_id |
CLUSTERNUMBER=cluster_number DATABASENAME=database_name |
CLUSTERNAME=cluster_name DATABASENAME=database_name |
CLUSTERID=cluster_id DATABASENAME=database_name }
Arguments
The following arguments are available in the WHERE
clause:
-
ID
: Specifies thees.xml
ID of the database -
CLUSTERNUMBER
: Specifies the cluster number in thees.xml
, starting at 1 -
CLUSTERNAME
: Specifies the name of the cluster -
CLUSTERID
: Specifies thees.xml
ID of the cluster -
DATABASENAME
: Specifies the name of the database in the cluster
Example 4-17 Deleting an Oracle Database Using OEDACLI
This example shows how to delete an existing database from the configuration.
-
Load the OEDA XML configuration file.
oedacli> LOAD FILE NAME=Oracle-test.xml SUCCESS - file loaded OK Customer : ora07adm01 - Oracle
-
List the databases contained in the XML configuration file, so that you can identify the database ID associated with the database you want to delete.
oedacli> LIST DATABASES version : "2" databaseOwner : "c0_oracle" databaseSid : "dbm01" databaseBlockSize : "8192" characterset : "AL32UTF8" databaseHome : id : "c0_databaseHome" machines : machine : ..... ..... diskGroups : diskGroup : id : "c0_datadg" id : "c0_recodg" id : "c0_dbm01" ..... ..... databaseHome : id : "c0_databaseHome3" machines : machine : .... .... databaseTemplate : "OLTP" databaseStyle : "ADMIN" language : "all_langs" diskGroups : diskGroup : id : "c0_datadg" id : "c0_recodg" id : "c0_testdb01"
-
Create an action to delete the target database. Use the database id identified in the previous step
oedacli> delete database where id='c0_testdb01'
-
Save the action.
oedacli> SAVE ACTION
-
Merge all actions.
oedacli> MERGE ACTIONS processMerge processMergeActions Merging Action : delete database where id='c0_testdb01' Merging DELETE DATABASE Action Validated and Merged OK
-
Deploy the actions into the current configuration.
oedacli> DEPLOY ACTIONS Deploying Action ID : 1 delete database where id='c0_testdb01' Deploying DELETE DATABASE Deleting database testdb Done... Done
Parent topic: DATABASE