ASM有自己的引數、密碼、alert、監聽檔案

lusklusklusk發表於2018-06-28
gi的引數檔案
/u01/app/11.2.0/grid/dbs/init.ora
但是裡面的東西不對,因為這個不是asm真正使用的pfile

gi的密碼檔案
/u01/app/11.2.0/grid/dbs/orapw+ASM

gi的alert檔案
/u01/app/grid/diag/asm/+asm/+ASM2/trace/


sqlplus / as sysasm
SQL> show parameter pfile
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/plmdb-cluster/asmparameterfile/registry.253.947607045

ASM的SPFIE不能直接cp出來
ASMCMD> cp +DATA/plmdb-cluster/asmparameterfile/registry.253.947607045 /home/grid/
ORA-19505: failed to identify file "+DATA/plmdb-cluster/asmparameterfile/registry.253.947607045"
ORA-17503: ksfdopn:2 Failed to open file +DATA/plmdb-cluster/asmparameterfile/registry.253.947607045
ORA-15308: could not access ASM SPFILE in RDBMS instance

sqlplus / as sysasm
SQL> create pfile='/home/grid/pfile' from spfile;
cat /home/grid/pfile
+ASM2.asm_diskgroups='ARCH'#Manual Mount
+ASM1.asm_diskgroups='ARCH'#Manual Mount
*.asm_diskstring='/dev/plm_db_*'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'




ASM也有自己的alert檔案
sqlplus / as sysasm
SQL> show parameter user_dump
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
user_dump_dest                       string      /u01/app/grid/diag/asm/+asm/+ASM2/trace





OCM考試的時候自己建立了ASM的listener、pfile、passwd檔案

oracle使用者關掉監聽
lsnrctl stop listener
lsnrctl stop lsnr2

grid配置監聽,使用oracle使用者下的監聽檔案
/u01/app/11.2.0/grid/bin/srvctl add listener -l listener -p 1521 -o /u01/app/oracle/product/11.2.0/dbhome_1
/u01/app/11.2.0/grid/bin/srvctl add listener -l lsnr2 -p 1526 -o /u01/app/oracle/product/11.2.0/dbhome_1
/u01/app/11.2.0/grid/bin/srvctl start listener -l listener
/u01/app/11.2.0/grid/bin/srvctl start listener -l lsnr2


grid使用者配置引數檔案
cd /u01/app/11.2.0/grid/dbs
vi init+ASM.ora
instance_type=ASM

grid使用者建立密碼檔案
orapwd file=orapw+ASM password=oracle


sqlplus / as sysasm
startup nomount

CREATE DISKGROUP dg01 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/DISK1';
create diskgroup fra normal redundancy disk 'ORCL:DISK1', 'ORCL:DISL2';
如果失敗,則alter system set asm_diskstring='/dev/oracleasm/disks/'否則下面asmcmd lsdsk --candidate顯示不出磁碟組
alter diskgroup fra mount;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2156967/,如需轉載,請註明出處,否則將追究法律責任。

相關文章