Changing Oracle Binaries in Oracle Restart

logo_gps

Hello everyone!!

Today we would like to share with you a problem that we have encountered when registering a database in Oracle Restart.

We have installed an 11.2.0.4 database with role separation (user “oracle” for RDBMS Oracle and “oragrid” for Grid Infrastructure 12.1.0.2). In the installation of the user oragrid we put as a group asmdba instead of asmadmin. We ran the asmlib again and reconfigured to correct this error so that the disk group was asmadmin. So far no problem :-D.

When we created the database, we gave the oracle binary the following permissions:

-rwsr-s--x 1 oracle asmadmin 239520865 May 13 2016 /app/oracle/product/11.2.0.4/db_1/bin/oracle

he let us create the database without errors, but when registering the database in Oracle Restart we saw that the permissions were changed to:

-rwsr-s--x 1 oracle asmdba 239520865 May 13 2016 /app/oracle/product/11.2.0.4/db_1/bin/oracle

Because of this I would not boot the database because I could not access the disks.

At this point we saw that it was necessary to reinstall the Grid Infrastructure 12 software, or not?

Researching metalink we saw the note:

SRVCTL CHANGES THE GROUP OF ORACLE BINARY (Doc ID 1508027.1)

The note is a bit “strange” as it indicates that you have to make changes to a source in C and compile the executables again. As it was at least “curious” we decided to try it, the other alternative was reinstallation so we did not lose anything.

The document is not accurate because it indicated to use the command < GI_HOME>/crs/install/rootcrs.pl -unlock and for version 12 you have to use rootcrs.sh, but it helps a lot. The steps we took were as follows:

  1. As oragrid we stop Oracle Restart:

crsctl stop has

2. As root user

We load the variables of the user oragrid

We unlock the home of the grid infrastructure software to be able to make the changes:

3. We reconnect as oragrid and modify the source file that is in ./rdbms/lib

vi $ORACLE_HOME/rdbms/lib/config.c

4. The following two lines are changed to put asmadmin:

.Lasm_string: .string "asmadmin"
#define SS_ASM_GRP "asmadmin"

5. We recompile the binaries with the change made:

cd $ORACLE_HOME/rdbms/lib
rm config.o
make -f ins_rdbms.mk $ORACLE_HOME/rdbms/lib/config.o
relink all

6. As root user we run the following command to lock the directory again and boot Oracle Restart:

$ORACLE_HOME/crs/install/roothas.sh -patch

7. To check that from now on we will not have the same problem we run the following command:

setasmgidwrap o=/app/oracle/product/11.2.0.4/db_1/bin/oracle

It is the command that is launched underneath when databases are registered or changes are made to them in Restart.

8. Once this is done we see that the binary is already correct:

[oragrid@test1~]$ ls -ltr /app/oracle/product/11.2.0.4/db_1/bin/oracle
 -rwsr-s--x 1 oracle asmadmin 239520865 May 13 2016 /app/oracle/product/11.2.0.4/db_1/bin/oracle

Well, these are the steps we perform, we hope they will be useful if you encounter the same problem.

Greetings.

DBA Team.

Tags: No tags

Comments are closed.