You want to drop a database on Oracle Database Appliance (ODA) that is no more required or used. Use the "oakcli delete database" command to delete a database from ODA.
In this article we will demonstrate how to delete a database on Oracle Database Appliance.
Steps to Delete Database on ODA
Step 1: List the database currently running on ODA
[root@odanode01 ~]# oakcli show databases
Name Type Storage HomeName HomeLocation Version
----- ------ -------- -------------- ---------------- ----------
newdb RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
odatest RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
Step 2: Get the syntax to delete the database
[root@odanode01 ~]# oakcli delete database -h
Usage:
oakcli delete database -db <db_name>
where:
db_name - name of the database to be deleted
Step 3: Execute the "oakcli delete database" command to delete the database
[root@odanode01 ~]# oakcli delete database -db newdb
INFO: 2018-04-22 15:28:56: Look at the log file '/opt/oracle/oak/log/odanode01/tools/12.1.2.10.0/deletedatabase_newdb_39297.log' for
more details
Please enter the 'root' password :
Please re-enter the 'root' password:
Please enter the 'SYS' password :
Please re-enter the 'SYS' password:
INFO: 2018-04-22 15:29:30: Setting up SSH
............Completed
SUCCESS: Ran /usr/bin/rsync -tarqvz /opt/oracle/oak/onecmd/ root@192.168.16.25:/opt/oracle/oak/onecmd --exclude=*zip --exclude=*gz --
exclude=*log --exclude=*trc --exclude=*rpm and it returned: RC=0
..........Completed
......
SUCCESS: All nodes in /opt/oracle/oak/onecmd/tmp/db_nodes are pingable and alive.
INFO: 2018-04-22 15:31:06: SSH has been successfully established
INFO: 2018-04-22 15:33:04: Successfully deleted the database 'newdb'
INFO: 2018-04-22 15:33:09: Attempting to cleanup the SNAP entries for the database: newdb
INFO: 2018-04-22 15:33:09: Successfully deleted the SNAP entries
Step 4: Verify that the database is dropped
[root@odanode01 ~]# oakcli show databases
Name Type Storage HomeName HomeLocation Version
----- ------ -------- -------------- ---------------- ----------
odatest RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
Conclusion
In this article we have learned how to Delete database on Oracle Database Appliance (ODA). Using oakcli delete database database is extremely simple and easy to drop a database which otherwise required to use database utilities like DBCA or SQL command to drop the database.
In this article we will demonstrate how to delete a database on Oracle Database Appliance.
Steps to Delete Database on ODA
Step 1: List the database currently running on ODA
[root@odanode01 ~]# oakcli show databases
Name Type Storage HomeName HomeLocation Version
----- ------ -------- -------------- ---------------- ----------
newdb RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
odatest RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
Step 2: Get the syntax to delete the database
[root@odanode01 ~]# oakcli delete database -h
Usage:
oakcli delete database -db <db_name>
where:
db_name - name of the database to be deleted
Step 3: Execute the "oakcli delete database" command to delete the database
[root@odanode01 ~]# oakcli delete database -db newdb
INFO: 2018-04-22 15:28:56: Look at the log file '/opt/oracle/oak/log/odanode01/tools/12.1.2.10.0/deletedatabase_newdb_39297.log' for
more details
Please enter the 'root' password :
Please re-enter the 'root' password:
Please enter the 'SYS' password :
Please re-enter the 'SYS' password:
INFO: 2018-04-22 15:29:30: Setting up SSH
............Completed
SUCCESS: Ran /usr/bin/rsync -tarqvz /opt/oracle/oak/onecmd/ root@192.168.16.25:/opt/oracle/oak/onecmd --exclude=*zip --exclude=*gz --
exclude=*log --exclude=*trc --exclude=*rpm and it returned: RC=0
..........Completed
......
SUCCESS: All nodes in /opt/oracle/oak/onecmd/tmp/db_nodes are pingable and alive.
INFO: 2018-04-22 15:31:06: SSH has been successfully established
INFO: 2018-04-22 15:33:04: Successfully deleted the database 'newdb'
INFO: 2018-04-22 15:33:09: Attempting to cleanup the SNAP entries for the database: newdb
INFO: 2018-04-22 15:33:09: Successfully deleted the SNAP entries
Step 4: Verify that the database is dropped
[root@odanode01 ~]# oakcli show databases
Name Type Storage HomeName HomeLocation Version
----- ------ -------- -------------- ---------------- ----------
odatest RAC ACFS OraDb12102_home1 /u01/app/oracle/product/12.1.0.2/dbhome_1 12.1.0.2.170117(24732082,24828633)
Conclusion
In this article we have learned how to Delete database on Oracle Database Appliance (ODA). Using oakcli delete database database is extremely simple and easy to drop a database which otherwise required to use database utilities like DBCA or SQL command to drop the database.
No comments:
Post a Comment