RAC Modify SPFile Position [[email protected] ~]# su - oracle[[email protected] ~]$ sqlplus / as sysdbasql*plus: release 11.2.0.3.0 production on wed jan 8 22:36:39 2014copyright (c) 1982, 2011, Oracle. All rights reserved. connected to:oracle database 11g enterprise edition release 11.2.0.3.0 - 64bit productionwith the partitioning, real application clusters, automatic storage management, olap,data mining and real application Testing optionsSQL> select status from gv$instance; STATUS------------------------openopen sql> show parameter db_namename type value------------------------------------ ---------------------- ------------------------------db_name string        ORCL1. View the current database spfile location sql> show parameter spfile name type value------------------------------------ ----------- ------------------------------spfile string +orcldg/orcl/spfileorcl.ora2. Backup pfile[[email protected] ~]$ cd $ORACLE _home/dbs[[email protected] ~]$ more initorcl1.ora Spfile= ' +orcldg/orcl/spfileorcl.ora ' [[email protected] ~]$ cp initorcl1.ora Initorcl1.orabak3. Re-create in the specified path spfile[[email protected] ~]$ sqlplus / as sysdbasql> create pfile from spfile; Sql> create spfile= ' +orcl_fra ' from pfile;4. View the newly created SPFile location [[email protected] ~ ]$ su - grid [[email protected] ~]$ asmcmdasmcmd> lsdgstate type rebal sector block au total_mb free_mb Req_mir_free_MB Usable_file_MB Offline_disks Voting_files namemounted normal n 512 4096 1048576 6144 5218 2048 1585 0 y OCRDG/MOUNTED EXTERN N 512 4096 1048576 204800 204704 0 204704 0 N ORCLDG/MOUNTED extern n 512 4096 1048576 204800 204704 0 204704 0 n orcl_fra/asmcmd> cd orcl _fraasmcmd> lsorcl/asmcmd> cd orclasmcmd> lscontrolfile/parameterfile/ Control01.ctlcontrol02.ctlASMCmd> cd parameterfile/asmcmd> lsspfile.258.8363455355. Specifying a new SPFile alias asmcmd>mkalias + orcl_fra/orcl/parameterfile/spfile.258.836345535 +orcl_fra/orcl/ Spfileorcl.ora6. Modifying a new RAC database spfile location with Srvctl [[email protected] dbs]$ srvctl Modify database -d orcl -p +orcl_fra/orcl/spfileorcl.ora7. Deleting the original Spfile [[email protected] ~]$ sqlplus / as sysdbaSQL>alter diskgroup orcldg drop file ' +orcldg/orcl/spfileorcl.ora '; 8. Update initorcl1.ora initorcl2.ora in two nodes respectively Content for spfile= ' +orcl_fra/orcl/spfileorcl.ora ' 9. Restart the database [[email protected] ~] $srvctl stop Database -d orcl [[email protected] ~] $srvctl start database -d orcl 10. View the SPFile location on the two node sql> set line 3000sql> show parameter spfile name TYPE VALUE------------------------------------ ----------- ------------------------------spfile string +orcl_fra/orcl/spfileorcl.ora
This article is from the "O Record" blog, so be sure to keep this source http://evils798.blog.51cto.com/8983296/1420930