构建oracle单机环境,单机搭建ASM环境

本文详细介绍了在CentOS系统上安装和配置Oracle ASM的过程,包括ASMlib的安装、ASM实例的启动、磁盘组的创建以及ASM的测试。通过创建磁盘组DATA和RECOVERY,并在ASM中创建表空间,最终验证了ASM的正确搭建。
摘要由CSDN通过智能技术生成

准备:

1.centos系统

2.Oracle database10G+instance

3.与系统匹配的ASMlib包

4.  3块磁盘

一、安装ASMlib,初始化ASMlib

创建asm能识别的disk。

/dev/sdb1 > VOL1

/dev/sdc1 > VOL2

/dev/sdd1 > VOL3

二、需要创建一份pfile(init+ASM.ora)如下

*.background_dump_dest='/u01/app/admin/+ASM/bdump'

*.core_dump_dest='/u01/app/admin/+ASM/cdump'

*.user_dump_dest='/u01/app/admin/+ASM/udump'

*.asm_diskstring='ORCL:VOL*'

*.instance_type='asm'

*.large_pool_size=12M

*.remote_login_passwordfile='exclusive'

三、启动ORALCE_HOME下面的css

$ORACLE_HOME/bin/localconfig add

/etc/oracle does not exist. Creating it now.

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

Configuration for local CSS has been initialized

Adding to inittab

Startup will be queued to init within 90 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

asmdemo

CSS is active on all nodes.

Oracle CSS service is installed and running under init(1M)

四、启动asm

export ORACLE_SID=+ASM

sqlplus / as sysdba

SQL> startup

ASM instance started

Total System Global Area  130023424 bytes

Fixed Size                  2019032 bytes

Variable Size             102838568 bytes

ASM Cache                  25165824 bytes

ORA-15110: no diskgroups mounted

五、创建磁盘组 DATA、RECOVERY

create diskgroup DATA external redundancy disk 'ORCL:VOL1','ORCL:VOL2';

create diskgroup RECOVERY external redundancy disk 'ORCL:VOL3';

六、创建spfile

create spfile from pfile;

Shutdown à startup

七、mount asm磁盘组

alter diskgroup DATA mount;

alter diskgroup RECOVERY mount;

SQL> select name,state from v$asm_diskgroup;

NAME                           STATE

------------------------------ -----------

DATA                           MOUNTED

RECOVERY                       MOUNTED

八、测试ASM。有可能需要 alter system register 在rdbms 中注册asm

Export ORACLE_SID=asmdemo

Sqlplus / as sysdba

Create tablespace test datafile ‘+DATA/test.dbf’ size 50m;

进入asm查看文件

Export ORACLE_SID=ASM

Asmcmd

Cd  data

Ls

有test.dbf文件就代表成功搭建。

drop tablespace test including contents and datafiles;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值