ASM之建立ASM例項
ASM之建立ASM例項
(下面基於VMware + RHEL 5.4 + Oracle 10g R2演示)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1.安裝ASM包 使用ASM例項,需要到Oracle官方網站下載所需的ASM包。
下載路徑:ASMLib下載 注意下載支援該核心的包,分為兩部分,一是Library and Tools,二是Drivers for kernel
如本人的Linux的核心為:
[root@oradb ~]# uname -rm 2.6.18-164.el5 i686
則下載對應的包為:
Library and Tools oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.3-1.el5.i386.rpm
Drivers for kernel 2.6.18-164.el5 oracleasm-2.6.18-164.el5xen-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5debug-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5PAE-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
使用下面類似的方式來安裝這些包,關於RPM 的使用請參考:RPM 使用簡介
[root@oradb asm]# rpm -Uvh oracleasm-support-2.1.3-1.el5.i386.rpm
驗證安裝的包
[root@oradb asm]#
rpm -qa | grep asm oracleasm-support-2.1.3-1.el5
rpm -qa | grep oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5
rpm -qa | grep oracleasm-2.6.18-164.el5-2.0.5-1.el5
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2.啟用css服務(Cluster Synchronization Services )
用於同步ASM例項與RDBMS例項 使用root帳戶進行配置,配置程式位於$ORACLE_HOME/bin
[root@oradb ~]# /u01/oracle/10g/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. oradb CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3.建立ASM引數檔案(使用VI或VIM)
[oracle@oradb dbs]$ cat /u01/oracle/10g/dbs/init+ASM.ora
*.asm_diskstring='' #為空表示可以搜尋任意的ASM磁碟
*.background_dump_dest='/u01/oracle/admin/+ASM/bdump' #後臺程式存放位置
*.core_dump_dest='/u01/oracle/admin/+ASM/cdump' #核心程式存放位置
*.user_dump_dest='/u01/oracle/admin/+ASM/udump' #使用者程式存放位置
*.instance_type='ASM' #例項型別,普通例項預設則為RDBMS *.instance_name='+ASM' #例項名字
*.large_pool_size=12M #為例項分配large_pool的大小
*.remote_login_passwordfile='SHARED' #登陸認證方式
*.asm_power_limit=1 #控制均衡操作的資源,預設為
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4.建立ASM後臺程式目錄,
參照引數檔案中的配置來建立
[oracle@oradb ~]$ echo $ORACLE_BASE /u01/oracle/10g
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/bdump
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/udump
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/cdump
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5.建立密碼檔案及spfile引數檔案
[oracle@oradb ~]$ orapwd file=$ORACLE_HOME/dbs/orapw+ASM password=redhat entries=8
[oracle@oradb ~]$ export ORACLE_SID=+ASM
SQL> conn / as sysdba Connected to an idle instance.
SQL> startup ASM instance started
ORA-15110: no diskgroups mounted
SQL> create spfile from pfile;
SQL> select * from v$asm_diskgroup;
no rows selected
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7.建立ASM磁碟及配置ASMlib驅動
在Vmware分配幾個空閒的磁碟用於建立ASM磁碟,建議使用不同的磁碟控制器
下面使用個磁碟來組建ASM磁碟組,分別為sdd,sde,sdf,sdg 分別對個磁碟進行分割槽,列出sdd的分割槽樣例,其餘如法炮製
[root@oradb ~]# fdisk /dev/sdd
Command (m for help): n
Command action e
extended p
primary partition (1-4) p
Partition number (1-4): 1
First cylinder (1-261, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261 Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8.建立ASM資料庫 使用dbca工具根據提示來建立使用ASM儲存的資料庫
建立使用ASM儲存的資料庫完畢之後,對於ASM資料庫啟動應首先保證ASM例項先被啟動,因為RDBMS是ASM例項服務的一個客戶端
接下來再來啟動RDBMS
--首先啟動asm例項
export ORACLE_SID=+ASM sqlplus / as sysdba startup exit --接下來啟動rdbms資料庫
export ORACLE_SID=orcl
sqlplus / as sysdba startup
(下面基於VMware + RHEL 5.4 + Oracle 10g R2演示)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1.安裝ASM包 使用ASM例項,需要到Oracle官方網站下載所需的ASM包。
下載路徑:ASMLib下載 注意下載支援該核心的包,分為兩部分,一是Library and Tools,二是Drivers for kernel
如本人的Linux的核心為:
[root@oradb ~]# uname -rm 2.6.18-164.el5 i686
則下載對應的包為:
Library and Tools oracleasmlib-2.0.4-1.el5.x86_64.rpm
oracleasm-support-2.1.3-1.el5.i386.rpm
Drivers for kernel 2.6.18-164.el5 oracleasm-2.6.18-164.el5xen-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5debug-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5PAE-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
使用下面類似的方式來安裝這些包,關於RPM 的使用請參考:RPM 使用簡介
[root@oradb asm]# rpm -Uvh oracleasm-support-2.1.3-1.el5.i386.rpm
驗證安裝的包
[root@oradb asm]#
rpm -qa | grep asm oracleasm-support-2.1.3-1.el5
rpm -qa | grep oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5
rpm -qa | grep oracleasm-2.6.18-164.el5-2.0.5-1.el5
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2.啟用css服務(Cluster Synchronization Services )
用於同步ASM例項與RDBMS例項 使用root帳戶進行配置,配置程式位於$ORACLE_HOME/bin
[root@oradb ~]# /u01/oracle/10g/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. oradb CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3.建立ASM引數檔案(使用VI或VIM)
[oracle@oradb dbs]$ cat /u01/oracle/10g/dbs/init+ASM.ora
*.asm_diskstring='' #為空表示可以搜尋任意的ASM磁碟
*.background_dump_dest='/u01/oracle/admin/+ASM/bdump' #後臺程式存放位置
*.core_dump_dest='/u01/oracle/admin/+ASM/cdump' #核心程式存放位置
*.user_dump_dest='/u01/oracle/admin/+ASM/udump' #使用者程式存放位置
*.instance_type='ASM' #例項型別,普通例項預設則為RDBMS *.instance_name='+ASM' #例項名字
*.large_pool_size=12M #為例項分配large_pool的大小
*.remote_login_passwordfile='SHARED' #登陸認證方式
*.asm_power_limit=1 #控制均衡操作的資源,預設為
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4.建立ASM後臺程式目錄,
參照引數檔案中的配置來建立
[oracle@oradb ~]$ echo $ORACLE_BASE /u01/oracle/10g
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/bdump
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/udump
[oracle@oradb ~]$ mkdir -p $ORACLE_BASE/admin/+ASM/cdump
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5.建立密碼檔案及spfile引數檔案
[oracle@oradb ~]$ orapwd file=$ORACLE_HOME/dbs/orapw+ASM password=redhat entries=8
[oracle@oradb ~]$ export ORACLE_SID=+ASM
SQL> conn / as sysdba Connected to an idle instance.
SQL> startup ASM instance started
ORA-15110: no diskgroups mounted
SQL> create spfile from pfile;
SQL> select * from v$asm_diskgroup;
no rows selected
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7.建立ASM磁碟及配置ASMlib驅動
在Vmware分配幾個空閒的磁碟用於建立ASM磁碟,建議使用不同的磁碟控制器
下面使用個磁碟來組建ASM磁碟組,分別為sdd,sde,sdf,sdg 分別對個磁碟進行分割槽,列出sdd的分割槽樣例,其餘如法炮製
[root@oradb ~]# fdisk /dev/sdd
Command (m for help): n
Command action e
extended p
primary partition (1-4) p
Partition number (1-4): 1
First cylinder (1-261, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261 Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8.建立ASM資料庫 使用dbca工具根據提示來建立使用ASM儲存的資料庫
建立使用ASM儲存的資料庫完畢之後,對於ASM資料庫啟動應首先保證ASM例項先被啟動,因為RDBMS是ASM例項服務的一個客戶端
接下來再來啟動RDBMS
--首先啟動asm例項
export ORACLE_SID=+ASM sqlplus / as sysdba startup exit --接下來啟動rdbms資料庫
export ORACLE_SID=orcl
sqlplus / as sysdba startup
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1356551/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM之建立ASM例項及ASM資料庫ASM資料庫
- ASM之建立ASM例項時的常見故障ASM
- 建立ASM例項及ASM資料庫ASM資料庫
- 【ASM學習】在windows 環境下建立ASM例項ASMWindows
- ASM之建立ASM磁碟ASM
- 使用普通檔案建立ASM例項ASM
- 建立ASM例項和資料庫ASM資料庫
- 管理 ASM 例項ASM
- 停止ASM例項ASM
- 【原創】使用普通檔案建立ASM例項ASM
- 單例項刪除ASM例項單例ASM
- 刪除ASM例項ASM
- 不用ASMLIB建立11gr2 ASM例項ASM
- Flex ASM自動重定位ASM例項測試FlexASM
- 給ASM例項增加diskgroupASM
- asm例項刪除方法ASM
- oracle 收集asm例項資訊OracleASM
- OCP課程27:管理Ⅰ之管理ASM例項ASM
- 【ASM】如何建立ASM磁碟ASM
- RAC+DG(asm單例項)ASM單例
- Oracle 11.2.0.3 管理ASM例項OracleASM
- 單例項的duplicate(non ASM)單例ASM
- 啟動ASM 例項報錯ASM
- Oracle 11.2.0.3管理ASM例項OracleASM
- ASM之磁碟建立及管理ASM
- redhat 6.5之oracle 11.2.0.4 asm例項異常抽取asm配置資訊之amdu初識之一RedhatOracleASM
- 使用RMAN將RAC+ASM複製到單例項+ASM上ASM單例
- 【Oracle】ASM例項安裝入門OracleASM
- ASM例項配置監聽和TNSASM
- 單機環境配置ASM例項ASM
- 單節點執行ASM例項ASM
- RAC asm恢復到單例項ASM單例
- Oracle 10g R2建立ASM例項Step By Step(一)Oracle 10gASM
- Oracle 10g R2建立ASM例項Step By Step(四)Oracle 10gASM
- 【Oracle ASM】關於asm例項與db例項中的磁碟狀態_詳細分析過程OracleASM
- 在不同機器之間使用rman複製資料庫例項,從非asm到asm資料庫ASM
- asm例項查詢asm相關檢視hang住解決方法ASM
- 【ASM學習】普通資料庫向ASM例項的遷移(二)ASM資料庫