下面是更改的部分步骤,但是启动问题还是存在,求达人完整。
单实例的数据库修改SID比较简单,只需要修改pfile相关参数,就可以挂载数据库。 RAC环境其实一样,只不过除了修改pfile,还需要修改 OCR信息。
首先来看看RAC的状态:
[root@rac1 tmp]# /u01/app/crs/bin/crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE rac1
ora....l1.inst application ONLINE ONLINE rac1
ora....l2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
现在RAC状态一切正常,所有服务已经启动。下面来试下如何修改2台RAC机器的SID,分别修改为:orcl3, orcl4
1. 创建pfile,然后把orcl1--->orcl3 orcl2--->orcl4,并传输给另外一个节点,其他参数不任何变更
SQL> conn /as sysdba
Connected.
SQL> create pfile='/tmp/pfile' from spfile;
File created.
[oracle@rac1 companion]$ scp /tmp/pfile 192.168.18.9:/tmp
pfile 100% 1290 1.3KB/s 00:00
[oracle@rac1 companion]$ cat /tmp/pfile
orcl4.__db_cache_size=75497472
orcl3.__db_cache_size=58720256
orcl3.__java_pool_size=4194304
orcl4.__java_pool_size=4194304
orcl3.__large_pool_size=4194304
orcl4.__large_pool_size=4194304
orcl4.__shared_pool_size=79691776
orcl3.__shared_pool_size=96468992
orcl3.__streams_pool_size=0
orcl4.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
*.background_dump_dest='/u01/app/oracle/admin/orcl/bdump'
*.cluster_database_instances=2
*.cluster_database=true
*.compatible='10.2.0.1.0'
*.control_files='+DATA1/orcl/controlfile/current.260.696461787'
*.core_dump_dest='/u01/app/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_create_file_dest='+DATA1'
*.db_domain='oracle.com'
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
orcl4.instance_number=2
orcl3.instance_number=1