Oracle 10g 手工创建ASM数据库

php中文网
发布: 2016-06-07 17:26:03
原创
952人浏览过

Oracle 10g 手工创建数据库今天尝试除DBCA以外的另一种方法来创建数据库,先前做过oracle10g手工建库的实验;数据版本是10g 10.2

oracle10g 手工创建以asm存储的数据库
项目流程:
0,给电脑增加2块scsi硬盘
1,安装asm
2,创建两个asm磁盘组,分别为:group1、group2
3,  开始创建数据库,首先建立参数文件,,保存为 $oracle_home/dbs/initnestling.ora
4,建立密码文件$oracle_home/dbs/orapwdnestling
5,建立跟踪、日志文件的路径
6,启动数据库到nomount状态
7,创建并运行建库的脚本
8,创建erp表空间
9,创建数据字典视图
10,建立spfile
11,创建数据库用户
12,配置网络服务
13,扩展应用
a, 查看asm groups 组号、组名、总大小、空闲空间
b, 删除group2
c, 把orcl:disk2添加到group1中去
d, 查看负载信息
e, 重新负载均衡
 
步骤:
oracle 10g 手工创建数据库
今天尝试除dbca以外的另一种方法来创建数据库,先前做过oracle10g手工建库的实验;数据版本是10g 10.2.0.1.0 搭配了asm。
0,给电脑增加2块scsi硬盘
1,安装asm
[root@kk ~]# uname -rm
2.6.18-92.el5 i686
[root@kk ~]# cd 32bit/
[root@kk 32bit]# rpm -ivh oracleasm-support-2.1.3-1.el5.i386.rpm
warning: oracleasm-support-2.1.3-1.el5.i386.rpm: header v3 dsa signature: nokey, key id 1e5e0159
preparing...                ########################################### [100%]
  1:oracleasm-support      ########################################### [100%]
[root@kk 32bit]# rpm -ivh oracleasm-2.6.18-92.el5
[root@kk 32bit]# rpm -ivh oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-92.el5-2.0.5-1.el5.i686.rpm: header v3 dsa signature: nokey, key id 1e5e0159
preparing...                ########################################### [100%]
  1:oracleasm-2.6.18-92.el5########################################### [100%]
[root@kk 32bit]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: header v3 dsa signature: nokey, key id 1e5e0159
preparing...                ########################################### [100%]
  1:oracleasmlib          ########################################### [100%]
 
[root@kk 32bit]# vi /etc/selinux/config
# this file controls the state of selinux on the system.
# selinux= can take one of these three values:
#      enforcing - selinux security policy is enforced.
#      permissive - selinux prints warnings instead of enforcing.
#      disabled - selinux is fully disabled.
selinux=disabled
# selinuxtype= type of policy in use. possible values are:
#      targeted - only targeted network daemons are protected.
#      strict - full selinux protection.
selinuxtype=targeted
~
[root@kk 32bit]# setenforce 0
 
[root@kk 32bit]# /etc/init.d/oracleasm configure
configuring the oracle asm library driver.
 
this will configure the on-boot properties of the oracle asm library
driver.  the following questions will determine whether the driver is
loaded on boot and what permissions it will have.  the current values
will be shown in brackets ('[]').  hitting without typing an
answer will keep that current value.  ctrl-c will abort.
 
default user to own the driver interface []: oracle
default group to own the driver interface []: dba
start oracle asm library driver on boot (y/n) [n]: y
scan for oracle asm disks on boot (y/n) [y]: y
writing oracle asm library driver configuration: done
initializing the oracle asmlib driver:                    [  ok  ]
scanning the system for oracle asmlib disks:              [  ok  ]
[root@kk 32bit]# /etc/init.d/oracleasm enable
writing oracle asm library driver configuration: done
initializing the oracle asmlib driver:                    [  ok  ]
scanning the system for oracle asmlib disks:              [  ok  ]
[root@kk 32bit]# cd /opt/oracle/product/10.2.0/db_1/bin/
[root@kk 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.
        kk
css is active on all nodes.
oracle css service is installed and running under init(1m)
 
2,创建两个asm磁盘组,分别为:group1、group2
 
[root@kk bin]# fdisk -l
 
disk /dev/sda: 42.9 gb, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
 
  device boot      start        end      blocks  id  system
/dev/sda1  *          1          25      200781  83  linux
/dev/sda2              26        286    2096482+  82  linux swap / solaris
/dev/sda3            287        5221    39640387+  83  linux
 
disk /dev/sdb: 8589 mb, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
 
  device boot      start        end      blocks  id  system
/dev/sdb1              1        1044    8385898+  83  linux
 
disk /dev/sdc: 8589 mb, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
units = cylinders of 16065 * 512 = 8225280 bytes
 
  device boot      start        end      blocks  id  system
/dev/sdc1              1        1044    8385898+  83  linux
 
[root@kk bin]# /etc/init.d/oracleasm createdisk disk1 /dev/sdb1
marking disk "disk1" as an asm disk:                      [  ok  ]
[root@kk bin]# /etc/init.d/oracleasm createdisk disk2 /dev/sdc1
marking disk "disk2" as an asm disk:                      [  ok  ]
[root@kk bin]# /etc/init.d/oracleasm listdisk
usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@kk bin]# /etc/init.d/oracleasm listdisks 
disk1
disk2

linux

LuckyCola工具库
LuckyCola工具库

LuckyCola工具库是您工作学习的智能助手,提供一系列AI驱动的工具,旨在为您的生活带来便利与高效。

LuckyCola工具库 19
查看详情 LuckyCola工具库

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号