DBCA modo texto: remover Database

O help está tão bom que nem precisei olhar a documentação.

Primeiro, no help geral encontrei a opção para remover o banco.

[oracle@nerv01 ~]$ dbca -silent -help
Usage:  dbca [flag] [command option]
Following are the possible flags:
        -help
                -contextId RAC | SI
        -ignorePreReqs - Ignore prerequisite checks for current operation.
        -ignorePrereqFailure  - Ignore all prerequisites failures.
        -silent - This flag allows you to carry on configuration in silent mode.
                -command

Following are the possible commands:
        -addInstance - Command to Add an instance to an admin managed cluster database.
        -configureDatabase - Command to Configure a database.
        -configurePluggableDatabase - Command to Configure a pluggable database.
        -createCloneTemplate - Command to Create a clone template from an existing database.
        -createDatabase - Command to Create a database.
        -createDuplicateDB - Command to Duplicate a database.
        -createPluggableDatabase - Command to Create a pluggable database.
        -createTemplateFromDB - Command to Create a template from an existing database.
        -deleteDatabase - Command to Delete a database.
        -deleteInstance - Command to Delete an instance from an admin managed cluster database.
        -deletePluggableDatabase - Command to Delete a pluggable database.
        -executePrereqs - Command to execute prerequisite checks.
        -generateScripts - Command to Generate scripts which can be used to create database.
        -unplugDatabase - Command to Unplug a pluggable database.


[oracle@nerv01 ~]$

Depois no help da opção -deleteDatabase, nem são necessárias tantas opções, e elas estão bem claras.

[oracle@nerv01 ~]$ dbca -silent -deleteDatabase -help
        -deleteDatabase - Command to Delete a database.
                -sourceDB Database unique name for RAC database or SID for Single Instance database
                [-deRegisterEMCloudControl ]
                        -emUser EM Admin username to add or modify targets
                        -omsHost EM management server host name
                        -omsPort EM management server port number
                        [-emPassword EM Admin user password]
                [-forceArchiveLogDeletion To delete archive logs of a database]
                [-sid Database system identifier]
                [-sysDBAPassword Password for sysDBAUserName user name]
                [-sysDBAUserName User name  with SYSDBA privileges]

[oracle@nerv01 ~]$

Aí na primeira execução que fiz já funcionou perfeitamente.

[oracle@nerv01 ~]$ dbca -silent -deleteDatabase -sourceDB ORCL -forceArchiveLogDeletion -sysDBAPassword Nerv2017 -sysDBAUserName SYS
[WARNING] [DBT-11503] The instance (ORCL1) is not running on the local node. This may result in partial delete of Oracle database.
   CAUSE: A locally running instance is required for complete deletion of Oracle database instance and database files.
   ACTION: Specify a locally running database, or execute DBCA on a node where the database instance is running.
Connecting to database
9% complete
14% complete
19% complete
23% complete
28% complete
33% complete
38% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instances and datafiles
66% complete
80% complete
95% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ORCL.log" for further details.
[oracle@nerv01 ~]$

4 comments

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *