Friday, August 10, 2018

PRCD-1229 : An attempt to access configuration of database version 12.1 differs from version 12.2

1. First case

The customer had the GI version 12.1 and DB 12.1 before upgrade.
They upgraded the GI to version 12.2.
The only GI was upgraded. Database is still 12.1 (no changes were made to DB).

Old GI HOME: /u01/app/12.1.0.2/grid
New GI HOME: /u01/app/12.2.0.1/grid
DB HOME: /u01/app/oracle/product/12.1.0.2/dbhome_1


The upgrade finished successfully.
The ASM + CW + DB are up-and-running.

$ ps -ef|grep lgwr
oracle 18769 1 0 11:15 ? 00:00:00 asm_lgwr_+ASM1
oracle 20881 1 0 11:15 ? 00:00:00 mdb_lgwr_-MGMTDB
oracle 20943 1 0 11:15 ? 00:00:00 ora_lgwr_dbm051 

But the error appeared if to run GI srvctl against database:

$ /u01/app/12.2.0.1/grid/bin/srvctl stop db -d dbm05
PRCD-1229 : An attempt to access configuration of database dbm05 was rejected because its version 12.1.0.2.0 differs from the program version 12.2.0.1.0. Instead run the program from /u01/app/oracle/product/12.1.0.2/dbhome_1.


$ /u01/app/12.2.0.1/grid/bin/srvctl status db -d dbm05
PRCD-1229 : An attempt to access configuration of database dbm05 was rejected because its version 12.1.0.2.0 differs from the program version 12.2.0.1.0. Instead run the program from /u01/app/oracle/product/12.1.0.2/dbhome_1.

So, customer cannot start or stop the database or to look the database configuration.




Solution:

The documentation says:
"Only use the version of SRVCTL that is provided with Oracle Database 12c ...
The version of SRVCTL must be the same as the version of the object being managed"


This means:
  • To manage Clusterware entities use commands from Clusterware Home
  • To manipulate Database entities use commands from Database Home.

The command issued from DB Home work well:
$ cd $ORACLE_HOME/bin
$ ./srvctl status db -d dbm05


2. Second case

After manual upgrade of database TMC from 11.2.0.4 to 12.2.0.1
OLD_OH=/u02/oracle/oracle_base/TMC/11204
NEW_OH=/u02/oracle/oracle_base/TMC/12201

was obtained the error

$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl status db -d tmc_exa1
PRCD-1229 : An attempt to access configuration of database tmc_exa1 was rejected because its version 11.2.0.4.0 differs from the program version 12.2.0.1.0. Instead run the program from /u02/oracle/oracle_base/TMC/12201.


 Why ? I'm using the right database binaries!

Let's check:

[oracle@exa1dbadm01:TMC1 ~]$ cd /u02/oracle/oracle_base/TMC/11204
[oracle@exa1dbadm01:TMC1 11204]$ cd bin
[oracle@exa1dbadm01:TMC1 bin]$ ./srvctl config db -d tmc_exa1
Database unique name: TMC_EXA1
Database name:
Oracle home: /u02/oracle/oracle_base/TMC/11204  <<< Let change the wrong OH
Oracle user: oracle
Spfile: +DATAC1/TMC_EXA1/spfile.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: TMC_EXA1
Database instances: TMC1,TMC2
Disk Groups: DATAC1,RECOC1
Mount point paths:
Services: pi_tmcclone,tmc_clone
Type: RAC
Database is administrator managed



[oracle@exa1dbadm01:TMC1 bin]$ ./srvctl modify db -d tmc_exa1 -o /u02/oracle/oracle_base/TMC/12201

[oracle@exa1dbadm01:TMC1 bin]$ ./srvctl config db -d tmc_exa1
Database unique name: TMC_EXA1
Database name:
Oracle home: /u02/oracle/oracle_base/TMC/12201 <<< Now is OK
Oracle user: oracle
Spfile: +DATAC1/TMC_EXA1/spfile.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: TMC_EXA1
Database instances: TMC1,TMC2
Disk Groups: DATAC1,RECOC1
Mount point paths:
Services: pi_tmcclone,tmc_clone
Type: RAC
Database is administrator managed





But error still persist:

[oracle@exa1dbadm01:TMC1 bin]$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl status db -d tmc_exa1
PRCD-1229 : An attempt to access configuration of database tmc_exa1 was rejected because its version 11.2.0.4.0 differs from the program version 12.2.0.1.0. Instead run the program from /u02/oracle/oracle_base/TMC/12201.


Clusterware don't give the point to glue:
[root@exa1dbadm01 ~]# crsctl stat res ora.tmc_exa1.db -p|grep -i vers
TYPE_VERSION=3.3


SOLUTION:  use NEW_OH/srvctl upgrade command !


$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl UPGRADE database -d tmc_exa1 -oraclehome /u02/oracle/oracle_base/TMC/12201

$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl status db -d tmc_exa1
Instance TMC1 is not running on node exa1dbadm01
Instance TMC2 is not running on node exa1dbadm02


$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl start db -d tmc_exa1
PRCR-1079 : Failed to start resource ora.tmc_exa1.db
CRS-2501: Resource 'ora.tmc_exa1.db' is disabled


$ /u02/oracle/oracle_base/TMC/12201/bin/srvctl enable db -d tmc_exa1
$  /u02/oracle/oracle_base/TMC/12201/bin/srvctl start db -d tmc_exa1
$  /u02/oracle/oracle_base/TMC/12201/bin/srvctl status db -d tmc_exa1
Instance TMC1 is running on node exa1dbadm01
Instance TMC2 is running on node exa1dbadm02





No comments:

Post a Comment

ORA-01405: fetched column value is NULL after upgrade from 12.1 to 18c

SYMPTOMs: After upgrade 12.1.0.2 -> 18.6 we obtained at any SQL (select and DML) : ORA-00604: error occurred at recursive SQL level ...