Linux下卸載oracle_RAC____JAVA

來源:互聯網
上載者:User

RAC 卸載 說明  

一.RAC 刪除資料庫

This section explains how to delete a RAC database with the DBCA. Thisprocess deletes a database and removes a database's initialization parameterfiles, instances, OFA structure, and Oracle network configuration. However,this process does not remove datafiles if you placed the files on raw devicesor on raw partitions.

To deletea database with the DBCA:

1.      Start the DBCA on oneof the nodes:

The DBCA Welcome pageappears.

2.      Select Oracle RealApplication Clusters and click Next.

After you click Next,the DBCA displays the Operationspage.

3.      Select Delete adatabase, click Next, and the DBCA displays the List of Cluster Databases page.

4.      If your user ID andpassword are not operating-system authenticated, then the List of ClusterDatabases page displays the user name and password fields. If these fieldsappear, then enter a user ID and password that has SYSDBA privileges.

5.      Select the databaseto delete and click Finish.

After you click Finish,the DBCA displays a dialog toconfirm the database and instances that the DBCA is going to delete.

6.      Click OK to begin thedeletion of the database and its associated files, services, and environmentsettings, or click Cancel to stop the operation.

When you click OK, the DBCA continues the operationand deletes all of the associated instances for this database. The DBCA alsoremoves the parameter files, password files, and oratab entries.

At this point, you have accomplished the following:

·         Deleted the selecteddatabase from the cluster

·         Deleted highavailability services that were assigned to the database

·         Deleted the OracleNet configuration for the database

·         Deleted the OFAdirectory structure from the cluster

·        Deleted the datafiles if the datafiles were not on raw devices

 

二. ASM 執行個體卸載

 

How to drop the ASM instance installed in a seperateOracle Home for both RAC and non-RAC installations.

 

Solution

 

The outline of the steps involved are :
a) Backup all theASM client database files stored on the diskgroups.
b) Dropping all the diskgroups.
c) Removing ASM resource from CRS (* RAC specific)
d) Removing ASM disk signature (In case of asmlib)
e) Remove the ASM pfile/spfile.
f) Removing ASM entry in the file oratab
g) Wipe out the disks header using dd

 

Following are the steps to be followed:
1) Log into the ASMinstance and do 'select * from v$asm_client;'

    

2) For each instance listed above, stop the respectivedatabases.

 

3) Backup all the datafiles, logfiles, controlfiles,archive logs, etc. that are currently using ASM storage, to tape or tofilesystem (using RMAN). This needs to be done for every database (ASM client)using ASM.

** NOTE: Please make sure you have the data secure beforecontinuing to the next step.

 

4) Find all the diskgroups: 'select * fromv$asm_diskgroup'


5) For each diskgroup listed above:

' drop diskgroup <name> includingcontents'

 

這裡要注意的,要先在一個節點上將diskgroupdismount後, 在另一個節點進行drop。不然會報:

     ORA-15073: diskgroup DATA is mounted byanother ASM instance

 

alter diskgroup <name>dismount;

 

6) Shutdown all(RAC nodes) ASM instances.

 

7) On RAC install verify that all asm instances arestopped

$ORA_CRS_HOME/bin/crst_stat |more <- look for ASM resources and make surethe target=offline

 

8) Forsingle instance install run the following script:

$ORACLE_HOME/bin/localconfig delete

* This cleans up theCSSD configuration.

 

9) Invoke OUI, and now de-install the ASM Oracle home.

 

10) ForRAC install, remove the asm related resource.

srvctl remove asm -n <nodename> <- Peform for all nodes of a RAC cluster

crs_stat |more <- make sure no asm resources exists

 

     如:srvctl remove asm –n rac1, 如果刪除不掉,就加上 –f 參數。

 

11) If using asmlib (on Linux only), then

a. oracleasm listdisks
b. oracleasm deletedisks (do this for every disk listed above)
c. oracleasm listdisks (to verify they have been deleted)
d. on other RAC nodes: oracleasm listdisks (to verify they have been deletedtoo)
e. On all nodes(RAC) :
As root run:
# /etc/init.d/oracleasm stop
# /etc/init.d/oracleasm disable

 

12) delete the ASM pfile or spfile

 

13) in the file /etc/oratab, remove the line relative tothe ASM instance

 

14) clean out the disks headers using the dd command:

for example: dd if=/dev/zeroof=/dev/<asm_disk_name> bs=1024k count=50

 

[root@rac2 ~]# dd if=/dev/zero of=/dev/sdd1 bs=1024kcount=1

1+0 records in

1+0 records out

1048576 bytes (1.0 MB) copied, 0.026078 seconds, 40.2MB/s

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.