


下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、單實(shí)例環(huán)境下安裝ASM說明:紫紅色字體部分是與我安裝環(huán)境相關(guān)的信息或補(bǔ)充的安裝說明,其他是網(wǎng)上下載的原文(<< 單實(shí)例環(huán)境下安裝ASM>>)環(huán)境:版本:操作系統(tǒng): Red Hat En terpriseLi nux Server release 5.5 (Tika nga)測試的環(huán)境是 Red Hat Enterprise Linux Server release 4.41、首先安裝oracle數(shù)據(jù)庫軟件,然后向虛擬機(jī)中添加三塊2G的硬盤,重啟虛擬機(jī)2、安裝軟件包:2. 1、查看好系統(tǒng)版本,本機(jī)是redhat 5,核版本如下:rootserver3 dev# un am
2、e -ai386 GNU/Li nuxrootfwy # cat /proc/vers ion2006或rootfwy a# un ame -r2.2、上oracle官方,搜索關(guān)鍵字oracle asm red hat 5。去下載如下asm的三個(gè) rpm軟件包(本機(jī)器下載的是標(biāo)紅的三個(gè)軟件包,安裝包一定要下載正確的版本 否則第五步會出錯(cuò),導(dǎo)致后續(xù)配置無法進(jìn)行):v.oracle./tech network/topics/li nu x/dow nloads/rhel5-084877.html>Intel IA32 (x86) ArchitectureLibrary and Tools?2
3、.3、安裝上述的三個(gè)rpm軟件包:rootserver3 asm# rpm -ivh *.rpmDSA sig nature: NOKEY, key ID 1e5e0159Preparing. #67%3:oracleasmlib # 100%3、對在1中添加進(jìn)來的三個(gè)磁盤進(jìn)行分區(qū)(我們添加了sdb、sdc和sdd。注意:這里是僅進(jìn)行分區(qū),而不需要進(jìn)行格式化。rootserver3 dev# ls sd*sda sda1 sda2 sdb sdc sddrootserver3 dev# fdisk /dev/sdbComma nd (m for help): nComma nd acti on
4、e exte ndedp primary partiti on (1-4)pPartition number (1-4):1First cyli nder (1-261, default 1):1Last cyli nder or +size or +sizeM or +sizeK (1-261, default 261):261Comma nd (m for help):wThe partiti on table has bee n altered!Calli ng ioctl() to re-read partiti on table.Syncing disks.同樣執(zhí)行如下的命令,來對s
5、dc和sdc進(jìn)行分區(qū):rootserver3 dev# fdisk /dev/sdcrootserver3 dev# fdisk /dev/sdd查看并確認(rèn)分區(qū)的情況:rootserver3 dev# fdisk -lDisk /dev/sda: 21.4 GB, bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice BootStartEndBlocksId System/dev/sda1 *11310439183 Linux/dev/sda2
6、14261020860402+ 8e Linux LVMDisk /dev/sdb: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start/dev/sdb11End Blocks Id System261 2096451 83 LinuxDisk /dev/sdc: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cy
7、lindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start/dev/sdc11End Blocks Id System261 2096451 83 LinuxDisk /dev/sdd: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot StartEnd Blocks Id System/dev/sdd126
8、1 2096451 83 Linux4、配置 ASM:rootserver3 asm# /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
9、have. The current values will be shown in brackets (''). Hitting <ENTER> 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 :oinstall Start Oracle ASM library driver on boot
10、 (y/n) y: Scan for Oracle ASM disks on boot (y/n) y: Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: OK Scanning the system for Oracle ASMLib disks: OK 5、系統(tǒng)添加磁盤: rootserver3 asm# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1 Marking disk "VOL1"
11、; as an ASM disk: OK rootserver3 asm# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1 Marking disk "VOL2" as an ASM disk: OK rootserver3 asm# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1 Marking disk "VOL3" as an ASM disk: OK 6 創(chuàng)建ASM初始化文件init+ASM.ora,在$ORACLE_HOME/目)錄下(可以理解為是
12、ASM實(shí)例的pfile文件):> *.asm_diskstring='ORCL:VOL*'> *.background_dump_dest='/opt/ora10g/admin/+ASM/bdump'> *.core_dump_dest='/opt/ora10g/admin/+ASM/cdump'> *.instance_type='asm'> *.large_pool_size=24M > *.remote_login_passwordfile='SHARED' > *.
13、user_dump_dest='/opt/ora10g/admin/+ASM/udump' > EOF注: 是本機(jī)器的 $ORACLE_HOME 路徑。7、創(chuàng)建結(jié)構(gòu)目錄oracleserver3 db_1$ mkdir -p /opt/ora10g/admi n/+ASM/udumporacleserver3 db_1$ mkdir -p /opt/ora10g/admi n/+ASM/bdumporacleserver3 db_1$ mkdir -p /opt/ora10g/admi n/+ASM/cdump8、創(chuàng)建asm實(shí)例的密碼文件:oraclelocalhost
14、dbs$ orapwd file=orapw+ASM password=minnow9、我們來測試一個(gè)asm實(shí)例能否啟動:oracleserver3 $ sqlplus- Productio n on Tue Aug 31 20:10:11 2010Copyright (c) 1982, 2005 <javascript:;> , Oracle. All rights reserved.En ter user- name:sys as sysdbaEn ter password:Conn ected to an idle in sta nee.SQL> startupORA-
15、29701: un able to conn ect to Cluster Man ager10、下面來添加CSS,以解決9中出現(xiàn)的問題。oraclelocalhost dbs$ localc onfig add提示需要以root來執(zhí)行命令:/etc/oracle does not exist. Creating it now.Successfully accumulated n ecessary OCR keys.Creati ng OCR keys for user 'root', privgrp 'root'.Operati on successful.C
16、onfiguration for local CSS has been initializedAddi ng to in ittabStartup will be queued to in it withi n 90 sec onds.Check ing the status of new Oracle in it process.Expect ing the CRS daem ons to be up with in 600 sec on ds.CSS is active on these no des.localhostCSS is active on all no des.mount d
17、iskgroup 正常:Oracle CSS service is in stalled and running un der in it(1M)11、我們再啟動以下ASM實(shí)例,由于我們沒有創(chuàng)建磁盤組,所以提示沒有rootserver3 # su - oracleoracleserver3 $ echo $ORACLE_SID+ASMoracleserver3 $ sqlplus- Production on Tue Aug 31 20:16:46 2010Copyright (c) 1982, 2005, Oracle. All rights reserved.En ter user- na
18、me: sys as sysdbaEn ter password:Conn ected to an idle in sta nee.SQL> startupASM in sta nee startedTotal System Global Area 96468992 bytesFixed Size1217908 bytesVariable Size70085260 bytesASM Cache25165824 bytesORA-15110: no diskgroups mounted 12、下面,可以執(zhí)行dbca,開始創(chuàng)建數(shù)據(jù)庫<javascript:;> 了:第一步的時(shí)候,
19、選擇新建數(shù)據(jù):Databnfv ConTiguration AuHtnnt. St*p 1 of 1? : Op»rktlon(Sfitetf tbfi £kpri|H>n IHa w« 蟲環(huán) W ptrtrfn Create a Dai abase廣 C onfl fare D at abaft? 0 ptforre廣 De! pf£ n。刪t 呂 te廣TempuiesCanfigiure ALoaidiiic 5lorag« Wan age men*Cancel » H«lp I4&屈第三步的時(shí)候,數(shù)據(jù)庫
20、實(shí)例的SID要和ASM中的asm_diskstring參數(shù)中的SID 致本例中是SID)第六步時(shí)。指定存儲項(xiàng)為 ASM :ih” sTorge "理(hsism 陽muici 'ike io unfl for wt J.irabjier Fne Sterni帕 Fit 5iiem 北rm対咻* AuioSiht Stongji WAnimtnd (ASM)uaiv-uUHFLBUJdHUM uum I m5 I !. MHU KMJAiflcjmarkSimoe Manwmen: ikfnptfief <JaiaMst fiorane aumdntjiraiion ar
21、a optltrUEtj1WJI4 fbr iJO performvw«. To UM ihis ofrtkwt vou mutt «hh«r沖輕Ty* j*t c-f U'5K5tc jt悶t電綁囑m ack roup pr pettfYin <Km5 asm q曲 jnfrupr RswDeutcciKaw uaniAi or volumes tai croue ihf required shared si ora-je for Re 白l 坤 RlKauon Ctu r s U門 dtkba絕t rr vou da n;f ihe Autfii
22、r jik 甕那和屯 Mifiaemtw /id 3 Clutstr h a Slsm h rt)t a.¥*alNijce fou ned ta ri-/e creld oa-e device for g* Paafii% (DOtFO川也 腫日 *eg filDU ire pfUroeg lain W aal>a$«匚簡CMHelp點(diǎn)擊Next的時(shí)候,提示需要關(guān)閉asm實(shí)例:第七步時(shí),點(diǎn)擊 Create New創(chuàng)建新的Disk Group :$瞅pik QraP冋弊也陽呷存酉 拿卸住血陽wtTM 口麻 GnjujiE闊埠cr tjnf pt m(jre ai5tc
23、 gojupf gu我<1 番 燈帖呻w 加廠站=口a*誦襯號“n qhoQe *ncttp idi?k QUMiUT sid dr出 曲iWin? f界 qtqugNflic Feo (M0) tpcecu r*e 陰 pa;( 嗣qt)>p ryrkifta mKrofm imo ircountfcrtsteNe#nriti D:sk,+ :-:Maw 坤Cancel Help給新的磁盤組取名為 DATA1,并把三塊硬盤都加入到改組,冗余項(xiàng)選擇normal:經(jīng)過上述操作后,一個(gè)磁盤組 DATA1已經(jīng)創(chuàng)建好,并且已經(jīng)加載上:指定數(shù)據(jù)文件創(chuàng)建的位置,默認(rèn)創(chuàng)建在DATA1磁盤組下:第
24、九步,指定Flash Recovery Area的位置和大小,按照默認(rèn)的即可:第十步,選擇安裝樣例數(shù)據(jù)庫:第十一步,字符集我們可以進(jìn)行如下的選擇:第十二步,查看數(shù)據(jù)庫存儲相關(guān)信息:第十三步,點(diǎn)擊 Finish 來結(jié)束配置過程,進(jìn)行數(shù)據(jù)庫的創(chuàng)建安裝過程中的截圖:安裝完成后的截圖:至此,單機(jī)上安裝 ASM 已經(jīng)完成。我們現(xiàn)在可以登陸asm實(shí)例,查看下一些相關(guān)的視圖:oracleserver3 $ echo $ORACLE_SID+ASMoracleserver3 $ sqlplusSQL*Plus: Release Production on Tue Aug 31 20:56:29 2010Cop
25、yright (c) 1982, 2005, Oracle. All rights reserved.Enter user-name: sys as sysdbaEn ter password:Conn ected to:- ProductionWith the Partiti oning, OLAP and Data <javascript:;> Mining opti onsSQL> SELECT GROUP_NUMBER,INSTANCE_NAME,DB_NAME,STATUS2 FROM v$asm_clie nt;GROUP_NUMBER INSTANCE_NAME
26、 DB_NAME STATUS1ORCLORCLCONNECTED查看ASM中的數(shù)據(jù)文件:SQL> set lin esize 500SQL> SELECT FILE_NUMBER,BLOCKS,BLOCK_SIZE/1024 BLOCK_KB,BYTES/1024/1024AS MB,SPACE/1024/1024 AS MB,TYPE FROM v$asm_file;FILE_NUMBERBLOCKSBLOCK_KBMBMB TYPE256614418 480.007813965 DATAFILE257307218 240.007813485 DATAFILE25844818
27、35.007812575 DATAFILE2596418 5.007812512 DATAFILE260431166.73437524 CONTROLFILE261431166.73437524 CONTROLFILE262102401.5 50.0004883115 ONLINELOG263102401.5 50.0004883115 ONLINELOG264102401.5 50.0004883115 ONLINELOG265102401.5 50.0004883115 ONLINELOG266102401.5 50.0004883115 ONLINELOGFILE_NUMBERBLOCK
28、SBLOCK_KBMBMB TYPE267102401.5 50.0004883115 ONLINELOG26825618 20.007812542 TEMPFILE269128018 100.007813205 DATAFILE2705.5 .0024414062 PARAMETERFILE登陸ORCL實(shí)例oracleserver3 $ export ORACLE_SID=ORCLoracleserver3 $ sqlplus- Production on Tue Aug 31 20:53:52 2010Copyright (c) 1982, 2005, Oracle. All rights
29、 reserved.En ter user- name: sys as sysdbaEn ter password:Conn ected to:- ProductionWith the Partitio ning, OLAP and Data Mi ning opti onsSQL> select in sta nce_n ame from v$in sta nee;INSTANCE_NAMEORCL查看表空間及其所對應(yīng)的文件名。發(fā)現(xiàn)具體的路徑不詳,由ASM自動給我們的文件命名進(jìn)行 管理 <javascript:;> :SQL> select FILE_NAME ,TA
30、BLESPACE_NAME from dba_data_files;FILE_NAMETABLESPACE_NAME+DATA1/orcl/datafile/users.259.728512919USERS+DATA1/orcl/datafile/sysaux.257.728512919SYSAUX+DATA1/orcl/datafile/u ndotbs1.258.728512919UNDOTBS1+DATA1/orcl/datafile/system.256.728512919SYSTEM+DATA1/orcl/datafile/example.269.728513077EXAMPLE用命
31、令行添加新硬盤:1、以root命令來運(yùn)行oracleasm命令rootserver3 dev# /etc/i nit.d/oracleasm createdisk VOL4 /dev/sde1Marking disk "VOL4" as an ASM disk: OK 2、登陸至ASM實(shí)例中,輸入如下命令,需要有 add failgroup子句:SQL> alter diskgroup DATA1 add failgroup VOL4 disk 'ORCL:VOL4'可以看到,添加好了 VOL4 之后,會進(jìn)行 "重平衡 " ,每個(gè)磁盤的使用容量是相同的: SQL> SELECT GROUP_NUMBER,DISK_NUMBER,NAME,TOTAL_MB,FREE_MB2 FROM v$asm_disk;GROUP_NUMBER DISK_NUMBER NAME TOTAL_MB FREE_MB10VOL12047137711VOL22047137612VOL32047137613VOL420471377As
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 患者教育專員年度工作全覽
- 技術(shù)文員面試題及答案
- 電工理論面試題及答案
- 培訓(xùn)店長考試題及答案
- hrbp面試題及答案
- 東陽公司面試題及答案
- 肺動脈高壓患者護(hù)理查房
- 智能制造產(chǎn)業(yè)孵化基地建設(shè)與區(qū)域產(chǎn)業(yè)創(chuàng)新生態(tài)構(gòu)建策略研究報(bào)告
- 流程與流程管理
- 對企業(yè)環(huán)境行政處罰培訓(xùn)
- 《水利工程造價(jià)與招投標(biāo)》課件-模塊六 招投標(biāo)程序
- 關(guān)于水表考試題及答案
- 落實(shí)責(zé)任制整體護(hù)理總結(jié)
- 短文選詞填空12篇(新疆中考真題+中考模擬)(解析版)
- 植物化學(xué)保護(hù)學(xué)知到課后答案智慧樹章節(jié)測試答案2025年春華南農(nóng)業(yè)大學(xué)
- 新能源發(fā)展與環(huán)境保護(hù)試題及答案
- 網(wǎng)絡(luò)安全威脅情報(bào)共享-深度研究
- 項(xiàng)目三公示語翻譯
- 業(yè)主不讓維修通知函
- 藥店醫(yī)保知識培訓(xùn)課件
- 《中暑的預(yù)防與急救》課件
評論
0/150
提交評論