国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

    linux刪除數(shù)據(jù)庫(kù)命令

    時(shí)間: 佳洲1085 分享

      在Linux系統(tǒng)中想要?jiǎng)h除數(shù)據(jù)庫(kù)可以通過(guò)命令來(lái)執(zhí)行,下面由學(xué)習(xí)啦小編為大家整理了linux刪除數(shù)據(jù)庫(kù)命令的相關(guān)知識(shí),希望對(duì)大家有幫助!

      linux刪除數(shù)據(jù)庫(kù)命令

      linux刪除oracle數(shù)據(jù)庫(kù)命令和方法

      1.關(guān)閉所有oracle進(jìn)程

      因?yàn)闇?zhǔn)備要?jiǎng)h除數(shù)據(jù)庫(kù),所以不用正常完成數(shù)據(jù)的保存

      shutdown abort11

      如果沒(méi)有設(shè)置開(kāi)機(jī)自動(dòng)啟動(dòng),服務(wù)器也沒(méi)有運(yùn)行其它系統(tǒng),可以考慮重啟服務(wù)器

      2.刪除實(shí)例數(shù)據(jù)文件和dump文件

      find $ORACLE_BASE/ -name $ORACLE_SID11

      在我系統(tǒng)里面顯示如下,將這些目錄直接刪除

      /u01/app/oracle/admin/testdb

      /u01/app/oracle/oradata/testdb

      /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/testdb

      /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/testdb12341234

      3.刪除其他配置文件

      find $ORACLE_BASE/* -name '*[Bb][Tt][Ss][Dd][Bb]2*' | grep -v admin| grep -v oradata11

      將查找結(jié)果出現(xiàn)的文件也一一刪除,當(dāng)然你可以用xarg結(jié)合rm刪除。

      我find結(jié)果如下:

      /u01/app/oracle/flash_recovery_area/testdb

      /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/testdb

      /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/testdb

      /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_host_testdb

      /u01/app/oracle/product/10.2.0/db_1/rdbms/log/alert_testdb.log

      /u01/app/oracle/product/10.2.0/db_1/host_testdb

      /u01/app/oracle/product/10.2.0/db_1/host_testdb/sysman/emd/state/A190EE260BF6B09EB580580728916A3B.alert_testdb.log

      /u01/app/oracle/product/10.2.0/db_1/host_testdb/sysman/log/nmctestdb1521

      /u01/app/oracle/product/10.2.0/db_1/dbs/alert_testdb.log

      /u01/app/oracle/product/10.2.0/db_1/dbs/lktestdb

      /u01/app/oracle/product/10.2.0/db_1/dbs/hc_testdb.dat

      /u01/app/oracle/product/10.2.0/db_1/dbs/orapwtestdb

      /u01/app/oracle/product/10.2.0/db_1/dbs/spfiletestdb.ora1234567891011121312345678910111213

      最重要的一步,如果你要重建的實(shí)例和剛刪除實(shí)例的實(shí)例名一樣的話,刪除 /etc/oratab 文件最后一段。

      至此,已干凈刪除Linux系統(tǒng)的Oracle實(shí)例!

      linux刪除mysql數(shù)據(jù)庫(kù)命令和方法

      a)查看系統(tǒng)中是否以rpm包安裝的mysql

      [plain] view plain copy[root@linux ~]# rpm -qa | grep -i mysql

      MySQL-server-5.1.49-1.glibc23

      MySQL-client-5.1.49-1.glibc23

      卸載MySQL-server-5.1.49-1.glibc23和MySQL-client-5.1.49-1.glibc23

      [plain] view plain copy[root@linux ~]# rpm -e MySQL-client-5.1.49-1.glibc23

      [root@linux ~]# rpm -e MySQL-server-5.1.49-1.glibc23

      b)查看有沒(méi)有mysql服務(wù)

      [plain] view plain copy[root@linux ~]# chkconfig --list | grep -i mysql

      mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off

      刪除mysql服務(wù)

      [plain] view plain copy[root@linux ~]# chkconfig --del mysql

      c)刪除分散mysql文件夾

      [plain] view plain copy[root@linux ~]# whereis mysql

      mysql: /usr/lib/mysql /usr/share/mysql

      分別刪除

      [plain] view plain copy[root@linux lib]# rm -rf /usr/lib/mysql/

      [root@linux lib]# rm -rf /usr/share/mysql

      通過(guò)以上幾步,mysql應(yīng)該已經(jīng)完全卸載干凈了

    3628412