• 命令模式彻底删除oracle实例


    步骤一:关闭数据库
    export ORACLE_SID=bgsp
    1. sqlplus / as sysdba
    2. shutdown immediate
    步骤二:删除实例相关文件
    1. find $ORACLE_BASE/ -name $ORACLE_SID
    2. 用命令删除查询后的文件
    find $ORACLE_BASE/ -name $ORACLE_SID -exec rm -rf {} ;
    步骤三:删除配置文件,假设我们删除的实例是YC
    1. find $ORACLE_BASE/* -name '*[Yy][Cc]*' | grep -v admin | grep -v oradata
    2. 用命令删除查询的文件
    find $ORACLE_BASE/* -name '*[Yy][Cc]*' | grep -v admin | grep -v oradata | xargs rm -rf
    步骤四:删除实例配置文件中的信息
    1. vim /etc/oratab
    2. 找到yc:/opt/oracle/db/product/11g:N
    3. 将该行信息删除,并保存文件
    经过以上步骤可以实现命令行干净的删除实例

    原来这个机器上装过oracle,卸载了,选择之前安装的目录(已经删除干净了),就出现了 “[INS-32025] 所选安装与指定 Oracle 主目录中已安装的软件冲突” 的问题,解决办法为:删除C:Program Files (x86)OracleInventoryContentsXML目录下的inventory.xml 文件即可。(附带改文件内容,该目录地址在这里被占用了,所以会报错)
    我是直接把oracle下面的文件都删了


    [12:41:16 oracle(db_1)@rhel65 database]$ ./runInstaller -silent -showProgress -ignoreSysPrereqs -responseFile /home/oracle/soft/database/response/db_install.rsp
    Starting Oracle Universal Installer...

    Checking Temp space: must be greater than 120 MB. Actual 7246 MB Passed
    Checking swap space: must be greater than 150 MB. Actual 3999 MB Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-05-26_12-41-19PM. Please wait ...[12:41:21 oracle(db_1)@rhel65 database]$ [FATAL] [INS-32025] The chosen installation conflicts with software already installed in the given Oracle home.
    CAUSE: The chosen installation conflicted with software already installed in the given Oracle home.
    ACTION: Install into a different Oracle home.

    [12:48:54 root()@rhel65 ~]# find / -name inventory.xml
    /usr/oracle/oraInventory/backup/2019-05-18_11-49-20PM/ContentsXML/inventory.xml
    /usr/oracle/oraInventory/ContentsXML/inventory.xml
    [12:49:06 root()@rhel65 ~]# rm /usr/oracle/oraInventory/backup/2019-05-18_11-49-20PM/ContentsXML/inventory.xml
    rm: remove regular file `/usr/oracle/oraInventory/backup/2019-05-18_11-49-20PM/ContentsXML/inventory.xml'?
    [12:49:18 root()@rhel65 ~]# rm -Rf /usr/oracle/oraInventory/backup/2019-05-18_11-49-20PM/ContentsXML/inventory.xml
    [12:49:23 root()@rhel65 ~]# rm -Rf /usr/oracle/oraInventory/ContentsXML/inventory.xml

  • 相关阅读:
    python 闭包
    并行【parallel】和并发【concurrency】线程是并发还是并行,进程是并发还是并行
    生成器,送代器的区别
    深拷贝和浅拷贝的区别
    对缺省参数的理解
    对不定长参数的理解
    mysql三范式
    mysql基础查询语法
    mysql常见查询练习题
    Ubantu-Nginx部署
  • 原文地址:https://www.cnblogs.com/ritchy/p/10927451.html
Copyright © 2020-2023  润新知