说明:本文为Oracle RAC ASM-spfile迁移指导手册
注意:ASM-spfile是ASM实例的二进制参数文件,而不是Oracle RAC数据库实例的spfile,新手容易弄混
温馨提示:如果您发现本文哪里写的有问题或者有更好的写法请留言或私信我进行修改优化
【步骤简述】
--查看当前ASM-spfile位置
--复制当前ASM-spfile到本地磁盘作为临时中转文件
--移动临时中转文件到ASM中的新位置并重命名
【相关命令】
ASMCMD> spget
+OCR/main-cluster/asmparameterfile/registry.253.983810637 【迁移前的路径和名称】
ASMCMD> spcopy +OCR/main-cluster/asmparameterfile/registry.253.983810637 /home/grid/asmspfile
ASMCMD> spmove /home/grid/asmspfile +vote/asmspfile
ASMCMD> spget
+vote/asmspfile 【迁移后的路径和名称】
ASMCMD>
【从Oracle安装配置文件中查看ASM-spfile存储路径】
[grid]$ cd $ORACLE_HOME/gpnp/NODE_NAME/profiles/peer
[grid]$ pwd
/u01/app/11.2.0/grid/gpnp/main/profiles/peer
[grid]$ ll
-rw-r--r-- 1 grid oinstall 1830 Oct 14 09:38 pending.xml
-rw-r--r-- 1 grid oinstall 1872 Oct 14 09:01 profile.old
-rw-r--r-- 1 grid oinstall 1869 Aug 10 2018 profile_orig.xml
-rw-r--r-- 1 grid oinstall 1830 Oct 14 09:38 profile.xml
[grid]$ cat profile.xml
※ 下面是美化后的profile.xml文件内容
<?xml version="1.0" encoding="UTF-8"?>
<gpnp:GPnP-Profile Version="1.0" xmlns="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:gpnp="http://www.grid-pnp.org/2005/11/gpnp-profile" xmlns:orcl="http://www.oracle.com/gpnp/2005/11/gpnp-profile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd" ProfileSequence="8" ClusterUId="7ad723343a844fbcffbb40e93fe06fe1" ClusterName="main-cluster" PALocation="">
<gpnp:Network-Profile>
<gpnp:HostNetwork id="gen" HostName="*">
<gpnp:Network id="net1" IP="1.1.1.0" Adapter="eth0" Use="public"/>
<gpnp:Network id="net2" IP="2.2.2.0" Adapter="eth1" Use="cluster_interconnect"/>
</gpnp:HostNetwork>
</gpnp:Network-Profile>
<orcl:CSS-Profile id="css" DiscoveryString="+asm" LeaseDuration="400"/>
<orcl:ASM-Profile id="asm" DiscoveryString="" SPFile="+vote/asmspfile"/> 【指定了ASM-spfile位置】
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="gpnp orcl xsi"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>
ZU5jFbYYfegKkIzQQcmAgr9SEUY=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
fT6VPXaAirOoDdcRbtOFK9W33LaaJnY9XA8oNsbhWlo8OJui7pyTCWmDKEaGFcgUMhqEPDPBEasXrUlHRWp/jBbRShwN02+7QvD0XN/rj2joKV9FWp9OqMl45+2oOlU7kjL8Jn6EVfBoRxNIQZc9Z6CKuS2kNnRyvmgZP1VXAuc=</ds:SignatureValue>
</ds:Signature>
</gpnp:GPnP-Profile>
over