Oracle move spfile and passwordfile from filesystem to asm

記一下將 spfile & passwordfile 移到 asm 

PasswordFile

1. 複製 passwordfile 到 asm

ASMCMD> pwcopy /tmp/orapwtestdb1 +datadg/testdbstby/password/orapwdtestdb

2. 修改 OCR passwordfile 路徑

$ srvctl modify database -d testdbstby -pwfile '+DATADG/TESTDBSTBY/PASSWORD/orapwdtestdb';

 

 

spFile

1. move spfile to asm 

SQL> create pfile from spfile; 
SQL> create spfile='+DATADG' from pfile;

OR

ASMCMD> cp $ORACLE_HOME/dbs/spfiletestdb1.ora +DATADG/testdb/PARAMETERFILE/spfiletestdb.ora

2. modify OCR information

$ srvctl modify database -d testdb -p +DATADG/testdb/PARAMETERFILE/spfiletestdb1.ora

3. rename filesystem spfile

$ mv $ORACLE_HOME/dbs/spfiletestdb1.ora $ORACLE_HOME/dbs/spfiletestdb1.ora.bak

4. restart instance

$ srvctl stop database -d testdb
$ srvctl start database -d testdb

 

參考來源:

https://docs.oracle.com/database/121/OSTMG/GUID-6165EC00-C329-4140-A007-2FE18D6DEC51.htm

https://docs.oracle.com/database/121/OSTMG/GUID-70D58CAB-BFA4-4055-8768-7C12D61D9A39.htm#OSTMG95354

https://emarcel.com/moving-spfile-from-file-system-to-asm-oracle-rac11g/

張貼留言

0 留言