HAS Don’t Start After Reboot

Today we have bounced a unix machine, and when checking the CRS after starting we have seen that it has not raised.

Making the basics checks

root# crsctl check cluster
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.

And

root# crsctl check has
CRS-4639: Could not contact Oracle High Availability Services

Checking if it is enabled, and in this case this is the problem;

root# crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

Other wayt to check this is by look into the ohasdstr file;

root# find / -name ohasdstr
/var/opt/oracle/scls_scr/machine_name/root/ohasdstr
root@# cat /var/opt/oracle/scls_scr/machine_name/root/ohasdstr
disable

Now the problem is as easy to fix as to activate it

root# crsctl enable crs
CRS-4622: Oracle High Availability Services autostart is enabled.

Take this opportunity to indicate that in the same path there is another crsstart file, which is what enables the CRS.

HTH – Antonio NAVARRO

 

 

Advertisements

ORA-15260 Error Dropping Diskgroup

Today I was dropping an asm diskgroup, with the next command;

drop diskgroup CLOUD_DATA_DG;

When I got the next error;

ERROR at line 1:
ORA-15260: permission denied on ASM disk group

The problem here, really is very simple. It is because I have connected to the ASM instance as sysdba (whenever I connect to a database). And the solution is as simple as connecting as sysdba 😦

HTH – Antonio NAVARRO

How To move ASM Spfile To A Different Disk Group (Method 3/3)

In this method we use the spmove command, the main advantage is that it automatically updates the GPnP profile, and we also avoid having to erase the original SPFILE as it did with the spcopy.

### Get the curren spfile in use

ASMCMD> spget
+DATA/asm/asmparameterfile/registry.253.722601213

### Make a backup

ASMCMD> spbackup +DATA/asm/asmparameterfile/registry.253.722601213 /tmp/ASM_SPFILE.BCK

### Execute the spmove command

asmcmd spmove ‘+DATA/asm/asmparameterfile/registry.253.722601213’ ‘+DATA1/asm/spfileASM.ora’

### Check

asmcmd spget

It is a good idea, as in the previous cases, to bounce the entire CRS stack.

HTH – Antonio NAVARRO

How To move ASM Spfile To A Different Disk Group (Method 2/3)

In this method we use the spcopy command that will make a copy of the spfile, we need to update the XML file used by the GPnP profile, this step is important, because if we do not do it we will have a copy but it will not be used. Subsequently to be a copy you must manually delete the previous file.

### Where is the ASM spfile

asmcmd spget

###  show the diskgroups

asmcmd lsdg

### Copy spfile updating GPnP profile by using -u option

asmcmd spcopy -u +DATA/asm/asmparameterfile/registry.153.754750145 +DATA2/

### Check

crsctl stop has
crsctl start has
asmcmd spget

### Drop the older

asmcmd ls -l +DATA2
asmcmd rm +DATA/asm/asmparameterfile/registry.153.754750145

HTH – Antonio NAVARRO

 

How To move ASM Spfile To A Different Disk Group (Method 1/3)

The first time the CRS was installed the spfile was put in the Diskgroup by default, now we want to move it to another location. In this case we have to do a reorganization of several diskgroups and I need to move it to another location;

I’m going to show you three methods to do this task, in this we will use an auxiliary PFILE to then recreate the final SPFILE.

At the end of the process it is highly recommended to check the changes and to stop and start the CRS to verify that everything works correctly.

REMARK; It is very important GPnP profile be updated.

 
/exp/grid $ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 5 11:53:13 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option

REM GET THE CURRENT LOCATION
SQL> host asmcmd spget
show  +XXXXXXXXXXXXXXXXXX/ASM/ASMPARAMETERFILE/registry.213.973473081
paramet
SQL> er spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +XXXXXXXXXXXXXXXXXX/ASM/ASMPAR
                                                 AMETERFILE/registry.213.973473
                                                 081

REM
REM Create a pfile auxiliar
REM                                                 
SQL> host pwd
/export/home/grid

SQL> create pfile='/exp/grid/spfile.bck' from spfile;

File created.

SQL> create spfile='+OCRVTD_DG/' from  pfile='/exp/grid/spfile.bck' ;

File created.

REM
REM Check the change, spfile don't change until bounce
REM 
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +XXXXXXXXXXXXXXXXXX/ASM/ASMPAR
                                                 AMETERFILE/registry.213.973473
                                                 081
SQL> host asmcmd spget
+OCRVTD_DG/ASM/ASMPARAMETERFILE/registry.213.1012823707

SQL>
SQL> exit

HTH – Antonio NAVARRO

How To Move AMS’ Pwfile To Another Location

On some occasion it may be necessary to move an ASM password file to another location. In this example we see how to do it in one of a diskgroup to another;

#1 Get location the password file

asmcmd pwget –-asm

#2 Move to another location, if the previous step returned +CLOUD_DAT_DG/orapwasm and the future location is +OCRVTDP_DG/asm

asmcmd pwmove –asm +CLOUD_DAT_DG/orapwasm +OCRVTDP_DG/asm

# if fail, try with force option

asmcmd pwmove –asm -f +CLOUD_DAT_DG/orapwasm +OCRVTDP_DG/asm

#3 Check

asmcmd pwget –-asm

HTH – Antonio NAVARRO

Force Log Switch In All Instances

Today I was working with a co-worker when I saw that to make a change of redo towards the super-known command;

alter system switch logfile;

On this indicate that it is completely correct, forces a change of redolog, but clarify that in case of being in a RAC, it only does it in the node from where the command is executed. To do it in all the instances it is better to use the following command;

alter system archive log current;

This will make the logs switch on all nodes. In agreement you can always use the first option executing the node by node.

HTH – Antonio NAVARRO