In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to delete Oracle instances on the command line, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.
All the procedures in this article have been performed in a single instance database test environment. The database version that needs to be deleted is Oracle 11.2.0.1.0, and the database instance that needs to be deleted is named bgsp.
Step 1: shut down the database
1.export ORACLE_SID=bgsp
2.sqlplus / as sysdba
3.shutdown immediate
Step 2: delete the files related to the instance, where the instance is bgsp (special treatment is required if the file is stored in another path, such as replacing the $ORACLE_BASE command in the following find command)
1.find $ORACLE_BASE/-name bgsp
[oracle@localhost-a ~] $find $ORACLE_BASE/-name bgsp
/ Oracle_11g/flash_recovery_area/bgsp
/ Oracle_11g/oradata/bgsp
/ Oracle_11g/cfgtoollogs/dbca/bgsp
/ Oracle_11g/cfgtoollogs/emca/bgsp
/ Oracle_11g/oracle/localhost-a_bgsp/sysman/emd/state/storage/bgsp
/ Oracle_11g/admin/bgsp
/ Oracle_11g/diag/rdbms/bgsp
/ Oracle_11g/diag/rdbms/bgsp/bgsp
two。 Delete the file after query with the command (Note: if the file found in the previous step has non-instance-related files, it cannot be deleted directly through the "- exec rm-rf {}\;" command. It is recommended to delete one by one to avoid mistakenly deleting the file)
Find $ORACLE_BASE/-name bgsp-exec rm-rf {}\
[oracle@localhost-a ~] $find $ORACLE_BASE/-name bgsp-exec rm-rf {}\
Find: `/ Oracle_11g/flash_recovery_area/bgsp': No such file or directory
Find: `/ Oracle_11g/oradata/bgsp': No such file or directory
Find: `/ Oracle_11g/cfgtoollogs/dbca/bgsp': No such file or directory
Find: `/ Oracle_11g/cfgtoollogs/emca/bgsp': No such file or directory
Find: `/ Oracle_11g/oracle/localhost-a_bgsp/sysman/emd/state/storage/bgsp': No such file or directory
Find: `/ Oracle_11g/admin/bgsp': No such file or directory
Find: `/ Oracle_11g/diag/rdbms/bgsp': No such file or directory
[oracle@localhost-a ~] $find $ORACLE_BASE/-name bgsp
Step 3: delete the configuration file (query first, then check if there are any non-instance related files, and then delete them as appropriate)
1.find $ORACLE_BASE/*-name'* [Bb] [Gg] [Ss] [Pp] *'| grep-v admin | grep-v oradata | xargs rm-rf
[oracle@localhost-a ~] $find $ORACLE_BASE/*-name'* [Bb] [Gg] [Ss] [Pp] *'| grep-v admin | grep-v oradata
/ Oracle_11g/flash_recovery_area/BGSP
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_12586.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_15261.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_19341.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_19562.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_7391.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_15191.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_17827.trc
/ Oracle_11g/oracle/rdbms/log/bgsp_ora_12319.trc
/ Oracle_11g/oracle/localhost-a_bgsp
/ Oracle_11g/oracle/localhost-a_bgsp/sysman/emd/collection/oracle_database_bgsp.xml
/ Oracle_11g/oracle/oc4j/j2ee/OC4J_DBConsole_localhost-a_bgsp
/ Oracle_11g/oracle/dbs/orapwbgsp
/ Oracle_11g/oracle/dbs/lkBGSP
/ Oracle_11g/oracle/dbs/spfilebgsp.ora
/ Oracle_11g/oracle/dbs/hc_bgsp.dat
/ Oracle_11g/oracle/EMStagePatches_bgsp
[oracle@localhost-a ~] $find $ORACLE_BASE/*-name'* [Bb] [Gg] [Ss] [Pp] *'| grep-v admin | grep-v oradata | xargs rm-rf
[oracle@localhost-a ~] $find $ORACLE_BASE/*-name'* [Bb] [Gg] [Ss] [Pp] *'| grep-v admin | grep-v oradata
Step 4: delete the information in the instance configuration file
1.vi / etc/oratab
two。 Find bgsp:/Oracle_11g/oracle:N.
3. Delete the line of information and save the file
Thank you for reading this article carefully. I hope the article "how to delete Oracle instances on the command line" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.