官方文档相关内容如下
To enable simultaneous access to a disk device from multiple nodes, you must set the appropriate Object Data Manager (ODM) attribute, depending on the type of reserve attribute used by your disks. The following section describes how to perform this task using hdisk logical names. Refer to your operating system documentation to find logical device names.
To determine the reserve setting your disks use, enter the following command, where n is the hdisk device number:
# lsattr -E -l hdiskn | grep reserve_
The response is either a reserve_lock setting, or a reserve_policy setting. If the attribute is reserve_lock, then ensure that the setting is reserve_lock = no. If the attribute is reserve_policy, then ensure that the setting is reserve_policy = no_reserve.
If necessary, change the setting with the chdev command using the following syntax, where n is the hdisk device number:
chdev -l hdiskn -a [ reserve_lock=no | reserve_policy=no_reserve ]
For example, to change a setting for the device hdisk4 from reserve_lock=yes to reserve_lock=no, enter the following command:
# chdev -l hdisk4 -a reserve_lock=no
To verify that the setting is correct on all disk devices, enter the following command:
# lsattr -El hdiskn | grep reserve
以下是我的安装文档,有些地方不太完善。--oracle软件已经正确安装,具体安装步骤参考oracle安装文档:
--根据硬件配置对磁盘分区
fdisk /dev/sdb
--格式分区
mke2fs -j /dev/sdb1
mke2fs -j /dev/sdb2
mke2fs -j /dev/sdb3
mke2fs -j /dev/sdb5
--配置ocssd
以root用户运行$ORACLE_HOME/bin/localconfig
--安装oracleasm lib程序(程序可以从oracle网站上下载)
rpm -Uvh oracleasm-support-2.1.2-1.el4.i386.rpm
rpm -Uvh oracleasmlib-2.0.2-1.i386.rpm
rpm -Uvh oracleasm-2.6.9-42.EL-2.0.3-1.i686.rpm
rpm -Uvh oracleasm-2.6.9-42.ELhugemem-2.0.3-1.i686.rpm
rpm -Uvh oracleasm-2.6.9-42.ELsmp-2.0.3-1.i686.rpm
--创建asm磁盘
/etc/init.d/oracleasm createdisk DG_SYSTEM01 /dev/sdb1
/etc/init.d/oracleasm createdisk DG_LOG01 /dev/sdb2
/etc/init.d/oracleasm createdisk DG_DATA01 /dev/sdb3
/etc/init.d/oracleasm createdisk DG_CTL /dev/sdb5
--查看oracle asm磁盘创建情况
ls /dev/oracleasm/disks
--创建相应目录
mkdir $ORACLE_BASE/admin/+ASM/bdump
mkdir $ORACLE_BASE/admin/+ASM/cdump
mkdir $ORACLE_BASE/admin/+ASM/pfile
mkdir $ORACLE_BASE/admin/+ASM/udump
--编写init+ASM.ora文件保存在$ORACLE_HOME/dbs目录
*.background_dump_dest='/oracle/app/admin/+ASM/bdump'
*.core_dump_dest='/oracle/app/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/oracle/app/admin/+ASM/udump'
*.asm_diskstring='/dev/oracleasm/disks/*'
--以ORACLE用户登录主机,设置环境变量
export ORACLE_HOME="/oracle/app/oracle/product/10.2.0/db_1"
export ORACLE_BASE="/oracle/app"
export ORACLE_SID=+ASM
--以sys as sysdba登录启动ASM实例
17:00:46 idle>startup
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
--创建SPFILE
create spfile from pfile
--重启数据库
shutdown immediate
startup
--创建diskgroup
create diskgroup dg_system01 external redundancy disk '/dev/oracleasm/disks/DG_SYSTEM01'
create diskgroup dg_log01 external redundancy disk '/dev/oracleasm/disks/DG_LOG01'
create diskgroup dg_data01 external redundancy disk '/dev/oracleasm/disks/DG_DATA01'
create diskgroup dg_ctl external redundancy disk '/dev/oracleasm/disks/DG_CTL'
--查看asm_diskgroups
17:03:23 idle>show parameter asm
NAME TYPE VALUE
------------------------------ ---------------------- ------------------------------
asm_diskgroups string DG_SYSTEM01, DG_DATA01, DG_LOG
01, DG_CTL
asm_diskstring string /dev/oracleasm/disks/*
asm_power_limitinteger1
--重启数据库
shutdown immediate
startup
--创建目录(可以用SQL命令创建,也可用asmcmd命令处理)
--asm10g为即将新建数据库的SID
alter diskgroup dg_system01 add directory '+dg_system01/asm10g'
alter diskgroup dg_system01 add directory '+dg_system01/asm10g/oradata'
alter diskgroup dg_data01 add directory '+dg_data01/asm10g'
alter diskgroup dg_data01 add directory '+dg_data01/asm10g/oradata'
alter diskgroup dg_log01 add directory '+dg_log01/asm10g'
alter diskgroup dg_log01 add directory '+dg_log01/asm10g/online'
alter diskgroup dg_ctl add directory '+dg_ctl/asm10g'
alter diskgroup dg_ctl add directory '+dg_ctl/asm10g/control'
--新建asm10g的初始参数文件保存为:$ORACLE_HOME/dbs/initasm10g.ora
#cache and I/O
###########################################
db_block_size=8192
db_file_multiblock_read_count=16
###########################################
# Cursors and Library Cache
###########################################
open_cursors=100
###########################################
# Database Identification
###########################################
db_domain=world
db_name=asm10g
###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/oracle/app/admin/asm10g/bdump
core_dump_dest=/oracle/app/admin/asm10g/cdump
user_dump_dest=/oracle/app/admin/asm10g/udump
###########################################
# File Configuration
###########################################
control_files=("+DG_CTL/asm10g/controlfile/control01.ctl", "+DG_CTL/asm10g/controlfile/control02.ctl", "+DG_CTL/asm10g/controlfile/control03.ctl")
db_recovery_file_dest=/u01/asm10g/flash_recovery_area
db_recovery_file_dest_size=268435456
###########################################
# Job Queues
###########################################
job_queue_processes=10
###########################################
# Miscellaneous
###########################################
compatible=10.2.0.1.0
###########################################
# NLS
###########################################
nls_language="SIMPLIFIED CHINESE"
nls_territory="CHINA"
###########################################
# Processes and Sessions
###########################################
processes=100
sessions=115
###########################################
# SGA Memory
###########################################
sga_target=523239424
###########################################
# Security and Auditing
###########################################
audit_file_dest=/oracle/app/admin/asm10g/adump
remote_login_passwordfile=EXCLUSIVE
###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=174063616
###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_management=AUTO
undo_tablespace=UNDOTBS1
--设置环境变量
export ORACLE_HOME="/oracle/app/oracle/product/10.2.0/db_1"
export ORACLE_BASE="/oracle/app"
export ORACLE_SID=asm10g
--启动SQL*Plus并以sys as sysdba登录
startup nomount
create spfile from pfile
shutdown immediate
startup nomount
--运行创建数据库脚本
CREATE DATABASE asm10g
USER SYS IDENTIFIED BY xssismine
USER SYSTEM IDENTIFIED BY xssismine
LOGFILE GROUP 1 ('+DG_LOG01/asm10g/online/redo01.log') SIZE 28m REUSE,
GROUP 2 ('+DG_LOG01/asm10g/online/redo02.log') SIZE 28M REUSE,
GROUP 3 ('+DG_LOG01/asm10g/online/redo03.log') SIZE 28M REUSE
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '+dg_system01/asm10g/oradata/system01.dbf' SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '+dg_system01/asm10g/oradata/sysaux01.dbf' SIZE 500M REUSE
DEFAULT TABLESPACE ttx datafile '+dg_data01/asm10g/oradata/ttx01.dbf' SIZE 500M REUSE
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '+dg_data01/asm10g/oradata/temp01.dbf'
SIZE 500M REUSE
UNDO TABLESPACE UNDOTBS1
DATAFILE '+dg_data01/asm10g/oradata/undotbs01.dbf'
SIZE 500M REUSE AUTOEXTEND on MAXSIZE UNLIMITED
--创建系统数据字黄
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
转载,仅供参考,祝你愉快,满意请采纳。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)