DBA Hub

📋Steps in this guide1/7

Steps for changing public hostname for a standalone grid infrastructure - DBACLASS DBACLASS

If you are planning to change the hostname and ipaddress of the standalone grid infrastructure ( oracle restart), then we need to do below deconfig and reconfig on the grid setup. 1. Stop the has $GRID_HOME/bin/crsctl stop has 2 . Run the deconfig tool ( from root user ) export GRID_HOME=/gridapp/app/oracle/product/12.1.0.2/grid $GRID_HOME/crs/install/roothas.pl -deconfig -force [root@dbhost-prod

oracle clusteringintermediate
by OracleDba
16 views
1

Overview

If you are planning to change the hostname and ipaddress of the standalone grid infrastructure ( oracle restart), then we need to do below deconfig and reconfig on the grid setup. 1. Stop the has $GRID_HOME/bin/crsctl stop has 2 . Run the deconfig tool ( from root user )
2

Section 2

export GRID_HOME=/gridapp/app/oracle/product/12.1.0.2/grid $GRID_HOME/crs/install/roothas.pl -deconfig -force 3. Run the reconfig script (from root user)

Code/Command (click line numbers to comment):

1
2
3
4
[root@dbhost-prod ~]# /gridapp/app/oracle/product/12.1.0.2/grid/crs/install/roothas.pl -deconfig -force

Using configuration parameter file: /gridapp/app/oracle/product/12.1.0.2/grid/crs/install/crsconfig_params
2019/10/09 13:19:13 CLSRSC-337: Successfully deconfigured Oracle Restart stack
3

Section 3

$GRID_HOME/root.sh 4. Login with grid owner and modify css properties ( grid or oracle) $ $GRID_HOME/bin/crsctl modify resource “ora.cssd” -init -attr “AUTO_START=1” -unsupported 5. Restart has

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[root@dbhost-prod grid]# /gridapp/app/oracle/product/12.1.0.2/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /gridapp/app/oracle/product/12.1.0.2/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /gridapp/app/oracle/product/12.1.0.2/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dbhost-prod successfully pinned.
2019/10/09 13:24:00 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'


dbhost-prod     2019/10/09 13:24:30     /gridapp/app/oracle/product/12.1.0.2/grid/cdata/dbhost-prod/backup_20191009_132430.olr     1721139106
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbhost-prod'
CRS-2673: Attempting to stop 'ora.evmd' on 'dbhost-prod'
CRS-2677: Stop of 'ora.evmd' on 'dbhost-prod' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbhost-prod' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2019/10/09 13:27:28 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
4

Section 4

6. Check the resource status: 7. Config the listener .

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$ $GRID_HOME/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Servic
es-managed resources on 'dbhost-prod'
CRS-2673: Attempting to stop 'ora.evmd' on 'dbhost-prod'
CRS-2677: Stop of 'ora.evmd' on 'dbhost-prod' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbhost-prod' has completed
CRS-4133: Oracle High Availability Services has been stopped.


$ $GRID_HOME/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.

cd $GRID_HOME/bin

$ ./crsctl check has
CRS-4638: Oracle High Availability Services is online

$ ./crsctl check css
CRS-4529: Cluster Synchronization Services is online

$ ./crsctl stat resource
NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on dbhost-prod

NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=OFFLINE
STATE=OFFLINE

NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on dbhost-prod

NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE

$ ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ons
               OFFLINE OFFLINE      dbhost-prod                STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       dbhost-prod                STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       dbhost-prod                STABLE
--------------------------------------------------------------------------------
$
5

Section 5

We are using 1521 default listener,so 8. Prepare and start asm instance: create the asm pfile as below:

Code/Command (click line numbers to comment):

1
2
3
srvctl add listener

srvctl start listener
6

Section 6

start the asm instance: Modify asm properties. 9. Restart the has one more time:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$ cat init+ASM.ora
+ASM1.__oracle_base='/gridapp/app/oracle'#ORACLE_BASE set from in memory value
*.asm_diskstring='/dev/oracleasm/disks/*'
*.asm_power_limit=16
*.large_pool_size=12M
*.instance_type='asm'

SQL> startup pfile=init+ASM.ora

SQL> select instance_name,status from gv$Instance;

INSTANCE_NAME STATUS
---------------- ------------
+ASM STARTED

SQL> select path from v$asm_disk;

PATH
--------------------------------------------------------------------------------
/dev/oracleasm/disks/MGMTD

SQL> create spfile from pfile;

File created.

$ srvctl modify asm  -p /gridapp/app/oracle/product/12.1.0.2/grid/dbs/spfile+ASM.ora
$ srvctl modify asm  -l LISTENER
$ srvctl config asm
ASM home: 
Password file:
ASM listener: LISTENER
Spfile: /gridapp/app/oracle/product/12.1.0.2/grid/dbs/spfile+ASM.ora
ASM diskgroup discovery string: /dev/oracleasm/disks/*
7

Section 7

Now our standalone grid infrastructure is back to normal.

Code/Command (click line numbers to comment):

1
2
3
$GRID_HOME/bin/crsctl stop has

$GRID_HOME/bin/crsctl start has

Comments (0)

Please to add comments

No comments yet. Be the first to comment!