If you have cloned an existing server as another server, even if ASM disks and all files are moved, then services like ohas css asm db will not open, you can reconfigure them with the following steps.
Let’s first clear the existing configuration:
With root:
1 |
<$GRID_HOME>/crs/install/rootcrs.pl -deconfig -force |
Reconfigure:
1 |
<$GRID_HOME>/root.sh |
If you see an output as follows after these operations, we will need to add some services for Oracle Restart.
1 2 3 4 5 6 7 8 |
crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.cssd ora.cssd.type OFFLINE OFFLINE ora.diskmon ora....on.type OFFLINE OFFLINE ora.evmd ora.evm.type ONLINE ONLINE oradb ora.ons ora.ons.type OFFLINE OFFLINE |
In addition, because the ora.cssd service does not start automatically, it needs to be set to start automatically.
With the following command, the target status for ora.cssd can do ONLINE.
With the Grid user (or after installing the grid variables)
1 |
crsctl modify resource ora.cssd -attr AUTO_START=always |
After
1 2 |
crsctl stop has crsctl start has |
We need to add new services for Oracle Restart:
With the Grid user (or after installing the grid variables):
To add an ASM source:
1 |
srvctl add asm -p +DATA/asm/asmparameterfile/registry.253.892568385 -d '/dev/sd*' |
The “-p” parameter specifies the spfile for asm instance and the disk string parameter for -d.
All disk groups will be mounted automatically if the authorizations of the disks in the directory specified by the disk string are correct and the header information of the disks is correct.
To add a Listener resource:
1 |
srvctl add listener -p 1521 -o $ORACLE_HOME |
The “-p” parameter specifies the port -o with grid_home.
Setting the added services to start automatically:
1 2 |
crsctl modify resource ora.LISTENER.lsnr -attr AUTO_START=always crsctl modify resource ora.asm -attr AUTO_START=always |
With the Oracle user (or after loading the database variables):
1 |
srvctl add database -d ORCL -o $ORACLE_HOME -a "DATA,FRA" |
1 2 3 4 5 |
-d -> db_name -o -o -> db_home -a -> dependent disk groups |
The database will not open without mount disk groups.
Changing the local listener of the database. (You may not always need it)
1 |
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.10)(PORT=1521))' scope=both; |
Final Status:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.DATA.dg ora....up.type ONLINE ONLINE oradb ora.FRA.dg ora....up.type ONLINE ONLINE oradb ora....ER.lsnr ora....er.type ONLINE ONLINE oradb ora.asm ora.asm.type ONLINE ONLINE oradb ora.cssd ora.cssd.type ONLINE ONLINE oradb ora.diskmon ora....on.type OFFLINE OFFLINE ora.evmd ora.evm.type ONLINE ONLINE oradb ora.hope.db ora....se.type ONLINE ONLINE oradb ora.ons ora.ons.type OFFLINE OFFLINE |