视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
删除Linux非rac环境下的ASM实例
2020-11-09 12:09:04 责编:小采
文档


环境说明: 操作系统:CentOS 5 x86数据库:Oracle 10.2.0.1 非RAC环境ASM实例名:+ASM

环境说明:

操作系统:CentOS 5 x86
数据库:Oracle 10.2.0.1 非RAC环境
ASM实例名:+ASM

参考:metalink node:311350.1

1、检查ASM实例进程

@oracle[/home/oracle]> ps -ef|grep asm|grep -v grep
oracle 4263 1 0 Jan20 ? 00:00:02 asm_pmon_+ASM
oracle 4265 1 0 Jan20 ? 00:00:00 asm_psp0_+ASM
oracle 4267 1 0 Jan20 ? 00:00:00 asm_mman_+ASM
oracle 4269 1 0 Jan20 ? 00:00:00 asm_dbw0_+ASM
oracle 4271 1 0 Jan20 ? 00:00:00 asm_lgwr_+ASM
oracle 4273 1 0 Jan20 ? 00:00:00 asm_ckpt_+ASM
oracle 4275 1 0 Jan20 ? 00:00:00 asm_smon_+ASM
oracle 4277 1 0 Jan20 ? 00:00:00 asm_rbal_+ASM
oracle 4279 1 0 Jan20 ? 00:00:06 asm_gmon_+ASM

2、设置ASM实例名

@oracle[/home/oracle]> export ORACLE_SID=+ASM

3、检查是否有实例在使用ASM

@oracle[/home/oracle]> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 21 08:44:03 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

idle> select instance_name from v$asm_client;

no rows selected

如果有实例在使用ASM,,需要首先停止这些相关的实例,并备份相关的datafile、controlfile等

4、检查ASM实例上的diskgroup

idle> select name from v$asm_diskgroup;

NAME
------------------------------
DATA

5、删除检查到ASM实例上的diskgroup

idle> drop diskgroup data including contents;

Diskgroup dropped.

6、关闭ASM实例

idle> shutdown
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
idle> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

7、从css中删除ASM实例信息

@oracle[/home/oracle]> oradism -delete -asmsid +ASM

8、删除ASM实例相关的spfile、pfile等文件

@oracle[/home/oracle]> cd $ORACLE_HOME/dbs
@oracle[/oracle/app/10.1/dbs]> rm -f *+ASM*
@oracle[/oracle/app/10.1/dbs]> cd $ORACLE_BASE/admin
@oracle[/oracle/admin]> rm -rf +ASM

9、删除/etc/oratab文件中的ASM实例相关行

删除/etc/oratab文件中的如下行

其实删除oracle 实例同样要查出该文件的内容

+ASM:/oracle/app/10.1:Y

10、用root用户删除cssd服务

@root[/oracle/app/10.1/bin]> ./localconfig delete
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.

11、清除ASM使用的设备的文件头信息

@oracle[/home/oracle]> cd /dev/raw/
@oracle[/dev/raw]> ls -l *
crw------- 1 oracle oinstall 162, 1 Jan 21 08:45 raw1
crw------- 1 oracle oinstall 162, 2 Jan 21 08:45 raw2
crw------- 1 oracle oinstall 162, 3 Jan 21 08:45 raw3
@oracle[/dev/raw]> dd if=/dev/zero of=/dev/raw/raw1 bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 0.00396028 seconds, 2.6 MB/s
@oracle[/dev/raw]> dd if=/dev/zero of=/dev/raw/raw2 bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 0.00485093 seconds, 2.1 MB/s
@oracle[/dev/raw]> dd if=/dev/zero of=/dev/raw/raw3 bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 0.00532261 seconds, 1.9 MB/s

--end--

下载本文
显示全文
专题