Oracle11g 单机ASM,虚拟机克隆机器后,IP和主机名发生改变的处理过程

参考:

How to Reconfigure Oracle Restart (文档 ID 986740.1)

1.Remove Oracle Restart configuration

This step should be performed as privileged (root) user.

# $GRID_HOME/crs/install/roothas.pl -deconfig -force  

The expected result is "Successfully deconfigured Oracle Restart stack".

2.Reconfigure Oracle Restart

This step should also be performed as privileged (root) user.

# $GRID_HOME/crs/install/roothas.pl  

The expected result is "Successfully configured Oracle Grid Infrastructure for a Standalone Server"

3.Add ASM back to Oracle Restart configuration

This step should be performed as Grid Infrastructure owner (grid user).

$ srvctl add asm  

The expected result is no output, just a return to the operating system prompt.

4.Start up ASM instance

This step should be performed as Grid Infrastructure owner (grid user).

$ srvctl start asm

That should start ASM. Note that at this time there will be no ASM initialization or server parameter file.

5.Recreate ASM server parameter file (SPFILE)

This step should be performed as Grid Infrastructure owner (grid user).
Create a temporary initialization parameter file (e.g. /tmp/init+ASM.ora) with the following content (specify your own disk group names):

这里可以从源来的机器里拷贝一个参数文件过来,或者参考源库的参数,自己写一个

[root@dgasm1 ~]# su - grid
[grid@dgasm1 ~]$ cd $ORACLE_HOME/dbs
[grid@dgasm1 dbs]$ vi init+ASM.ora

## 就用原来的文件就可以了
+ASM.__large_pool_size=16777216
+ASM.__oracle_base='/oracle/app/grid'#ORACLE_BASE set from in memory value
+ASM.asm_diskgroups='DG2_SYSTEM','DG3_ARCH','DG4_DATA01'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

6. Restart HAS stack

crsctl stop has
crsctl start has  

7.Add components back to Oracle Restart Configuration

7.1 Add database component

This step should be performed as RDBMS owner (oracle user).

如果克隆后机器,DBCA删除原来的数据库了,这里就不用添加原来的数据库了

srvctl add database -d -o

7.2. Add listener component

This step should be performed as Grid Infrastructure owner (grid user).

srvctl add listener

7.3. Add other components

For information on how to add back additional components, please review:
Oracle Database Administrator's Guide 11g Release 2 (11.2)
Chapter 4 Configuring Automatic Restart of an Oracle Database
Section Configuring Oracle Restart

其他

How to change Hostname / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) (文档 ID 1552810.1)

posted on 2023-07-24 10:05  小yq  阅读(71)  评论(0编辑  收藏  举报

导航