How to delete a database in oracle: first confirm the database to be deleted and close the database; then reopen the database in restrict mode and start it in the mount state; finally use the drop database statement and delete the management or tracking of the database Information is enough.
Oracle method to delete a database:
1. Confirm whether the current database is the one to be deleted A
select name from v$database;
2. Close the database
shutdown immediate;
3. Reopen the database in restrict mode and boot to mount state
sqlplus / as sysdba startup restrict mount; --> # 只有拥有sysdba角色权限的用户才可以登录数据库,普通用户则不可以
-
select name from v$database;
6. Delete the management/tracking information of the database
drop database; --> # (10g及以后版本适用) # 它只删除了数据库文件(控制文件、数据文件、日志文件), 但并不删除ORACLEBASE/admin/ORACLE_SID目录下的文件 也不会删除初始化参数文件及密码文件。
7. Clean up the database information in the oratab file
rm ORACLEBASE/admin/ORACLE_SID
cd /etc/ ll | grep ora vim oratab #orcl:/u01/app/oracle/product/10.2.0/db_1:N
Related learning recommendations: oracle database learning tutorial
The above is the detailed content of How to delete database in oracle?. For more information, please follow other related articles on the PHP Chinese website!