Feed aggregator

Oracle Grid 12c Release 2 (12.2) Certified with RAC 12.1 and EBS 12.2

Steven Chan - Tue, 2018-07-31 19:45

I'm pleased to announce Oracle Grid 12c Release 2 (12.2) is now certified when using Oracle 12c Release 12.1 Real Application Clusters (RAC) with Oracle E-Business Suite Release12.2.  When using Oracle RAC 12.1 with Oracle E-Business Suite 12.2, you now have the option to use either Oracle Grid 12c Release 12.2 or 12.1. 

Configuring Oracle Grid and shared storage is a mandatory requirement for deploying Oracle Real Application Clusters (RAC). Note that the Cluster Ready Services (CSR) ORACLE_HOME, other locations and commands may differ between the two Oracle Grid 12c Releases. 

References

Categories: APPS Blogs

Extended Histograms

Jonathan Lewis - Tue, 2018-07-31 17:05

Today’s little puzzle comes courtesy of the Oracle-L mailing list. A table has two columns (c2 and c3), which contain only the values ‘Y’ and ‘N’, with the following distribution:


select   c2, c3, count(*)
from     t1
group by c2, c3
;

C C   COUNT(*)
- - ----------
N Y       1994
Y N      71482

2 rows selected.

The puzzle is this – how do you get the optimizer to predicat a cardinality of zero (or, using its best approximation, 1) if you execute a query where the predicate is:

where   c2 = 'N' and c3 = 'N'

Here are 4 tests you might try:

  • Create simple stats (no histograms) on c2 and c3.
  • Create frequency histograms on c2 and c3
  • Create a column group (extended stats) on (c2,c3) but no histograms
  • Create a column group (extended stats) on (c2,c3) with a histogram on (c2, c3)

If you do these tests you’ll find the estimated cardinalities are (from 12.1.0.2):

  • 18,369 – derived as 73,476 / 4  … total rows over total possible combinations
  • 1,940   – derived as 73,476 * (1,994/73,476) * (71,482/73,476) … total rows * fraction where c2 = ‘N’ * fraction where c3 = ‘N’
  • 36,738 – derived as 73,476 / 2 … total rows / number of distinct combinations of (c2, c3)
  • 997      – derived as 1,994 / 2 … half the frequency of the least frequently occurring value in the histogram

The last algorithm appeared in 10.2.0.4; prior to that a “value not in histogram” would have been given an estimated cardinality of 1 (which is what the person on Oracle-L wanted to see).

In fact the optimizer’s behaviour can be reverted to the 10.2.0.3 mechanism by setting fix-control 5483301 to zero (or off), either with an “alter session” call or inside the /*+ opt_param() */ hint. There is, however, another option – if you get the column stats, then immediately set them (dbms_stats.get_column_stats(), dbms_stats.set_column_stats()) the optimizer defines the stats as “user defined” and (for reasons I don’t know – perhaps it’s an oversight) reverts to the 10.2.0.3 behaviour. Here’s some code to demonstrate the point; as the srcipt header says, I’ve tested it on versions up to 18.1


rem
rem     Script:         histogram_hack_2.sql
rem     Author:         Jonathan Lewis
rem     Dated:          Jul 2018
rem
rem     Last tested 
rem             18.1.0.0        via LiveSQL (with some edits)
rem             12.2.0.1
rem             12.1.0.2
rem

create table t1
as
select 'Y' c2, 'N' c3 from all_objects where rownum <= 71482 -- > comment to avoid format issue
union all
select 'N' c2, 'Y' c3 from all_objects where rownum <= 1994 -- > comment to avoid format issue
;

execute dbms_stats.gather_table_stats(user,'t1',method_opt=>'for all columns size 10 for columns (c2,c3) size 10');

column column_name format a128 new_value m_colname

select  column_name
from    user_tab_cols
where   table_name = 'T1'
and     column_name not in ('C2','C3')
;

set autotrace traceonly explain
select /* pre-hack */ * from t1 where c2 = 'N' and c3 = 'N';
set autotrace off

declare
        l_distcnt number default null;
        l_density number default null;
        l_nullcnt number default null;
        l_srec    dbms_stats.statrec;
        l_avgclen number default null;

begin

        dbms_stats.get_column_stats (
                ownname =>user,
                tabname =>'t1',
                colname =>'&m_colname',
                distcnt =>l_distcnt,
                density =>l_density,
                nullcnt =>l_nullcnt,
                srec    =>l_srec,
                avgclen =>l_avgclen
        );

        dbms_stats.set_column_stats(
                ownname =>user,
                tabname =>'t1',
                colname =>'&m_colname',
                distcnt =>l_distcnt,
                density =>l_density,
                nullcnt =>l_nullcnt,
                srec    =>l_srec,
                avgclen =>l_avgclen
        );

end;
/

set autotrace traceonly explain
select /* post-hack */  * from t1 where c2 = 'N' and c3 = 'N';
set autotrace off

I’ve created a simple table for the data and collected stats including histograms on the two columns and on the column group. I’ve taken a simple strategy to find the name of the column group (I could have used the function dbms_stats.create_extended_stats() to set an SQL variable to the name of the column group, of course), and then run a little bit of PL/SQL that literally does nothing more than copy the column group’s stats into memory then write them back to the data dictionary.

Here are the “before” and “after” execution plans that we get from autotrace:

BEFORE
--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |   997 |  3988 |    23  (27)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| T1   |   997 |  3988 |    23  (27)| 00:00:01 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter("C2"='N' AND "C3"='N')


AFTER
--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |     1 |     4 |    23  (27)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| T1   |     1 |     4 |    23  (27)| 00:00:01 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter("C2"='N' AND "C3"='N')

As required – the estimate for the (‘N’,’N’) rows drops down to (the optimizer’s best approximation to ) zero.

Footnote:

An alternative strategy (and, I’d say, a better strategic approach) would have been to create a “fake” frequency histogram that included the value (‘N’,’N’) giving it a frequency of 1 – a method I’ve suggested in the past  but with the little problem that you need to be able to work out the value to use in the array passed to dbms_stats.set_column_stats() to represent the value for the (‘N’,’N’) combination – and I’ve written about that topic in the past as well.

 

A password() function for dmgawk

Yann Neuhaus - Tue, 2018-07-31 16:31

A few days ago, as I was preparing a dmawk script for a presentation, I stumbled against another unexpected error.
The script was attempting to connect to a docbase by providing a docbase name, a user name and a password. But before that, it tested whether a password was provided as a command-line parameter (I know, this is not very secure but it was for demonstration purpose only); if not, it prompted for one using dmawk’s built-in password() function. The full command was:

echo "select count(*) from dm_user" | dmawk -v docbase=dmtest -v username=dmadmin -f select.awk

with select.awk narrowed down to:

cat select.awk
BEGIN {
   passwd = password("please, enter password: ")
   print "password was:", passwd
}

The problem was that when piping something into the script, it didn’t prompt anymore for a password. Without piping, it prompted as expected:

echo "select count(*) from dm_user" | dmawk73 -f ./getpasswd.dmawk
password was:
exiting ...

==> not prompted for password;

dmawk73 -f ./getpasswd.dmawk
please, enter password:
password was: Supercalifragilisticexpialidocious!
exiting ...

==> prompted for password;
Here, the alias dmawk73 points to the content server v7.3’s dmawk, my current version of Documentum contentServer.
Note that the variant below did not work either:

cat query_file 
select
   count(*)
from
dm_user

dmawk73 -f ./getpasswd.dmawk < query_file
password was:
exiting ...

==> not prompted for password;
This proves that what screws up the dmawk’s password() function is the presence of characters in stdin, whether they come from a pipe or from a redirection.
Did they change (a politically correct way to say “break”) something in this version relatively to a previous one ? To be sure, I tried the same tiny script with dmawk from an ancient 5.3 installation I keep around for those puzzling occasions, and guess what ? No special weirdness here, it worked as expected:

dmadmin@dmclient:~/getpasswd$ echo "select count(*) from dm_user" | dmawk53 -f ./getpasswd.dmawk
please, enter password:
password was: Supercalifragilisticexpialidocious
exiting ...

where the alias dmawk53 points to the content server v5.3’s dmawk.
A strace on dmawk53 shows that the device /dev/tty is read for input:

open("/dev/tty", O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 4
...
write(4, "please, enter password: ", 24) = 24
read(4, "kdk\n", 4096) = 4
...
close(4) = 0
...
write(1, "password was: kdk\n", 18) = 18
write(1, "exiting ...\n", 12) = 12

For sure, the original behavior was changed somehow around reading from tty and the built-in password() function gets disrupted when something is first input into stdin.
So how to work around this new pesky issue ? Let’s see a few solutions. To be clear, I assume from the beginning that security is not a major concern here. Proposed solutions 4, 5 and 6 however are on the same security level as dmawk’s password() since they restore this function.

1. Give up piping into dmawk

This means that it will not be possible to concatenate the awk script to the previous command. If this is acceptable, why not ? dmawk’s input will have to come from a file, e.g.:

cat query_file 
select
   count(*)
from
dm_user

cat getpasswd_no_pipe.dmawk 
BEGIN {
   while ((getline < query_file) > 0)
      query = query "\n" $0
   close(query_file)
   print "query string is:", query
   pp = password("please, enter password: ")
   print "password was:", pp

   exit

}
END {
  print "exiting ..."
}

Execution:
dmadmin@dmclient:~/getpasswd$ dmawk73 -f getpasswd_no_pipe.dmawk -v query_file=query_file
query is: 
select
   count(*)
from
dm_user

please, enter password: 
password was: Et tu, Brute?
exiting ...

If security matters and command concatenation is not needed, the above may be an acceptable work-around.

2. Using an environment variable

If security is not significant, the password could be passed in a environment variable, e.g.:

cat getpasswd_env.dmawk
BEGIN {
   cmd = "echo $password"
   cmd | getline pp
   close(cmd)
   print "password was:", pp
}
END {
  print "exiting ..."
}

Execution:

export password=Supercalifragilisticexpialidocious!
echo "select count(*) from dm_user" | dmawk73 -f ./getpasswd_env.dmawk
password was: Supercalifragilisticexpialidocious!
exiting ...

Here, it is mandatory to use the export statement because dmawk launches a sub-process to read the parent’s environment variable.
Unlike dmawk, gawk can map the process’ environment into the built-in associative array ENVIRON, which makes accessing $password more elegant and also faster as no sub-process gets spawned:

cat ./getpasswd_env.awk
BEGIN {
   print "password was:", ENVIRON["password"]
   exit
}
END {
   print "exiting..."
}

Execution:

echo "select count(*) from dm_user" | gawk -f ./getpasswd_env.awk
password was: Supercalifragilisticexpialidocious!
exiting...

A little digression here while on the subject of environment variables: it’s a little known fact that the tools iapi and idql supports 3 handy but rarely used environment variables: DM_DOCBASE_NAME, DM_USER_NAME and DM_PASSWORD; if those are set, either as a whole or individually, the above utilities can be launched with the corresponding option -DM_CONNECT_DOCBASE, -DM_CONNECT_USER_NAME and -DM_CONNECT_PASSWORD and the corresponding parameter can be omitted. E.g.:

export DM_DOCBASE_NAME=dmtest
export DM_USER_NAME=kermit
export DM_PASSWORD=conehead
idql -ENV_CONNECT_DOCBASE_NAME -ENV_CONNECT_USER_NAME -ENV_CONNECT_PASSWORD </dev/null
   select count(*) from dm_user
   go
   quit
EoQ
Connected to Documentum Server running Release 7.3.0000.0214  Linux64.Oracle
1> 2> count(*)              
----------------------
                    61
(1 row affected)
1> Bye

However, there is no prompt for missing parameters or unset variables and, quite surprisingly, the command fails silently in such cases.
Nonetheless, the point here is that we could standardize on these variable names and use them with awk, e.g. (dm)awk would pull out those parameters from the environment as follows:

echo "select count(*) from dm_user" | dmawk73 'BEGIN {
   cmd = "echo $DM_DOCBASE_NAME $DM_USER_NAME $DM_PASSWORD"
   cmd | getline docbase_name dm_user_name passwd
   print docbase_name, dm_user_name, passwd ? passwd : "N/A"
   close(cmd)
}'
dmtest kermit conehead 

whereas gawk could chose to access those environment variables through the built-in ENVIRON associative array:

echo "select count(*) from dm_user" | gawk 'BEGIN { print ENVIRON["DM_DOCBASE_NAME"], ENVIRON["DM_USER_NAME"], ENVIRON["DM_PASSWORD"] ? ENVIRON["DM_PASSWORD"] : "N/A"}'
dmtest kermit conehead

which can be more readable in some cases since its indexes are explicitly named vs. positional.
See section 5 below to know what dmawk and gawk have in common regarding Documentum.

3. Reading the password from a file

Here too, let’s admit that security is not important so a cleartext password could be read from a text file as follows:

cat getpasswd_from_file.awk
# Usage:
#    dmawk -v password_file=... -f getpasswd_from_file.dmawk 
BEGIN {
   if (!password_file) {
      print "missing password_file parameter"
      exit
   }
   getline pp < password_file
   close(password_file)
   print "password was:", pp
}

Execution:

cat password_file
Supercalifragilisticexpialidocious!

echo "select count(*) from dm_user" | dmawk -f getpasswd_from_file.awk  -v password_file=password_file
password was: Supercalifragilisticexpialidocious!

No surprise here.

4. Access bash’s read -s command

The bash shell has the built-in command read which take the -s option in order to prevent echoing on the screen the entered characters. Unfortunately, while bash is most of the time a login shell, it is not always the subshell invoked when spawning a command, which awk does when executing things like “cmd | getline”. Actually, it is /bin/sh that is invoked as a subshell under Linux, which is a sym link to /bin/dash (at least the Ubuntu 16.04 and 18.04 I’m using here; under Centos, /usr/bin/sh is symlinked to /usr/bin/dash), a much smaller shell than bash and supposedly faster. So, how to force bash as a subshell ?
I could not find any system setting to configure the choice of the subshell. Obviously, changing the /bin/sh symlink and making it point to /bin/bash works indeed but it is a system-wide change and it is not recommended because of possible compatibility issues.
The solution is to explicitly tell the subshell to make bash execute the read. But it is not enough, we also need to explicitly tell read to get its input from /dev/tty otherwise it gets messed up with any piped or redirected input. Here is a solution:

cat getpasswd_tty.dmawk
BEGIN {
   pp = getpassword("please, enter password: ")
   print "\npassword was:", pp
   exit
}
END {
  print "exiting ..."
}
function getpassword(prompt     , cmd, passwd) {
   cmd = "/bin/bash -c 'read -s -p \"" prompt "\" passwd < /dev/tty; echo $passwd'"
   cmd | getline passwd
   close(cmd)
   return passwd
}

Execution:
echo "select count(*) from dm_user" | dmawk -f  getpasswd_tty.dmawk 
please, enter password: password: 
password was: AreYo7Kidd8ngM3?
exiting ...

Line 11 invokes bash from whatever subshell is launched by dmawk, and asks it to execute the read built-in without echo, with the given prompt, and with its input coming directly from the device /dev/tty.
On line 10, note the function getpassword’s formal parameters cmd and passwd; since the function is called without any effective value for those, they are considered as local variables; this is a common idiom in awk where all variables are global and come to existence as soon as they are referenced.
Under Centos, where /usr/bin/bash is also invoked as a subshell, line 11 can be slightly simplified:

   cmd = "'read -s -p \"" prompt "\" passwd < /dev/tty; echo $passwd'""

This work-around is the easiest and closest to the original built-in password() function.

5. Implement password() in dmgawk

Those who have read my blog here know that we have now a much more powerful implementation of awk in our toolbox, GNU gawk, which we can extend to suit our needs. The above blog describes how to extend gawk with a connectivity to Documentum docbases; I jokingly named the resulting awk dmgawk. As glibc includes the getpass() function just for this purpose, why not use the same approach and add to dmgawk a sensible password() function around C’s getpass() that works as before ? Let’s put our money where our mouth is and implement this function in dmgawk. In truth, it should be noted that getpass() is marked as being obsolete so this alternative should be considered as a temporary work-around.
I won’t copy here all the steps from the above blog though; here are only the distinctive ones.
The interface’s source:

cat ~/dmgawk/gawk-4.2.1/extension/password.c
/*
 * password.c - Builtin function that provide an interface to the getpass() function;
 * see dmapp.h for description of functions;
 *
 * C. Cervini
 * dbi-services.com
 * 7/2018
 */
#ifdef HAVE_CONFIG_H
#include 
#endif

#include "gawkapi.h"

#include "gettext.h"
#define _(msgid)  gettext(msgid)
#define N_(msgid) msgid

static const gawk_api_t *api;   /* for convenience macros to work */
static awk_ext_id_t ext_id;
static const char *ext_version = "password extension: version 1.0";
static awk_bool_t (*init_func)(void) = NULL;

int plugin_is_GPL_compatible;

/*  do_password */
static awk_value_t *
do_password(int nargs, awk_value_t *result, struct awk_ext_func *unused) {
   awk_value_t prompt;
   char *passwd;

   assert(result != NULL);

   if (get_argument(0, AWK_STRING, &prompt)) {
      passwd = getpass(prompt.str_value.str);
   }
   else passwd = getpass("");

   make_const_string(passwd == NULL ? "" : passwd, strlen(passwd), result);
   return result;
}

/*
these are the exported functions along with their min and max arities;
let's make the prompt parameter optional, as in dmawk;
*/
static awk_ext_func_t func_table[] = {
        { "password", do_password, 1, 0, awk_false, NULL },
};

/* define the dl_load function using the boilerplate macro */

dl_load_func(func_table, password, "")

Compilation steps:

cd ~/dmgawk/gawk-4.2.1/extension
vi Makefile.am
append the new library to the pkgextension_LTLIBRARIES list:
pkgextension_LTLIBRARIES =      \
        filefuncs.la    \
        fnmatch.la      \
        fork.la         \
        inplace.la      \
        intdiv.la       \
        ordchr.la       \
        readdir.la      \
        readfile.la     \
        revoutput.la    \
        revtwoway.la    \
        rwarray.la      \
        time.la         \
        dctm.la         \
        password.la

later:
dctm_la_SOURCES       = dctm.c
dctm_la_LDFLAGS       = $(MY_MODULE_FLAGS)
dctm_la_LIBADD        = $(MY_LIBS)

password_la_SOURCES  = password.c
password_la_LDFLAGS  = $(MY_MODULE_FLAGS)
password_la_LIBADD   = $(MY_LIBS)

run the make command:
make

go one level up and run the make command again:
make

At this point, the new gawk is ready for use. Let’s test it:

cat getpasswd.awk
@load "password"

BEGIN {
   passwd = password("please, enter password: ")
   print "password was:", passwd
}

END {
   print "exiting..."
}

Execution:

AWKLIBPATH=~/dmgawk/gawk-4.2.1/extension/.libs echo "select count(*) from dm_user" | ~/dmgawk/gawk-4.2.1/gawk -f ./getpasswd.awk 
please, enter password: 
password was: precipitevolissimevolmente
exiting...

If all is good, install the new extension system-wide as follows:

cd ~/dmgawk/gawk-4.2.1
sudo make install

make an alias to the new gawk:
alias dmgawk=/usr/local/bin/gawk
The usage is simplified now:
echo "select count(*) from dm_user" | dmgawk -f ./getpasswd.awk
please, enter password: 
password was: humptydumpty
exiting...

dmgawk looks more and more like a valuable substitute for dmawk. What gets broken in dmawk can be fixed by dmgawk.

6. And in python ?

Those who use python for their Documentum administration tasks, extended with the Documentum connectivity as proposed in my blog here, are even luckier because python has a library for just about everything but the kitchen sink, and an interface to C’s getpass(), appropriately named getpass(), already exists, see here. Therefore, there is no need to write one using e.g. ctypes. Here is how to call the python’s getpass():

cat getpasswd.py 
#!/usr/bin/python

import getpass

passwd = getpass.getpass(prompt = "Please, enter password: ")
print("The password is: " + passwd)

Execution:
echo "select count(*) from dm_user" | ./getpasswd.py
Please, enter password: 
The password is: Did the quick brown fox jump over the lazy dog ?

No muss, no fuss here.

Conclusion

It’s quite interesting to see how basic things that we take for granted get broken from one Documentum release to another. On the bright side though, those little frustrations gives us the opportunity to look for work-arounds, and write blogs about them ;-). I am eager to find the next dysfunction and pretty confident that Documentum will not be disappoint me in this respect.

 

Cet article A password() function for dmgawk est apparu en premier sur Blog dbi services.

returning top 10 records based on previous records counts

Tom Kyte - Tue, 2018-07-31 06:26
Hi, I have an ordered table of products and customers as follows: <code>rn product customer 1 859274 A 2 859267 A 3 859250 A 4 863592 B 5 862250 B 6 862700 B 7 862694 B 8 862120 B 9 863592 C 10 862250 C 11 862120 D 12 86...
Categories: DBA Blogs

Library Cache Locks and Compiling New PL/SQL Code

Tom Kyte - Tue, 2018-07-31 06:26
Hello! I have a friend that told me that compiling a new piece of Pl/SQL code will put library cache locks on the dependent objects, and that there's a risk for database contention when new code is deployed. In other words, if I go out to a datab...
Categories: DBA Blogs

How to install Oracle RAC 18c in silent mode on Oracle Linux 7.5 with VirtualBox – Part 2

Pierre Forstmann Oracle Database blog - Tue, 2018-07-31 00:19

Both posts document how to install a 2-node Oracle RAC cluster with Oracle 18c on Oracle Linux 7.5 (OL7) with VirtualBox (VBOX).

Part 1 details Oracle Linux installation and configuration and part 2 details Oracle software installation (Grid Infrastructure (GI), Oracle Database) and database creation.
In this article GIMR stands for Grid Infrastructure Management Repository.

Disclaimer: this is only an example that can be used to setup a lab or test system: it is not designed to be used for production purpose.

Grid Infrastructure silent installation

I have created ORACLE_BASE and ORACLE_HOME target directories on both nodes:

# mkdir -p /u01/base
# chown oracle:dba /u01/base
# mkdir /u01/gi18c
# chown oracle:oinstall /u01/gi18c
# chmod -R 775 /u01 

I have created /etc/oraInst.loc to define Oracle Inventory location on both nodes:

# cat /etc/oraInst.loc
inventory_loc=/u01/orainv
inst_group=oinstall
# mkdir  /u01/orainv
# chown oracle:oinstall /u01/orainv

I have unzipped GI media on first cluster node:

$ cd /u01/gi18c
$ unzip -q /stage/LINUX.X64_180000_grid_home.zip 

I have installed cvuqdisk RPM on both nodes. I have run on ol7decn1:

# rpm -iv /u01/gi18c/cv/rpm/cvuqdisk-1.0.10-1.rpm
Preparing packages...
cvuqdisk-1.0.10-1.x86_64

I have run on ol7decn2:

# scp root@ol7decn1:/u01/gi18c/cv/rpm/cvuqdisk-1.0.10-1.rpm .
The authenticity of host 'ol7decn1 (192.168.56.138)' can't be established.
ECDSA key fingerprint is SHA256:xo4lc6xkmEsFroCbIFcGUuWa2yuF7OUzPLVedKhk5dU.
ECDSA key fingerprint is MD5:d2:ef:bc:d9:b7:2a:e5:1f:91:e5:78:42:1b:a5:6e:3a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ol7decn1,192.168.56.138' (ECDSA) to the list of known hosts.
root@ol7decn1's password: 
cvuqdisk-1.0.10-1.rpm                                                                             100% 8860     4.5MB/s   00:00    
# rpm -iv cvuqdisk-1.0.10-1.rpm
Preparing packages...
cvuqdisk-1.0.10-1.x86_64
# 

I have labeled ASM disks for ASMFD on ol7decn1:

# export ORACLE_HOME=/u01/gi18c
# export ORACLE_BASE=/u01/base
# /u01/gi18c/bin/asmcmd afd_label OCRVD /dev/sdb1 --init
# /u01/gi18c/bin/asmcmd afd_label GIMR  /dev/sdc1 --init
# /u01/gi18c/bin/asmcmd afd_label DATA  /dev/sdd1 --init
# /u01/gi18c/bin/asmcmd afd_label RECO  /dev/sde1 --init

In order to avoid following error when installing GI … :

[FATAL] [INS-32250] ADR setup (diagsetup) tool failed. Check the install log for more details.
*ADDITIONAL INFORMATION:*
 - DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 - DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 - Error creating ADR directory
 - DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 - oracle.diagfw.adr.diagsetup.DiagSetupException: DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.createAdrDir(DiagSetup.java:578)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.createDirsLocal(DiagSetup.java:418)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.createDirs(DiagSetup.java:329)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.executeMain(DiagSetup.java:297)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.main(DiagSetup.java:260)
 - DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 - oracle.diagfw.adr.diagsetup.DiagSetupException: DiagSetup-00010: Diag Setup Usage error: unable to perform create directory operation
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.createDirs(DiagSetup.java:345)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.executeMain(DiagSetup.java:297)
 -  at oracle.diagfw.adr.diagsetup.DiagSetup.main(DiagSetup.java:260)

… I have removed following directory created by asmcmd afd_label instructions:

# rm -rf /u01/base/diag

I have created following silent installation script for GI:


cd /u01/gi18c
DISTRIB=$(pwd)
/u01/gi18c/gridSetup.sh -silent                              \
       -responseFile $DISTRIB/install/response/gridsetup.rsp   \
       inventory_location=/u01/orainv                          \
       selected_languages=en                                   \
       oracle.install.option=CRS_CONFIG                        \
       oracle_base=/u01/base/                                  \
       oracle.install.asm.OSDBA=dba                            \
       oracle.install.asm.OSOPER=dba                           \
       oracle.install.asm.OSASM=dba                            \
       oracle.install.crs.config.gpnp.scanName=ol7dec-scan.localdomain \
       oracle.install.crs.config.gpnp.scanPort=1521            \
       oracle.install.crs.config.clusterName=ol7decn           \
       oracle.install.crs.config.gpnp.configureGNS=false       \
       oracle.install.crs.config.clusterNodes=ol7decn1:ol7decn1-vip:HUB,ol7decn2:ol7decn2-vip:HUB \
       oracle.install.crs.config.networkInterfaceList=enp0s8:192.168.56.0:1,enp0s9:192.168.43.0:5 \
       oracle.install.crs.config.storageOption=FLEX_ASM_STORAGE \
       oracle.install.asm.configureGIMRDataDG=true             \
       oracle.install.crs.config.useIPMI=false                 \
       oracle.install.asm.SYSASMPassword=oracle                \
       oracle.install.asm.configureAFD=true                    \
       oracle.install.asm.storageOption=ASM                    \
       oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sdb1,/dev/sdc1 \
       oracle.install.asm.diskGroup.name=OCRVD                 \
       oracle.install.asm.diskGroup.disks=/dev/sdb1            \
       oracle.install.asm.diskGroup.redundancy=EXTERNAL        \
       oracle.install.asm.monitorPassword=oracle               \
       oracle.install.asm.gimrDG.name=GIMR                     \
       oracle.install.asm.gimrDG.disks=/dev/sdc1               \
       oracle.install.asm.gimrDG.redundancy=EXTERNAL           

The above script is using following variables defined in ./install/response/gridsetup.rsp response file:

parameter name description inventory_location Directory where Oracle Inventory will be stored. Must match /etc/oraInst.loc contents. oracle.install.option Must be set to CRS_CONFIG for Grid Infrastructure for cluster. oracle.install.crs.config.gpnp.scanName Must be set to DNS alias for the 3 SCAN listener adresses. oracle.install.crs.config.gpnp.scanPort Must be to set to TCP port to be used by SCAN listener. oracle.install.crs.config.clusterName No dependency for this name. oracle.install.crs.config.gpnp.configureGNS Must be set to FALSE to not use Grid Naming Service (GNS). oracle.install.crs.config.clusterNodes Must be set to public-hostname:vip-hostname:HUB comma separated host name list (for STANDALONE cluster type). oracle.install.crs.config.networkInterfaceList Must be set to network-interface:network-interface-subnet:network-interface_type comma separated strings
where network-interface_type must be set to 1 for public interface and to 5 for private interface (interconnect). oracle.install.crs.config.storageOption Set to FLEX_ASM_STORAGE for OCR and voting disk. oracle.install.asm.configureGIMRDataDG must be set to true to use a separate disk for GIMR database oracle.install.crs.config.useIPMI Must be set to FALSE to not use Intelligent Power Management Interface. oracle.install.asm.configureAFD must be set to TRUE to use ASMFD oracle.install.asm.SYSASMPassword Must be set to SYS password for ASM instance. oracle.install.asm.diskGroup.diskDiscoveryString Used to set ASM instance ASM_DISKSTRING parameter for OCR/voting disk disk group and GIMR disk group oracle.install.asm.diskGroup.name Name of ASM disk group used for OCR and voting disk oracle.install.asm.diskGroup.disks Comma separated ASM disk names list to be used for OCR and voting disk group. oracle.install.asm.diskGroup.redundancy Disk group redundancy used by above ASM disk group. oracle.install.asm.monitorPassword Must be set to ASMSNMP password for ASM instance. oracle.install.asm.gimrDG.name Name of ASM disk group used for GIMR database. oracle.install.asm.gimrDG.diskGroup.disks Comma separated ASM disk names list to be used for GIMR disk group. oracle.install.asm.gimrDG.diskGroup.redundancy Disk group redundancy used by GIMR disk group.

Running this script has generated following output:

Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-41808] Possible invalid choice for OSASM Group.
   CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
   ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
[WARNING] [INS-41809] Possible invalid choice for OSDBA Group.
   CAUSE: The group name you selected as the OSDBA for ASM group is commonly used for Oracle Database administrator privileges.
   ACTION: Oracle recommends that you designate asmdba as the OSDBA for ASM group, and that the group should not be the same group as an Oracle Database OSDBA group.
[WARNING] [INS-41810] Possible invalid choice for OSOPER Group.
   CAUSE: The group name you selected as the OSOPER for ASM group is commonly used for Oracle Database administrator privileges.
   ACTION: Oracle recommends that you designate asmoper as the OSOPER for ASM group, and that the group should not be the same group as an Oracle Database OSOPER group.
[WARNING] [INS-41813] OSDBA for ASM, OSOPER for ASM, and OSASM are the same OS group.
   CAUSE: The group you selected for granting the OSDBA for ASM group for database access, and the OSOPER for ASM group for startup and shutdown of Oracle ASM, is the same group as the OSASM group, whose members have SYSASM privileges on Oracle ASM.
   ACTION: Choose different groups as the OSASM, OSDBA for ASM, and OSOPER for ASM groups.
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/orainv/logs/GridSetupActions2018-07-28_05-28-26PM/gridSetupActions2018-07-28_05-28-26PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/orainv/logs/GridSetupActions2018-07-28_05-28-26PM/gridSetupActions2018-07-28_05-28-26PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/gi18c/install/response/grid_2018-07-28_05-28-26PM.rsp

You can find the log of this install session at:
 /u01/orainv/logs/GridSetupActions2018-07-28_05-28-26PM/gridSetupActions2018-07-28_05-28-26PM.log
OUI-10053:Unable to generate temporary script: /u01/oraInventory/orainstRoot.sh. Unable to continue install.

As a root user, execute the following script(s):
	1. /u01/orainv/orainstRoot.sh
	2. /u01/gi18c/root.sh

Execute /u01/orainv/orainstRoot.sh on the following nodes: 
[ol7decn2]
Execute /u01/gi18c/root.sh on the following nodes: 
[ol7decn1, ol7decn2]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.

I did not find any root cause for following error message which looks like a bug:

OUI-10053:Unable to generate temporary script: /u01/oraInventory/orainstRoot.sh. Unable to continue install.

I have ignored following failed prerequisites:

INFO:  [Jul 28, 2018 5:00:37 PM] ------------------List of failed Tasks------------------
INFO:  [Jul 28, 2018 5:00:37 PM] *********************************************
INFO:  [Jul 28, 2018 5:00:37 PM] Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
INFO:  [Jul 28, 2018 5:00:37 PM] Severity:IGNORABLE
INFO:  [Jul 28, 2018 5:00:37 PM] OverallStatus:VERIFICATION_FAILED
INFO:  [Jul 28, 2018 5:00:37 PM] -----------------End of failed Tasks List----------------

On second cluster node I have run orainstRoot.sh:

# /u01/orainv/orainstRoot.sh
Changing permissions of /u01/orainv.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/orainv to oinstall.
The execution of the script is complete.

On first cluster node I have run root.sh:

# /u01/gi18c/root.sh 
Check /u01/gi18c/install/root_ol7decn1.localdomain_2018-07-28_17-46-43-041313489.log for the output of root script

Corresponding log is:

cat /u01/gi18c/install/root_ol7decn1.localdomain_2018-07-28_17-46-43-041313489.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/gi18c
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
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.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/gi18c/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/base/crsdata/ol7decn1/crsconfig/rootcrs_ol7decn1_2018-07-28_05-46-55PM.log
2018/07/28 17:47:16 CLSRSC-594: Executing installation step 1 of 20: 'SetupTFA'.
2018/07/28 17:47:16 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2018/07/28 17:47:49 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2018/07/28 17:47:49 CLSRSC-594: Executing installation step 2 of 20: 'ValidateEnv'.
2018/07/28 17:47:49 CLSRSC-363: User ignored prerequisites during installation
2018/07/28 17:47:49 CLSRSC-594: Executing installation step 3 of 20: 'CheckFirstNode'.
2018/07/28 17:47:51 CLSRSC-594: Executing installation step 4 of 20: 'GenSiteGUIDs'.
2018/07/28 17:47:56 CLSRSC-594: Executing installation step 5 of 20: 'SaveParamFile'.
2018/07/28 17:48:14 CLSRSC-594: Executing installation step 6 of 20: 'SetupOSD'.
2018/07/28 17:48:14 CLSRSC-594: Executing installation step 7 of 20: 'CheckCRSConfig'.
2018/07/28 17:48:14 CLSRSC-594: Executing installation step 8 of 20: 'SetupLocalGPNP'.
2018/07/28 17:48:54 CLSRSC-594: Executing installation step 9 of 20: 'CreateRootCert'.
2018/07/28 17:49:04 CLSRSC-594: Executing installation step 10 of 20: 'ConfigOLR'.
2018/07/28 17:49:22 CLSRSC-594: Executing installation step 11 of 20: 'ConfigCHMOS'.
2018/07/28 17:49:22 CLSRSC-594: Executing installation step 12 of 20: 'CreateOHASD'.
2018/07/28 17:49:34 CLSRSC-594: Executing installation step 13 of 20: 'ConfigOHASD'.
2018/07/28 17:49:34 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2018/07/28 17:50:59 CLSRSC-594: Executing installation step 14 of 20: 'InstallAFD'.
2018/07/28 17:51:52 CLSRSC-594: Executing installation step 15 of 20: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2018/07/28 17:52:52 CLSRSC-594: Executing installation step 16 of 20: 'InstallKA'.
2018/07/28 17:53:01 CLSRSC-594: Executing installation step 17 of 20: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.driver.afd' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.evmd' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'ol7decn1'
CRS-2676: Start of 'ora.driver.afd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ol7decn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.evmd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ol7decn1'
CRS-2676: Start of 'ora.gpnpd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'ol7decn1'
CRS-2676: Start of 'ora.gipcd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'ol7decn1'
CRS-2676: Start of 'ora.diskmon' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'ol7decn1' succeeded

[INFO] [DBT-30161] Disk label(s) created successfully. Check /u01/base/cfgtoollogs/asmca/asmca-180728PM055408.log for details.
[INFO] [DBT-30001] Disk groups created successfully. Check /u01/base/cfgtoollogs/asmca/asmca-180728PM055408.log for details.


2018/07/28 17:55:25 CLSRSC-482: Running command: '/u01/gi18c/bin/ocrconfig -upgrade oracle oinstall'
CRS-2672: Attempting to start 'ora.crf' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.storage' on 'ol7decn1'
CRS-2676: Start of 'ora.storage' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.crf' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'ol7decn1'
CRS-2676: Start of 'ora.crsd' on 'ol7decn1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 79df663311604f1ebfe81344216c1d46.
Successfully replaced voting disk group with +OCRVD.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   79df663311604f1ebfe81344216c1d46 (AFD:OCRVD) [OCRVD]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.crsd' on 'ol7decn1'
CRS-2677: Stop of 'ora.crsd' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.crf' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ol7decn1'
CRS-2677: Stop of 'ora.crf' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.storage' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ol7decn1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.asm' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ol7decn1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.evmd' on 'ol7decn1'
CRS-2677: Stop of 'ora.evmd' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ol7decn1'
CRS-2677: Stop of 'ora.cssd' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'ol7decn1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ol7decn1'
CRS-2677: Stop of 'ora.driver.afd' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'ol7decn1' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'ol7decn1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2018/07/28 17:59:38 CLSRSC-594: Executing installation step 18 of 20: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.evmd' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'ol7decn1'
CRS-2676: Start of 'ora.evmd' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ol7decn1'
CRS-2676: Start of 'ora.gpnpd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'ol7decn1'
CRS-2676: Start of 'ora.gipcd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ol7decn1'
CRS-2676: Start of 'ora.cssdmonitor' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.cssd' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.diskmon' on 'ol7decn1'
CRS-2676: Start of 'ora.diskmon' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.crf' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.cssd' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.ctssd' on 'ol7decn1'
CRS-2676: Start of 'ora.ctssd' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ol7decn1'
CRS-2676: Start of 'ora.asm' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'ol7decn1'
CRS-2676: Start of 'ora.storage' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'ol7decn1'
CRS-2676: Start of 'ora.crsd' on 'ol7decn1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: ol7decn1
CRS-6016: Resource auto-start has completed for server ol7decn1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2018/07/28 18:02:51 CLSRSC-343: Successfully started Oracle Clusterware stack
2018/07/28 18:02:51 CLSRSC-594: Executing installation step 19 of 20: 'ConfigNode'.
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7decn1'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ol7decn1'
CRS-2676: Start of 'ora.asm' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.OCRVD.dg' on 'ol7decn1'
CRS-2676: Start of 'ora.OCRVD.dg' on 'ol7decn1' succeeded
2018/07/28 18:05:23 CLSRSC-594: Executing installation step 20 of 20: 'PostConfig'.

[INFO] [DBT-30161] Disk label(s) created successfully. Check /u01/base/cfgtoollogs/asmca/asmca-180728PM060527.log for details.
[INFO] [DBT-30001] Disk groups created successfully. Check /u01/base/cfgtoollogs/asmca/asmca-180728PM060527.log for details.


2018/07/28 18:08:45 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

I have checked cluster resources with:

$ export ORACLE_SID=+ASM1
$ PATH=/u01/gi18c/bin:$PATH
$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.GIMR.GHCHKPT.advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
ora.GIMR.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.OCRVD.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.gimr.ghchkpt.acfs
               OFFLINE OFFLINE      ol7decn1                 volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
ora.helper
               OFFLINE OFFLINE      ol7decn1                 STABLE
ora.net1.network
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.ons
               ONLINE  ONLINE       ol7decn1                 STABLE
ora.proxy_advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       ol7decn1                 Started,STABLE
      2        OFFLINE OFFLINE                               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
--------------------------------------------------------------------------------

I have run root.sh on second cluster node:

# /u01/gi18c/root.sh 
Check /u01/gi18c/install/root_ol7decn2.localdomain_2018-07-28_18-27-02-937964448.log for the output of root script

Corresponding log is:

Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/gi18c
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
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.
Relinking oracle with rac_on option
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_PAPER = "fr_FR.UTF-8",
	LC_MONETARY = "fr_FR.UTF-8",
	LC_NUMERIC = "fr_FR.UTF-8",
	LC_MEASUREMENT = "fr_FR.UTF-8",
	LC_TIME = "fr_FR.UTF-8",
	LANG = "en_EN"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Using configuration parameter file: /u01/gi18c/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/base/crsdata/ol7decn2/crsconfig/rootcrs_ol7decn2_2018-07-28_06-27-39PM.log
2018/07/28 18:27:46 CLSRSC-594: Executing installation step 1 of 20: 'SetupTFA'.
2018/07/28 18:27:46 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2018/07/28 18:28:28 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2018/07/28 18:28:28 CLSRSC-594: Executing installation step 2 of 20: 'ValidateEnv'.
2018/07/28 18:28:28 CLSRSC-363: User ignored prerequisites during installation
2018/07/28 18:28:28 CLSRSC-594: Executing installation step 3 of 20: 'CheckFirstNode'.
2018/07/28 18:28:30 CLSRSC-594: Executing installation step 4 of 20: 'GenSiteGUIDs'.
2018/07/28 18:28:30 CLSRSC-594: Executing installation step 5 of 20: 'SaveParamFile'.
2018/07/28 18:28:33 CLSRSC-594: Executing installation step 6 of 20: 'SetupOSD'.
2018/07/28 18:28:33 CLSRSC-594: Executing installation step 7 of 20: 'CheckCRSConfig'.
2018/07/28 18:28:34 CLSRSC-594: Executing installation step 8 of 20: 'SetupLocalGPNP'.
2018/07/28 18:28:35 CLSRSC-594: Executing installation step 9 of 20: 'CreateRootCert'.
2018/07/28 18:28:35 CLSRSC-594: Executing installation step 10 of 20: 'ConfigOLR'.
2018/07/28 18:28:38 CLSRSC-594: Executing installation step 11 of 20: 'ConfigCHMOS'.
2018/07/28 18:28:38 CLSRSC-594: Executing installation step 12 of 20: 'CreateOHASD'.
2018/07/28 18:28:39 CLSRSC-594: Executing installation step 13 of 20: 'ConfigOHASD'.
2018/07/28 18:28:40 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2018/07/28 18:29:52 CLSRSC-594: Executing installation step 14 of 20: 'InstallAFD'.
2018/07/28 18:30:33 CLSRSC-594: Executing installation step 15 of 20: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2018/07/28 18:31:28 CLSRSC-594: Executing installation step 16 of 20: 'InstallKA'.
2018/07/28 18:31:30 CLSRSC-594: Executing installation step 17 of 20: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7decn2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'ol7decn2'
CRS-2677: Stop of 'ora.drivers.acfs' on 'ol7decn2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7decn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2018/07/28 18:31:43 CLSRSC-594: Executing installation step 18 of 20: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.evmd' on 'ol7decn2'
CRS-2672: Attempting to start 'ora.mdnsd' on 'ol7decn2'
CRS-2676: Start of 'ora.evmd' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ol7decn2'
CRS-2676: Start of 'ora.gpnpd' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'ol7decn2'
CRS-2676: Start of 'ora.gipcd' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ol7decn2'
CRS-2676: Start of 'ora.cssdmonitor' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'ol7decn2'
CRS-2672: Attempting to start 'ora.cssd' on 'ol7decn2'
CRS-2672: Attempting to start 'ora.diskmon' on 'ol7decn2'
CRS-2676: Start of 'ora.diskmon' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.crf' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.cssd' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ol7decn2'
CRS-2672: Attempting to start 'ora.ctssd' on 'ol7decn2'
CRS-2676: Start of 'ora.ctssd' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'ol7decn2'
CRS-2676: Start of 'ora.crsd' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ol7decn2'
CRS-2676: Start of 'ora.asm' on 'ol7decn2' succeeded
CRS-6017: Processing resource auto-start for servers: ol7decn2
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.ons' on 'ol7decn2'
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7decn2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'ol7decn1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'ol7decn1'
CRS-2677: Stop of 'ora.scan1.vip' on 'ol7decn1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'ol7decn2'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ol7decn2'
CRS-2676: Start of 'ora.scan1.vip' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'ol7decn2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.ons' on 'ol7decn2' succeeded
CRS-2676: Start of 'ora.asm' on 'ol7decn2' succeeded
CRS-2672: Attempting to start 'ora.proxy_advm' on 'ol7decn1'
CRS-2672: Attempting to start 'ora.proxy_advm' on 'ol7decn2'
CRS-2676: Start of 'ora.proxy_advm' on 'ol7decn1' succeeded
CRS-2676: Start of 'ora.proxy_advm' on 'ol7decn2' succeeded
CRS-6016: Resource auto-start has completed for server ol7decn2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2018/07/28 18:34:41 CLSRSC-343: Successfully started Oracle Clusterware stack
2018/07/28 18:34:41 CLSRSC-594: Executing installation step 19 of 20: 'ConfigNode'.
2018/07/28 18:35:02 CLSRSC-594: Executing installation step 20 of 20: 'PostConfig'.
2018/07/28 18:35:35 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

I have checked cluster resources:

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.GIMR.GHCHKPT.advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.GIMR.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.OCRVD.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.gimr.ghchkpt.acfs
               OFFLINE OFFLINE      ol7decn1                 volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.helper
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.ons
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.proxy_advm
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       ol7decn1                 Started,STABLE
      2        ONLINE  ONLINE       ol7decn2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn2.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
--------------------------------------------------------------------------------

I have checked ASMFD disks:

$ export ORACLE_BASE=/u01/base
$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label                     Filtering   Path
================================================================================
GIMR                        ENABLED   /dev/sdc1
OCRVD                       ENABLED   /dev/sdb1

I have run the last GI configuration script with oracle user account:

set -x
cd /u01/gi18c
DISTRIB=$(pwd)
/u01/gi18c/gridSetup.sh -silent -executeConfigTools            \
       -responseFile $DISTRIB/install/response/gridsetup.rsp   \
       inventory_location=/u01/orainv                          \
       selected_languages=en                                   \
       oracle.install.option=CRS_CONFIG                        \
       oracle_base=/u01/base/                                  \
       oracle.install.asm.OSDBA=dba                            \
       oracle.install.asm.OSOPER=dba                           \
       oracle.install.asm.OSASM=dba                            \
       oracle.install.crs.config.gpnp.scanName=ol7dec-scan.localdomain \
       oracle.install.crs.config.gpnp.scanPort=1521            \
       oracle.install.crs.config.clusterName=ol7decn           \
       oracle.install.crs.config.gpnp.configureGNS=false       \
       oracle.install.crs.config.clusterNodes=ol7decn1:ol7decn1-vip:HUB,ol7decn2:ol7decn2-vip:HUB \
       oracle.install.crs.config.networkInterfaceList=enp0s8:192.168.56.0:1,enp0s9:192.168.43.0:5 \
       oracle.install.crs.config.storageOption=FLEX_ASM_STORAGE \
       oracle.install.asm.configureGIMRDataDG=true             \
       oracle.install.crs.config.useIPMI=false                 \
       oracle.install.asm.SYSASMPassword=oracle                \
       oracle.install.asm.configureAFD=true                    \
       oracle.install.asm.storageOption=ASM                    \
       oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sdb1,/dev/sdc1 \
       oracle.install.asm.diskGroup.name=OCRVD                 \
       oracle.install.asm.diskGroup.disks=/dev/sdb1            \
       oracle.install.asm.diskGroup.redundancy=EXTERNAL        \
       oracle.install.asm.monitorPassword=oracle               \
       oracle.install.asm.gimrDG.name=GIMR                     \
       oracle.install.asm.gimrDG.disks=/dev/sdc1               \
       oracle.install.asm.gimrDG.redundancy=EXTERNAL           

Running this script has generated following output:

Launching Oracle Grid Infrastructure Setup Wizard...

You can find the logs of this session at:
/u01/orainv/logs/GridSetupActions2018-07-28_06-48-32PM

Successfully Configured Software.

I have checked cluster resources with:

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.GIMR.GHCHKPT.advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.GIMR.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.OCRVD.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.chad
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.gimr.ghchkpt.acfs
               OFFLINE OFFLINE      ol7decn1                 volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.helper
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.ons
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.proxy_advm
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       ol7decn1                 169.254.26.6 192.168
                                                             .43.138,STABLE
ora.asm
      1        ONLINE  ONLINE       ol7decn1                 Started,STABLE
      2        ONLINE  ONLINE       ol7decn2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       ol7decn1                 Open,STABLE
ora.ol7decn1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn2.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
--------------------------------------------------------------------------------

Note that GIMR database (ora.mgmtdb resource) is now created and started.

I have checked OCR:

$ ocrcheck
Status of Oracle Cluster Registry is as follows :
	 Version                  :          4
	 Total space (kbytes)     :     491684
	 Used space (kbytes)      :      84888
	 Available space (kbytes) :     406796
	 ID                       : 1283070023
	 Device/File Name         :     +OCRVD
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

	 Cluster registry integrity check succeeded

	 Logical corruption check bypassed due to non-privileged user

I have checked voting disk:

$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   79df663311604f1ebfe81344216c1d46 (AFD:OCRVD) [OCRVD]
Located 1 voting disk(s).

I have checked ASM disk groups:

 asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  1048576     40959    15761                0           15761              0             N  GIMR/
MOUNTED  EXTERN  N         512             512   4096  1048576      2047     1748                0            1748              0             Y  OCRVD/

I have checked GIMR resource:

$ srvctl config mgmtdb
Database unique name: _mgmtdb
Database name: 
Oracle home: 
Oracle user: oracle
Spfile: +GIMR/_MGMTDB/PARAMETERFILE/spfile.270.982696243
Password file: 
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: GIMR_DSCREP_10
PDB service: GIMR_DSCREP_10
Cluster name: ol7decn
Database instance: -MGMTDB

I have checked GI patch level with:

$ crsctl query crs softwareversion
Oracle Clusterware version on node [ol7decn1] is [18.0.0.0.0]
$ $ORACLE_HOME/OPatch/opatch lspatches
27908644;UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171
27923415;OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)
28256701;TOMCAT RELEASE UPDATE 18.3.0.0.0 (28256701)
28090564;DBWLM RELEASE UPDATE 18.3.0.0.0 (28090564)
28090557;ACFS RELEASE UPDATE 18.3.0.0.0 (28090557)
28090553;OCW RELEASE UPDATE 18.3.0.0.0 (28090553)
28090523;Database Release Update : 18.3.0.0.180717 (28090523)

OPatch succeeded.
$ 

I have added ASM instance names in /etc/oratab because GI installation has not done it on both nodes.
On ol7decn1:

+ASM1:/u01/gi18c:N

On ol7decn2:

+ASM2:/u01/gi18c:N
Oracle Database silent installation

I have created Oracle Home directory on both nodes:

# mkdir /u01/db18c
# chown oracle:dba /u01/db18c

I have unzipped media file:

$ cd /u01/db18c
$ unzip -q /stage/LINUX.X64_180000_db_home.zip 

On first node I have run following script:

$ cd /u01/db18c 
export DISTRIB=`pwd`
./runInstaller -silent \
-responseFile $DISTRIB/install/response/db_install.rsp \
oracle.install.option=INSTALL_DB_SWONLY             \
oracle.install.db.CLUSTER_NODES=ol7decn1,ol7decn2   \
UNIX_GROUP_NAME=oinstall                            \
SELECTED_LANGUAGES=en                               \
ORACLE_HOME=/u01/db18c                              \
ORACLE_BASE=/u01/base                               \
oracle.install.db.InstallEdition=EE                 \
oracle.install.db.isCustomInstall=false             \
oracle.install.db.OSDBA_GROUP=dba                   \
oracle.install.db.OSBACKUPDBA_GROUP=dba             \
oracle.install.db.OSDGDBA_GROUP=dba                 \
oracle.install.db.OSKMDBA_GROUP=dba                 \
oracle.install.db.OSRACDBA_GROUP=dba                \
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false          \
DECLINE_SECURITY_UPDATES=true                       \
-waitForCompletion

I have ignored following warnings:

INFO:  [Jul 30, 2018 6:37:48 AM] ------------------List of failed Tasks------------------
INFO:  [Jul 30, 2018 6:37:48 AM] *********************************************
INFO:  [Jul 30, 2018 6:37:48 AM] Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
INFO:  [Jul 30, 2018 6:37:48 AM] Severity:IGNORABLE
INFO:  [Jul 30, 2018 6:37:48 AM] OverallStatus:VERIFICATION_FAILED
INFO:  [Jul 30, 2018 6:37:48 AM] *********************************************
INFO:  [Jul 30, 2018 6:37:48 AM] Oracle base: /u01/base: This task verifies the writability of the Oracle base /u01/base
INFO:  [Jul 30, 2018 6:37:48 AM] Severity:CRITICAL
INFO:  [Jul 30, 2018 6:37:48 AM] OverallStatus:WARNING
INFO:  [Jul 30, 2018 6:37:48 AM] *********************************************
INFO:  [Jul 30, 2018 6:37:48 AM] '/u01/base':
INFO:  [Jul 30, 2018 6:37:48 AM] Severity:CRITICAL
INFO:  [Jul 30, 2018 6:37:48 AM] OverallStatus:WARNING
INFO:  [Jul 30, 2018 6:37:48 AM] -----------------End of failed Tasks List----------------

Running this script has produced following output:

Launching Oracle Database Setup Wizard...

[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/orainv/logs/InstallActions2018-07-30_06-33-01AM/installActions2018-07-30_06-33-01AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/orainv/logs/InstallActions2018-07-30_06-33-01AM/installActions2018-07-30_06-33-01AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/db18c/install/response/db_2018-07-30_06-33-01AM.rsp

You can find the log of this install session at:
 /u01/orainv/logs/InstallActions2018-07-30_06-33-01AM/installActions2018-07-30_06-33-01AM.log

As a root user, execute the following script(s):
	1. /u01/db18c/root.sh

Execute /u01/db18c/root.sh on the following nodes: 
[ol7decn1, ol7decn2]


Successfully Setup Software with warning(s).

I have run root.sh on first node …:

# /u01/db18c/root.sh
Check /u01/db18c/install/root_ol7decn1.localdomain_2018-07-30_07-04-22-677276940.log for the output of root script
# cat /u01/db18c/install/root_ol7decn1.localdomain_2018-07-30_07-04-22-677276940.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/db18c
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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.
# 

… and on second node:

# /u01/db18c/root.sh
Check /u01/db18c/install/root_ol7decn2.localdomain_2018-07-30_07-04-47-261594066.log for the output of root script
# cat /u01/db18c/install/root_ol7decn2.localdomain_2018-07-30_07-04-47-261594066.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/db18c
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

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.
# 

I have checked patch level on first node:

$ export ORACLE_HOME=/u01/db18c
$ export PATH=$ORACLE_HOME/bin:$PATH
$ sqlplus -v

SQL*Plus: Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

$ $ORACLE_HOME/OPatch/opatch lspatches
27908644;UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171
27923415;OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)
28090553;OCW RELEASE UPDATE 18.3.0.0.0 (28090553)
28090523;Database Release Update : 18.3.0.0.180717 (28090523)

OPatch succeeded.
Fast Recovery Area (FRA) and database group disk creation

I have first modified ASMFD to discover the 2 additional disks:

$ asmcmd afd_dsget
AFD discovery string: /dev/sdb1,/dev/sdc1
$ asmcmd afd_dsset '/dev/sd*'
$ asmcmd afd_dsget
AFD discovery string: /dev/sd*

I have checked that ASMFD is now able to see all ASM disks:

$ asmcmd afd_lsdsk               
--------------------------------------------------------------------------------
Label                     Filtering   Path
================================================================================
DATA                        ENABLED   /dev/sdd1
GIMR                        ENABLED   /dev/sdc1
OCRVD                       ENABLED   /dev/sdb1
RECO                        ENABLED   /dev/sde1
$ 

I have also modified ASMFD configuration on second node to make sure ASM disks are usable on both cluster nodes:

$ asmcmd afd_scan  
$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label                     Filtering   Path
================================================================================
DATA                        ENABLED   /dev/sdd1
GIMR                        ENABLED   /dev/sdc1
OCRVD                       ENABLED   /dev/sdb1
RECO                        ENABLED   /dev/sde1
$ 

I have created new ASM disk groups with:

$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM1
The Oracle base remains unchanged with value /u01/base
$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on Mon Jul 30 22:06:41 2018
Version 18.3.0.0.0

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


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SYS@+ASM1>select name, label, path, header_status from v$asm_disk;

NAME	   LABEL      PATH		   HEADER_STATU
---------- ---------- -------------------- ------------
	   DATA       AFD:DATA		   PROVISIONED
	   RECO       AFD:RECO		   PROVISIONED
OCRVD	   OCRVD      AFD:OCRVD 	   MEMBER
GIMR	   GIMR       AFD:GIMR		   MEMBER

SYS@+ASM1>create diskgroup DATA external redundancy disk 'AFD:DATA';

Diskgroup created.

SYS@+ASM1>create diskgroup RECO external redundancy disk 'AFD:RECO';

Diskgroup created.

I have started disk groups on second cluster node:

$ srvctl start diskgroup -diskgroup DATA -n ol7decn2
$ srvctl start diskgroup -diskgroup RECO -n ol7decn2

I have checked that both disk group resources have been added to OCR:

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.DATA.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.GIMR.GHCHKPT.advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.GIMR.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.OCRVD.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.RECO.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.chad
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.gimr.ghchkpt.acfs
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.helper
               OFFLINE OFFLINE      ol7decn1                 IDLE,STABLE
               OFFLINE OFFLINE      ol7decn2                 IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.ons
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.proxy_advm
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       ol7decn1                 169.254.26.6 192.168
                                                             .43.138,STABLE
ora.asm
      1        ONLINE  ONLINE       ol7decn1                 Started,STABLE
      2        ONLINE  ONLINE       ol7decn2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       ol7decn1                 Open,STABLE
ora.ol7decn1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn2.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
--------------------------------------------------------------------------------

I have changed DATA disk group compatibility to make sure that I can create a 18c database and avoid following error:

[FATAL] [DBT-05802] Creating password file on diskgroup (DATA) would fail since it requires compatible.asm of version (12.1.0.0.0) or higher. Current compatible.asm version is '11.2.0.2.0'.
ACTION: Choose a diskgroup with correct value for compatible.asm attribute.

I have run:

$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on Mon Jul 30 20:27:18 2018
Version 18.3.0.0.0

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


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SYS@+ASM1>alter diskgroup DATA set attribute 'compatible.asm'='12.1.0.0';

Diskgroup altered.

RAC database creation

I have created a RAC database with following script:

/u01/db18c/bin/dbca \
 -silent \
 -nodelist ol7decn1,ol7decn2 \
 -createDatabase \
 -templateName General_Purpose.dbc   \
 -gdbName CDBRAC \
 -createAsContainerDatabase true \
 -numberOfPdbs 1 \
 -pdbName pdb \
 -pdbadminUsername pdba \
 -pdbadminPassword oracle \
 -SysPassword oracle \
 -SystemPassword oracle \
 -emConfiguration NONE \
 -storageType ASM \
 -asmSysPassword oracle \
 -diskGroupName DATA \
 -characterSet AL32UTF8 \
 -totalMemory 1024 \
 -recoveryGroupName RECO 

This script has printed following output:

WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
7% complete
Copying database files
27% complete
Creating and starting Oracle instance
28% complete
31% complete
35% complete
37% complete
40% complete
Creating cluster database views
41% complete
53% complete
Completing Database Creation
57% complete
59% complete
60% complete
Creating Pluggable Databases
64% complete
80% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/base/cfgtoollogs/dbca/CDBRAC.
Database Information:
Global Database Name:CDBRAC
System Identifier(SID) Prefix:CDBRAC
Look at the log file "/u01/base/cfgtoollogs/dbca/CDBRAC/CDBRAC.log" for further details.

I have fixed /etc/oratab on both nodes to add missing instance names.
On first node:

$ tail -n 1 /etc/oratab
CDBRAC1:/u01/db18c:N
$ 

On second node:

$ tail -n 1 /etc/oratab
CDBRAC2:/u01/db18c:N
$ 

I have connected to database instance and run some checks:

SYS@CDBRAC2>select name, cdb from v$database;

NAME	  CDB
--------- ---
CDBRAC	  YES

SYS@CDBRAC2>show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 PDB				  READ WRITE NO
SYS@CDBRAC2>select comp_name, version, status from dba_registry;

COMP_NAME				 VERSION	      STATUS
---------------------------------------- -------------------- ----------
Oracle Database Catalog Views		 18.0.0.0.0	      VALID
Oracle Database Packages and Types	 18.0.0.0.0	      VALID
Oracle Real Application Clusters	 18.0.0.0.0	      VALID
JServer JAVA Virtual Machine		 18.0.0.0.0	      VALID
Oracle XDK				 18.0.0.0.0	      VALID
Oracle Database Java Packages		 18.0.0.0.0	      VALID
OLAP Analytic Workspace 		 18.0.0.0.0	      VALID
Oracle XML Database			 18.0.0.0.0	      VALID
Oracle Workspace Manager		 18.0.0.0.0	      VALID
Oracle Text				 18.0.0.0.0	      VALID
Oracle Multimedia			 18.0.0.0.0	      VALID

COMP_NAME				 VERSION	      STATUS
---------------------------------------- -------------------- ----------
Spatial 				 18.0.0.0.0	      VALID
Oracle OLAP API 			 18.0.0.0.0	      VALID
Oracle Label Security			 18.0.0.0.0	      VALID
Oracle Database Vault			 18.0.0.0.0	      VALID

15 rows selected.

SYS@CDBRAC2>select patch_id, action, description, status, action_time from dba_registry_sqlpatch;

  PATCH_ID ACTION	   DESCRIPTION							STATUS	   ACTION_TIME
---------- --------------- ------------------------------------------------------------ ---------- ------------------------------
  28090523 APPLY	   Database Release Update : 18.3.0.0.180717 (28090523) 	SUCCESS    30-JUL-18 08.55.00.839070 PM
  27923415 APPLY	   OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)		SUCCESS    30-JUL-18 08.55.00.843547 PM

SYS@CDBRAC2>

I have checked database configuration in OCR:

$ srvctl config database -d CDBRAC
Database unique name: CDBRAC
Database name: CDBRAC
Oracle home: /u01/db18c
Oracle user: oracle
Spfile: +DATA/CDBRAC/PARAMETERFILE/spfile.272.982876093
Password file: +DATA/CDBRAC/PASSWORD/pwdcdbrac.256.982874473
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: RECO,DATA
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: CDBRAC1,CDBRAC2
Configured nodes: ol7decn1,ol7decn2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed

I have also checked that crsctl displays now all resources including the new database:

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.DATA.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.GIMR.GHCHKPT.advm
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.GIMR.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.OCRVD.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.RECO.dg
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.chad
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.gimr.ghchkpt.acfs
               OFFLINE OFFLINE      ol7decn1                 STABLE
               OFFLINE OFFLINE      ol7decn2                 STABLE
ora.helper
               OFFLINE OFFLINE      ol7decn1                 IDLE,STABLE
               OFFLINE OFFLINE      ol7decn2                 IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.ons
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
ora.proxy_advm
               ONLINE  ONLINE       ol7decn1                 STABLE
               ONLINE  ONLINE       ol7decn2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       ol7decn1                 169.254.26.6 192.168
                                                             .43.138,STABLE
ora.asm
      1        ONLINE  ONLINE       ol7decn1                 Started,STABLE
      2        ONLINE  ONLINE       ol7decn2                 Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cdbrac.db
      1        ONLINE  ONLINE       ol7decn1                 Open,HOME=/u01/db18c
                                                             ,STABLE
      2        ONLINE  ONLINE       ol7decn2                 Open,HOME=/u01/db18c
                                                             ,STABLE
ora.cvu
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       ol7decn1                 Open,STABLE
ora.ol7decn1.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.ol7decn2.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ol7decn2                 STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       ol7decn1                 STABLE
--------------------------------------------------------------------------------
$ 

The 2-node RAC 18c cluster is now ready.

Conclusion

Comparing with a 12.2.0.1 installation, it is now possible to create directly GIMR database in a dedicated disk group.

I note new default local cluster resources and currently not really documented:

– ora.GIMR.GHCHKPT.advm

– ora.gimr.ghchkpt.acfs

– ora.proxy_advm

– ora.helper

I note also one new cluster resource: ora.rhpserver.

In general I find installations elapsted time quite slow, possibly due to many unexpected short lived depmod processes using a lot of CPU …

Categories: DBA Blogs

Where to find the oracle-database-ee-18c-1.0-1.x86_64.rpm package?

Dietrich Schroff - Mon, 2018-07-30 14:02
After writing about the release of Oracle database 18c i wanted to download
oracle-database-ee-18c-1.0-1.x86_64.rpmto try the rpm-based installation.
But this rpm is not included in
LINUX.X64_180000_db_home.zipThe oracle documentation shows:
 But on OTN and Delivery Cloud only the zipfile without the rpm can be downloaded...

So let's see, when the download pages are updated...

Text Classification with Deep Neural Network in TensorFlow - Simple Explanation

Andrejus Baranovski - Mon, 2018-07-30 13:05
Text classification implementation with TensorFlow can be simple. One of the areas where text classification can be applied - chatbot text processing and intent resolution. I will describe step by step in this post, how to build TensorFlow model for text classification and how classification is done. Please refer to my previous post related to similar topic - Contextual Chatbot with TensorFlow, Node.js and Oracle JET - Steps How to Install and Get It Working. I would recommend to go through this great post about chatbot implementation - Contextual Chatbots with Tensorflow.

Complete source code is available in GitHub repo (refer to the steps described in the blog referenced above).

Text classification implementation:

Step 1: Preparing Data
  • Tokenise patterns into array of words
  • Lower case and stem all words. Example: Pharmacy = pharm. Attempt to represent related words 
  • Create list of classes - intents
  • Create list of documents - combination between list of patterns and list of intents
Python implementation:


Step 2: Preparing TensorFlow Input
  • [X: [0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, ...N], Y: [0, 0, 1, 0, 0, 0, ...M]]
  • [X: [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, ...N], Y: [0, 0, 0, 1, 0, 0, ...M]]
  • Array representing pattern with 0/1. N = vocabulary size. 1 when word position in vocabulary is matching word from pattern
  • Array representing intent with 0/1. M = number of intents. 1 when intent position in list of intents/classes is matching current intent
Python implementation:


Step 3: Training Neural Network
  • Use tflearn - deep learning library featuring a higher-level API for TensorFlow
  • Define X input shape - equal to word vocabulary size
  • Define two layers with 8 hidden neurones - optimal for text classification task (based on experiments)
  • Define Y input shape - equal to number of intents
  • Apply regression to find the best equation parameters
  • Define Deep Neural Network model (DNN)
  • Run model.fit to construct classification model. Provide X/Y inputs, number of epochs and batch size
  • Per each epoch, multiple operations are executed to find optimal model parameters to classify future input converted to array of 0/1
  • Batch size
    • Smaller batch size requires less memory. Especially important for datasets with large vocabulary
    • Typically networks train faster with smaller batches. Weights and network parameters are updated after each propagation
    • The smaller the batch the less accurate estimate of the gradient (function which describes the data) could be
Python implementation:


Step 4: Initial Model Testing
  • Tokenise input sentence - split it into array of words
  • Create bag of words (array with 0/1) for the input sentence - array equal to the size of vocabulary, with 1 for each word found in input sentence
  • Run model.predict with given bag of words array, this will return probability for each intent
Python implementation:


Step 5: Reuse Trained Model
  • For better reusability, it is recommended to create separate TensorFlow notebook, to handle classification requests
  • We can reuse previously created DNN model, by loading it with TensorFlow pickle
Python implementation:


Step 6: Text Classification
  • Define REST interface, so that function will be accessible outside TensorFlow
  • Convert incoming sentence into bag of words array and run model.predict
  • Consider results with probability higher than 0.25 to filter noise
  • Return multiple identified intents (if any), together with assigned probability
Python implementation:

Performance Tuning: Tracing Over a DB Link

Tom Kyte - Mon, 2018-07-30 12:06
hi Team, currenlty in our environment i see many query execute on dblink . we face performacne problem over their , can you let us know how we can trace sqlid of those sql's which are running remotely and how to figure out their bind variables...
Categories: DBA Blogs

CLOB and BLOB datatypes !

Tom Kyte - Mon, 2018-07-30 12:06
Hi Tom, How are you ? My Question to you is as follows :- If you have a column of type CLOB or BLOB in a table Is it possible to view the contents of this column in the select statement ? Is it possible to insert data into these col...
Categories: DBA Blogs

Iterating Logic

Tom Kyte - Mon, 2018-07-30 12:06
Hi I am trying to write a SQL query that computes the values of a column(mmwl) as follows. For the DDL and DML scripts please check the livesql link <code> create table t (y date, value_pvt int, mmwl int); --sample data to generate a rec...
Categories: DBA Blogs

Hierarchical Design Patterns

Tom Kyte - Mon, 2018-07-30 12:06
There are several Database design patterns floating around for various application usages. Tree and Hierarchy Patterns are one of those. I see most of the hierarchy patterns implemented as a self referencing table. There are also other implementa...
Categories: DBA Blogs

Quarterly EBS Upgrade Recommendations: July 2018 Edition

Steven Chan - Mon, 2018-07-30 12:01

We've previously provided advice on the general priorities for applying EBS updates and creating a comprehensive maintenance strategy.   

Here are our latest upgrade recommendations for E-Business Suite updates and technology stack components.  These quarterly recommendations are based upon the latest updates to Oracle's product strategies, latest support timelines, and newly-certified releases

You can research these yourself using this Note:

Upgrade Recommendations for July 2018

  EBS 12.2  EBS 12.1  EBS 12.0  EBS 11.5.10 Check your EBS support status and patching baseline

Apply the minimum 12.2 patching baseline
(EBS 12.2.3 + latest technology stack updates listed below)

In Premier Support to September 30, 2023

Apply the minimum 12.1 patching baseline
(12.1.3 Family Packs for products in use + latest technology stack updates listed below)

In Premier Support to December 31, 2021

In Sustaining Support. No new patches available.

Upgrade to 12.1.3 or 12.2

Before upgrading, 12.0 users should be on the minimum 12.0 patching baseline

In Sustaining Support. No new patches available.

Upgrade to 12.1.3 or 12.2

Before upgrading, 11i users should be on the minimum 11i patching baseline

Apply the latest EBS suite-wide RPC or RUP

12.2.7
Sept. 2017

12.1.3 RPC5
Aug. 2016

12.0.6

11.5.10.2
Use the latest Rapid Install

StartCD 51
Feb. 2016

StartCD 13
Aug. 2011

12.0.6


11.5.10.2

Apply the latest EBS technology stack, tools, and libraries

AD/TXK Delta 10
Sept. 2017

FND
Apr. 2017

EBS 12.2.6 OAF Update 13
July 2018

EBS 12.2.5 OAF Update 20
July 2018

EBS 12.2.4 OAF Update 19
May 2017

ETCC
Apr. 2018

Web Tier Utilities 11.1.1.9

Daylight Savings Time DSTv28
Nov. 2016

Upgrade to JDK 7

Web ADI Bundle 5
Jan. 2018

Report Manager Bundle 5
Jan. 2018

FND
Apr. 2017

OAF Bundle 5
Jun. 2016

JTT Update 4
Oct. 2016

Daylight Savings Time DSTv28
Nov. 2016

Upgrade to JDK 7

 

 

Apply the latest security updates

July 2018 Critical Patch Update

SHA-2 PKI Certificates

SHA-2 Update for Web ADI & Report Manager to Feb 2020

Migrate from SSL or TLS 1.0 to TLS 1.2

Sign JAR files

July 2018 Critical Patch Update

SHA-2 PKI Certificates

SHA-2 Update for Web ADI & Report Manager to Feb 2020

Migrate from SSL or TLS 1.0 to TLS 1.2

Sign JAR files

Oct. 2015 Critical Patch Update April 2016 Critical Patch Update Use the latest certified desktop components

Use the latest JRE 1.8, 1.7, or 1.6 release that meets your requirements.

Switch to Java Web Start

Upgrade to IE 11

Upgrade to Firefox ESR 60

Upgrade Office 2003 and Office 2007 to later Office versions (e.g. Office 2016)

Upgrade Windows XP and Vista and Win 10v1507 to later versions (e.g. Windows 10v1607)

Use the latest JRE 1.8, 1.7, or 1.6 release that meets your requirements

Switch to Java Web Start

Upgrade to IE 11

Upgrade to Firefox ESR 60

Upgrade Office 2003 and Office 2007 to later Office versions (e.g. Office 2016)

Upgrade Windows XP and Vista and Win 10v1507 to later versions (e.g. Windows 10v1607)

    Upgrade to the latest database Database 11.2.0.4 or 12.1.0.2 Database 11.2.0.4 or 12.1.0.2 Database 11.2.0.4 or 12.1.0.2 Database 11.2.0.4 or 12.1.0.2 If you're using Oracle Identity Management

Upgrade to Oracle Access Manager 11.1.2.3

Upgrade to Oracle Internet Directory 11.1.1.9

Migrate from Oracle SSO to OAM 11.1.2.3

Upgrade to Oracle Internet Directory 11.1.1.9

    If you're using Oracle Discoverer

Migrate to Oracle
Business Intelligence Enterprise Edition (OBIEE), Oracle Business
Intelligence Applications (OBIA).

Discoverer 11.1.1.7 is in Sustaining Support as of June 2017

Migrate to Oracle
Business Intelligence Enterprise Edition (OBIEE), Oracle Business
Intelligence Applications (OBIA).

Discoverer 11.1.1.7 is in Sustaining Support as of June 2017

    If you're using Oracle Portal Migrate to Oracle WebCenter  11.1.1.9 Migrate to Oracle WebCenter 11.1.1.9 or upgrade to Portal 11.1.1.6 (End of Life Jun. 2017).

 

 
Categories: APPS Blogs

Patching ODA lite to 12.2.1.4.0

Yann Neuhaus - Mon, 2018-07-30 10:30

Here is how to apply the latest patch for your ODA. As usual the Oracle documentation is not 100% accurate. I applied this patch on 2 ODAs X7-2M previously deployed in 12.2.1.2.0, no intermediate patch was needed.

1) Download the patch

The patch number is 28216794. This patch will update the following components:  dcs (odacli), operating system, bios/firmwares, ilom, GI, dbhomes and databases.
Download and copy the patch to a temporary folder on the server, for example /opt/patch. You’ll have to be root to apply the patch.

2) Check the actual versions and free space on disk

First check the current version:

odacli describe-component

System Version
---------------
12.2.1.2.0

Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
OAK                                       12.2.1.2.0            up-to-date
GI                                        12.2.0.1.171017       up-to-date
DB {
[ OraDB12201_home1 ]                      12.2.0.1.171017       up-to-date
[ OraDB11204_home1 ]                      11.2.0.4.171017       up-to-date
}
DCSAGENT                                  12.2.1.2.0            up-to-date
ILOM                                      4.0.0.28.r121827      4.0.0.22.r120818
BIOS                                      41017600              41017100
OS                                        6.8                   up-to-date

The “available version” stands for “what’s available in the ODA repository?”. As this ODA has never been patched, it seems that some of the components are already in newer versions than those provided in the initial deployment package. Registering a new patch will refresh this repository.

Check that folders /, /u01 and /opt have enough free GB to process (>=10GB).

3) Prepare the patch files

Previous patch was slightly different from the others because Oracle simply forgot to double zip the file 2 and 3 of the patch. Now this patch is back to a more classic update: unzip and register the 3 unzipped files (they are zip files, too).

cd /opt/patch
unzip p28216794_122140_Linux-x86-64_1of3.zip
unzip p28216794_122140_Linux-x86-64_2of3.zip
unzip p28216794_122140_Linux-x86-64_3of3.zip

odacli update-repository -f /tmp/oda-sm-12.2.1.4.0-180708-server1of3.zip
odacli update-repository -f /tmp/oda-sm-12.2.1.4.0-180708-server2of3.zip
odacli update-repository -f /tmp/oda-sm-12.2.1.4.0-180708-server3of3.zip

Updating the repository, as other tasks through odacli, will generate a job-id you can look at to confirm that everything is running fine:

odacli describe-job -i "4087f0f4-2582-4621-b75c-59c9915a0cb5"

Job details
----------------------------------------------------------------
                     ID:  4087f0f4-2582-4621-b75c-59c9915a0cb5
            Description:  Repository Update
                 Status:  Success
                Created:  July 19, 2018 10:32:53 AM CEST
                Message:  oda-sm-12.2.1.4.0-180703-server1of3.zip

Note: you can update the repository with a single update-repository command including the 3 files. But it’s better to do the update separately in case of a corrupted file.

New feature with this patch, you can check if your system is ready for patching with this command:

odacli create-prepatchreport -s -v 12.2.1.4.0
odacli describe-prepatchreport -i f45f9750-ec9b-411f-ba53-43205cb17f87

4) Update the dcs-agent

First, you’ll have to update the dcs-agent:

/opt/oracle/dcs/bin/odacli update-dcsagent -v 12.2.1.4.0

odacli describe-job -i "5cc9174e-bd7a-435d-aaff-0113e9ab01bc"

Job details
----------------------------------------------------------------
                     ID:  5cc9174e-bd7a-435d-aaff-0113e9ab01bc
            Description:  DcsAgent patching
                 Status:  Success
                Created:  July 19, 2018 10:36:18 AM CEST
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Patch location validation                July 19, 2018 10:36:18 AM CEST      July 19, 2018 10:36:19 AM CEST      Success
dcs-agent upgrade                        July 19, 2018 10:36:19 AM CEST      July 19, 2018 10:36:19 AM CEST      Success

This update takes only few seconds. Check again the version and you will see a new 18c component:

odacli describe-component

System Version
---------------
12.2.1.4.0

Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
OAK                                       12.2.1.2.0            12.2.1.4.0
GI                                        12.2.0.1.171017       12.2.0.1.180417
DB {
[ OraDB12201_home1 ]                      12.2.0.1.171017       12.2.0.1.180417
[ OraDB11204_home1 ]                      11.2.0.4.171017       11.2.0.4.180417
}
DCSAGENT                                  18.2.1.0.0            up-to-date
ILOM                                      4.0.0.28.r121827      4.0.2.20.b.r123704
BIOS                                      41017600              41021300
OS                                        6.8                   6.9
FIRMWARECONTROLLER                        QDV1RE0F              qdv1re14

5) Update the server

Updating the server will update OS, ILOM, BIOS, firmwares and the GI. Update process will assume that no additionnal packages have been installed. If you installed additionnal packages, please remove them as they can prevent the patch to apply correctly.

This part of the update is the longest one (about 1 hour), and will end with a reboot of the server.

odacli update-server -v 12.2.1.4.0

odacli describe-job -i "a2e296c2-1b3e-4ed1-a5cc-0cb7c4d23120"

Job details
----------------------------------------------------------------
                     ID:  a2e296c2-1b3e-4ed1-a5cc-0cb7c4d23120
            Description:  Server Patching
                 Status:  Success
                Created:  July 19, 2018 12:12:53 PM CEST
                Message:

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Patch location validation                July 19, 2018 12:12:53 PM CEST      July 19, 2018 12:12:53 PM CEST      Success
dcs-controller upgrade                   July 19, 2018 12:12:54 PM CEST      July 19, 2018 12:12:54 PM CEST      Success
Patch location validation                July 19, 2018 12:12:54 PM CEST      July 19, 2018 12:12:54 PM CEST      Success
dcs-cli upgrade                          July 19, 2018 12:12:54 PM CEST      July 19, 2018 12:12:54 PM CEST      Success
Creating repositories using yum          July 19, 2018 12:12:54 PM CEST      July 19, 2018 12:12:55 PM CEST      Success
Applying HMP Patches                     July 19, 2018 12:12:55 PM CEST      July 19, 2018 12:14:31 PM CEST      Success
Patch location validation                July 19, 2018 12:14:31 PM CEST      July 19, 2018 12:14:31 PM CEST      Success
oda-hw-mgmt upgrade                      July 19, 2018 12:14:31 PM CEST      July 19, 2018 12:14:31 PM CEST      Success
Creating repositories using yum          July 19, 2018 12:14:31 PM CEST      July 19, 2018 12:14:35 PM CEST      Success
Applying OS Patches                      July 19, 2018 12:14:35 PM CEST      July 19, 2018 12:16:18 PM CEST      Success
OSS Patching                             July 19, 2018 12:16:18 PM CEST      July 19, 2018 12:16:18 PM CEST      Success
Applying Firmware Disk Patches           July 19, 2018 12:16:18 PM CEST      July 19, 2018 12:16:23 PM CEST      Success
Applying Firmware Expander Patches       July 19, 2018 12:16:23 PM CEST      July 19, 2018 12:16:26 PM CEST      Success
Applying Firmware Controller Patches     July 19, 2018 12:16:26 PM CEST      July 19, 2018 12:16:30 PM CEST      Success
Checking Ilom patch Version              July 19, 2018 12:16:31 PM CEST      July 19, 2018 12:16:33 PM CEST      Success
Patch location validation                July 19, 2018 12:16:33 PM CEST      July 19, 2018 12:16:34 PM CEST      Success
Apply Ilom patch                         July 19, 2018 12:16:35 PM CEST      July 19, 2018 12:16:36 PM CEST      Success
Copying Flash Bios to Temp location      July 19, 2018 12:16:37 PM CEST      July 19, 2018 12:16:37 PM CEST      Success
Starting the clusterware                 July 19, 2018 12:16:57 PM CEST      July 19, 2018 12:16:58 PM CEST      Success
clusterware patch verification           July 19, 2018 12:16:58 PM CEST      July 19, 2018 12:17:00 PM CEST      Success
Patch location validation                July 19, 2018 12:17:00 PM CEST      July 19, 2018 12:17:03 PM CEST      Success
Opatch updation                          July 19, 2018 12:17:33 PM CEST      July 19, 2018 12:17:35 PM CEST      Success
Patch conflict check                     July 19, 2018 12:17:35 PM CEST      July 19, 2018 12:18:16 PM CEST      Success
clusterware upgrade                      July 19, 2018 12:18:16 PM CEST      July 19, 2018 12:33:07 PM CEST      Success
Updating GiHome version                  July 19, 2018 12:33:07 PM CEST      July 19, 2018 12:33:11 PM CEST      Success
preRebootNode Actions                    July 19, 2018 12:33:30 PM CEST      July 19, 2018 12:34:11 PM CEST      Success
Reboot Ilom                              July 19, 2018 12:34:11 PM CEST      July 19, 2018 12:34:11 PM CEST      Success

If there is a problem during the patching process (you forgot to remove an additionnal rpm or one of the patch file is missing for example), you can relaunch the patching and it will skip the already patched components.

Once this part of the patch is successfuly applied, check again the components:

odacli describe-component

System Version
---------------
12.2.1.4.0

Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
OAK                                       12.2.1.4.0            up-to-date
GI                                        12.2.0.1.180417       up-to-date
DB {
[ OraDB12201_home1 ]                      12.2.0.1.171017       12.2.0.1.180417
[ OraDB11204_home1 ]                      11.2.0.4.171017       11.2.0.4.180417
}
DCSAGENT                                  18.2.1.0.0            up-to-date
ILOM                                      4.0.2.20.b.r123704    up-to-date
BIOS                                      41017600              41021300
OS                                        6.9                   up-to-date
FIRMWARECONTROLLER                        QDV1RE14              up-to-date

Note: at this time, BIOS is not yet updated. Don’t know why but check this later and it will be OK.

6) Patch the dbhomes

You now need to patch the dbhomes separately. First of all, list them:

odacli list-dbhomes

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
90556d26-6756-4fed-9546-d44d55b6fc04     OraDB11204_home1     11.2.0.4.171017 (26609929, 26392168)     /u01/app/oracle/product/11.2.0.4/dbhome_1     Configured
18a9c067-3629-409d-9bae-60d27516c914     OraDB12201_home1     12.2.0.1.171017 (27020386, 26710464)     /u01/app/oracle/product/12.2.0.1/dbhome_1     Configured

Patch the first one. Target version is actually version of the patch. Remember that updating the ODA through a patch will never upgrade your database to a newer release, your 11gR2 databases will stay in 11.2.0.4 and 12cR1 databases will stay in 12.1.0.2 (if you’re using one or both of these versions). Only the PSU number will change (the fifth number which is actually a date).

odacli update-dbhome -i 90556d26-6756-4fed-9546-d44d55b6fc04 -v 12.2.1.4.0

odacli describe-job -i "c1abf083-d597-4673-b07b-d7cb79ec434a"

Job details
----------------------------------------------------------------
                     ID:  c1abf083-d597-4673-b07b-d7cb79ec434a
            Description:  DB Home Patching: Home Id is 90556d26-6756-4fed-9546-d44d55b6fc04
                 Status:  Success
                Created:  July 19, 2018 12:59:11 PM CEST
                Message:  WARNING::Failed to run the datapatch as db DB03_S2 is not registered with clusterware##WARNING::Failed to run the datapatch as db DB04_S2 is not registered with clusterware##WARNING::Failed to run the datapatch as db DB05_S2 is not r

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
clusterware patch verification           July 19, 2018 12:59:12 PM CEST      July 19, 2018 12:59:15 PM CEST      Success
Patch location validation                July 19, 2018 12:59:15 PM CEST      July 19, 2018 12:59:19 PM CEST      Success
Opatch updation                          July 19, 2018 12:59:39 PM CEST      July 19, 2018 12:59:40 PM CEST      Success
Patch conflict check                     July 19, 2018 12:59:40 PM CEST      July 19, 2018 12:59:49 PM CEST      Success
db upgrade                               July 19, 2018 12:59:49 PM CEST      July 19, 2018 1:01:22 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:22 PM CEST       July 19, 2018 1:01:22 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:22 PM CEST       July 19, 2018 1:01:22 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:22 PM CEST       July 19, 2018 1:01:23 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:23 PM CEST       July 19, 2018 1:01:23 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:23 PM CEST       July 19, 2018 1:01:23 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:23 PM CEST       July 19, 2018 1:01:23 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:23 PM CEST       July 19, 2018 1:01:23 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:23 PM CEST       July 19, 2018 1:01:24 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:24 PM CEST       July 19, 2018 1:01:24 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:24 PM CEST       July 19, 2018 1:01:24 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:24 PM CEST       July 19, 2018 1:01:24 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:24 PM CEST       July 19, 2018 1:01:24 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:01:24 PM CEST       July 19, 2018 1:01:25 PM CEST       Success

Despite the overall Success status, some database could stay in previous version for some reason:
– database is a StandBy database : no update is possible on the dictionary (dictionary will be updated when the primary server will be patched)
– database is not correctly registered in the Oracle Cluster repository (if you create the database with odacli in instance-only mode: create-database -io – Probably a bug)

After applying the patch, please check the version of your dictionary on each database with this statement :

select ACTION_TIME, ACTION, VERSION, ID, BUNDLE_SERIES, COMMENTS from  DBA_REGISTRY_HISTORY;
ACTION_TIME                    ACTION       VERSION                  ID BUNDLE_SERIES   COMMENTS
------------------------------ ------------ ---------------- ---------- --------------- ------------------------------
23/07/18 20:25:26,765974       APPLY        11.2.0.4             180417 PSU             PSU 11.2.0.4.180417

Then update the next dbhome:

odacli update-dbhome -i 18a9c067-3629-409d-9bae-60d27516c914 -v 12.2.1.4.0

odacli describe-job -i "ef53a8a6-bd74-40f6-a338-343489d41a1c"

Job details
----------------------------------------------------------------
                     ID:  ef53a8a6-bd74-40f6-a338-343489d41a1c
            Description:  DB Home Patching: Home Id is 18a9c067-3629-409d-9bae-60d27516c914
                 Status:  Success
                Created:  July 19, 2018 1:20:20 PM CEST
                Message:  WARNING::Failed to run datapatch on db DB12TST Failed to run Utlrp script##WARNING::Failed to run the datapatch as db DB12DEV: is not registered with clusterware

Task Name                                Start Time                          End Time                            Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
clusterware patch verification           July 19, 2018 1:20:41 PM CEST       July 19, 2018 1:20:42 PM CEST       Success
Patch location validation                July 19, 2018 1:20:42 PM CEST       July 19, 2018 1:20:42 PM CEST       Success
Opatch updation                          July 19, 2018 1:20:42 PM CEST       July 19, 2018 1:20:42 PM CEST       Success
Patch conflict check                     July 19, 2018 1:20:42 PM CEST       July 19, 2018 1:20:42 PM CEST       Success
db upgrade                               July 19, 2018 1:20:42 PM CEST       July 19, 2018 1:20:42 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:20:42 PM CEST       July 19, 2018 1:20:47 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:20:47 PM CEST       July 19, 2018 1:20:47 PM CEST       Success
SqlPatch upgrade                         July 19, 2018 1:20:47 PM CEST       July 19, 2018 1:21:03 PM CEST       Success

As previously patched dbhome, this one also has warnings. Please check if each database is OK.

Check the /opt/oracle/dcs/log/dcs-agent.log for extended warning messages if needed, and then check the DB Version after the update of all dbhomes:

odacli list-dbhomes

ID                                       Name                 DB Version                               Home Location                                 Status
---------------------------------------- -------------------- ---------------------------------------- --------------------------------------------- ----------
90556d26-6756-4fed-9546-d44d55b6fc04     OraDB11204_home1     11.2.0.4.180417 (27441052, 27338049)     /u01/app/oracle/product/11.2.0.4/dbhome_1     Configured
18a9c067-3629-409d-9bae-60d27516c914     OraDB12201_home1     12.2.0.1.180417 (27464465, 27674384)     /u01/app/oracle/product/12.2.0.1/dbhome_1     Configured

Jump to step 8 if your databases are OK.

7) Update the databases where datapatch failed

If for some reason datapatch was not applied on some of your databases and it should have been, you’ll have to do it manually:

For 12c :

su – oracle
. oraenv <<< DB12TST
cd $ORACLE_HOME/OPatch
./datapatch -verbose

For 11gR2 :

su – oracle
. oraenv <<< DB11TST
sqlplus / as sysdba
@?/rdbms/admin/catbundle.sql psu apply

8) Patch the storage

No update-storage is needed for this patch on this ODA.

9) Optional: deploy the latest db clone files

If you’ll never deploy a new dbhome this step is not necessary. If you will, or simply if you don’t know if you’ll have to do that later, download and register the new db clone files in the repository to be able to create a new dbhome at the same patch level than the one already deployed, for example:

cd /opt/patch

unzip p27119402_122140_Linux-x86-64.zip
Archive:  p27119402_122140_Linux-x86-64.zip
 extracting: odacli-dcs-12.2.1.4.0-180617-DB-12.2.0.1.zip
  inflating: README.txt

update-image --image-files odacli-dcs-12.2.1.4.0-180617-DB-12.2.0.1.zip
Unpacking will take some time,  Please wait...
Unzipping odacli-dcs-12.2.1.4.0-180617-DB-12.2.0.1.zip

10) Control the final version of the components

Now the patching is done. ±2 hours were needed, if everything is OK.

oodacli describe-component

System Version
---------------
12.2.1.4.0

Component                                Installed Version    Available Version
---------------------------------------- -------------------- --------------------
OAK                                       12.2.1.4.0            up-to-date
GI                                        12.2.0.1.180417       up-to-date
DB {
[ OraDB12201_home1 ]                      12.2.0.1.180417       up-to-date
[ OraDB11204_home1 ]                      11.2.0.4.180417       up-to-date
}
DCSAGENT                                  18.2.1.0.0            up-to-date
ILOM                                      4.0.2.20.b.r123704    up-to-date
BIOS                                      41021300              up-to-date
OS                                        6.9                   up-to-date
FIRMWARECONTROLLER                        QDV1RE14              up-to-date

11) Optional: patch the SFP firmware

If you’re using SFP network interfaces on your ODA X7 (fiber connected network), you may encounter network troubles (lost of pings, failover not working correctly, and so on). SFP are not part of the ODA patching process, but there is a firmware update available for those kind of SFP on Oracle X7 server familly (including ODA). Please review note 2373070.1 for more information :

Using the onboard SFP28 ports on an ODA X7-2 server node (Doc ID 2373070.1)

 

Cet article Patching ODA lite to 12.2.1.4.0 est apparu en premier sur Blog dbi services.

Some New Features of Oracle Instant Client 18.3

Christopher Jones - Mon, 2018-07-30 05:52

We released Oracle Database 18.3 for Linux last week. It (and the "full" Oracle Client) are downloadable from here. Read this to find out about some of the new database features.

Many of the readers of my blog have an equal interest in the "client side". You'll be happy that Oracle Instant Client 18.3 for Linux 64-bit and 32-bit is also available. Instant Client is just a rebundling of the Oracle client libraries and some tools. They are the same ones available with an Oracle Database installation or the "full" Oracle Client installation but installation is much simpler: you just unzip a file, or install an RPM package on Linux and use them to connect your applications to Oracle Database.

The "Oracle Client", in whatever install footprint you choose, covers a number of technologies and provides a lot of language APIs. The Instant Client packages contain these APIs and selected tools like SQL*Plus and Data Pump. I'll let those teams blow their own trumpets about the new release. Here I'll talk about some of the Oracle Client functionality that benefits the Oracle Oracle Call Interface (OCI) API for C programs, and all the scripting languages that use OCI:

  • My wider group's most exciting project in 18.3 is the Connection Manager (CMAN) Traffic Director mode whose sub-location in the Oracle manual is a sign of how the feature its transparent, and not indicative of the huge engineering effort that went into it. CMAN in Traffic Director Mode is a proxy between the database clients and the database instances. Supported OCI clients from Oracle Database 11g Release 2 (11.2) and later can connect to CMAN to get improved high availability (HA) for planned and unplanned database server outages, connection multiplexing support, and load balancing.

Cherry picking some notable Oracle Client 18c features that are available via OCI:

  • You probably know that Oracle Database 18c is really just a re-badged 12.2.0.2. Due to the major version number change and the new release strategy, there is a new OCIServerRelease2() call to get the database version number. The old OCIServerRelease() function will give just the base release information so use the new function to get the actual DB patch level. Why? Let's just say there were robust discussions about the upgrade and release cycles, and about handling the "accelerated" version change across the whole database product suite and how things like upgrade tools were affected.

  • Extracting Instant Client 18.3 ZIP files now pre-creates symbolic links for the C and C++ client libraries on relevant operating systems. Yay! One fewer install step.

  • Instant Client now also pre-creates a network/admin sub-directory to show where you can put any optional network and other configuration files such as tnsnames.ora, sqlnet.ora, ldap.ora, and oraaccess.xml. This directory will be used by default for any application that loads the related Oracle Client libraries.

  • Support for Client Result Caching with dynamic binds where descriptors are not involved and the bind length is less than 32768. Since scripting languages tend to use dynamic binds for character data this could be a big performance win for your lookup table queries.

  • Unique ID generation improvements. One little old gotcha, particularly in some hosted or cloud environments, were errors when Oracle applications tried to generate a unique key for your client. This manifested itself as an Oracle error when you tried to start a program. Workarounds included adding a hostname to /etc/hosts. There were improvements in Oracle Client 18c for unique key generation so the problem should be less common.

  • A new call timeout parameter can be enabled for C applications. This applies to post-connection round-trips to the database, making it easier to interrupt long running calls and satisfy application quality of service requirements. After you connect, each OCI call may make one of more round-trips to Oracle database:

    • If the time from the start of any one round-trip to the completion of that same round-trip exceeds the call timeout milliseconds, then the operation is halted and an Oracle error is returned.

    • In the case where an OCI call requires more than one round-trip and each round-trip takes less than the specified number of milliseconds, then no timeout will occur, even if the sum of all round-trip calls exceeds the call timeout value.

    • If no round-trip is required, the operation will never be interrupted.

    After a timeout has occurred, the connection must be cleaned up. This is allowed to run for the same amount of time as specified for the original timeout. For very small timeouts, if the cleanup fails, then an ORA-3114 is returned and the connection must be released. However if the cleanup is successful then an ORA-3136 is returned and the application can continue using the connection.

    You can see this will be most useful for interrupting SQL statements whose "execute" phase may take some time.

  • The OCI Session pool underlays many application connection pools (and if it doesn't underlay yours, then it should - ask me why). Improvements in 18c session pooling include some usability "do-what-I-mean" parameter size check tweaks, internal lock improvements, and a new attribute OCI_ATTR_SPOOL_MAX_USE_SESSION.

    One other change that was much debated during development is the OCISessionGet() behavior of OCI_SPOOL_ATTRVAL_NOWAIT mode when a pool has to grow. Prior to 18c, even though it was a 'no wait' operation, getting a connection would actually wait for the pool to grow. Some users didn't like this. Since creating connections could take a few moments they had no way to control the quality of service. Now in 18c the mode doesn't wait - if there's no free connection immediately available, then control is returned to the application with an error. If you are impacted by the new behavior, then look at using alternative session acquire modes like OCI_SPOOL_ATTRVAL_TIMEDWAIT. Or better, keep your pool a constant size so it doesn't need to grow, which is what is recommended by Oracle's Real World Performance Group.

  • SODA support. Simple Oracle Document Access (SODA) that was previously only available via JDBC is now available in OCI. Yum. Let's see what we can do with this now it's in C. More on this later.

I hope this has given you a taste of some Oracle Client 18c changes and given you links to explore more. Don't forget that much new database functionality is available to clients transparently or via SQL and PL/SQL.

Finally, remember that Oracle has client-server version interoperability so 18c OCI programs can connect to Oracle Database 11.2 or later. It's time to upgrade your client!

FAQ: Webinars for “Oracle Indexing Internals and Best Practices”

Richard Foote - Mon, 2018-07-30 05:01
I’ve been somewhat inundated with questions regarding the “Oracle Indexing Internals and Best Practices” webinar series I’ll be running in October and November since I announced both webinar series last week. So I’ve compiled the following list of frequently asked questions which I’m hoping will address most of those asked. If you have any additional […]
Categories: DBA Blogs

Partner Webcast – Enforcing in-depth Data protection & privacy with Database Security ...

Databases continue to be the most attractive targets for attackers because they are the information store with all the sensitive data. Oracle Databases hold the majority of the world’s...

We share our skills to maximize your revenue!
Categories: DBA Blogs

Network Slowness Caused Database Contention That Caused Goldengate Lag

Pakistan's First Oracle Blog - Mon, 2018-07-30 00:55
I got paged for a goldengate extract lagging behind. Checked the extract configuration and it was normal extract and it seemed stuck without giving any error in the ggserr.log or anywhere else. It wasn't abended either and was in running state.


Tried stopping and restating it, but still it remained in running state while doing nothing and lag was increasing. So the issue was clearly outside of goldengate. Checked the database by starting from alert log and didn't see any errors there either.

Jumped into the database and ran some queries to see which sessions were active and what they were running. After going through various active sessions, turned out that few of them were doing long transactions over a dblink and these sessions were several hours old and seemed stuck. These sessions were also inducing widespread delay on the temp tablespace and were blocking other sessions. Due to undersized temp plus these stuck long running transactions, database performance was also slower than usual.

Ran a select statement over that dblink and it was very slow. Used tnsping to ping that database remotely and it returned with delay. Then used network commands like ping, tracert, etc to check network status and it all was pointing to delay in network.

Killed the long running transaction as it was going nowhere, and that eased the pressure on temp tablespace, which in return enabled extract to finish off the lag.
Categories: DBA Blogs

Log Buffer #546: A Carnival Of The Vanities For DBAs

Pakistan's First Oracle Blog - Mon, 2018-07-30 00:38
This Log Buffer Edition covers Cloud, Oracle, and PostgreSQL.
Cloud:
Google Maps platform now integrated with the GCP Console
Getting more value from your Stackdriver logs with structured data
Improving application availability with Alias IPs, now with hot standby
Performing a large-scale principal component analysis faster using Amazon SageMaker
Optimized TensorFlow 1.8 now available in the AWS: deep learning AMIs to accelerate training on Amazon EC2 C5 and P3 instances


Oracle:
Using GoldenGate LogDump to find bad data
Partition-Wise Operations: new features in 12c and 18c
SOA Suite 12c in Docker containers: only a couple of commands, no installers, no third party scripts
Checking if the current user is logged into Application Builder
PostgreSQL:
Let’s start out with some fun! I really enjoyed Wendy Kuhn‘s article on May 5 about the history of PostgreSQL. She starts out by relaying the importance of learning the history behind new technical tools & concepts when you’re learning. I couldn’t agree more.
Speaking of history, I’ve been waiting for the right time to mention this fun article from August 2016. Now is the time, because it relates to the previous article and because I saw a few retweets last week mentioning it. Did you ever wonder why the PostgreSQL logo is an elephant? Or what his name is?? Or even better – did turtles or cheetahs ever represent PostgreSQL???? Patrycja Dybka answers these questions and more. Check it out!
Ok, moving on to the serious stuff. :) First off, we’ve got a new round of minor releases of PostgreSQL. Version 10.4, 9.6.9, etc, were released on May 10. Time to start planning those upgrade cycles!
Next up, JD posted a nice summary of PGConf US in New Jersey on May 7. I saw a lot of familiar faces in his pictures! One quick call-out: I heard good things about the speed mentoring at the career fair. I think that was a great idea. (Among many at PGConf.)
Another interesting thing JD touched on in his blog post was the growing role of larger companies in the community. He gave a few specific examples related to Google and Microsoft. Back on April 17, Pivotalpublished an article listing a number of specific ways they contribute to PostgreSQL development, as well.
Speaking of cloud companies, who doesn’t like a nice rowdy comparison? Over on the SeveralNines blog, we got exactly that on May 1: a quick side-by-side comparison of a few of the many cloud providers who ship PostgreSQL. There are a bunch more – feel free to leave comments on their blog post with the providers they left out!
As long as we’re doing comparisons, I saw this old website on Twitter last week, and it’s fun enough to pass along. Thomas Kellerer from Germany wrote a nice open-source tool called SQL Workbench/J. In the process of supporting many different databases, he’s learned a lot about the differences between them. And his website has a really detailed list. Check out this list of SQL features by database – PostgreSQL is looking good!
I always enjoy a good story. Singapore-based Ashnik recently published a new case study about a global insurance company who deployed a bank data exchange system on PostgreSQL: a fine example of the serious business that runs on PostgreSQL every day.
Moving into the technology space, infrastructure company Datrium has recently published a series of interesting articles about the benchmarking and heavyweight workloads they’re throwing at PostgreSQL. The most recent article on April 25 discusses PostgreSQL on bare metal and it has links to many previous articles.
In the category of query tuning, how would you like to make a small tweak to your schema and SQL, then experience a 290x speedup? That’s exactly what happened to Yulia Oletskaya! She writes about it in this article on May 7.
“What’s common between DBA and detective? They both solve murder and mystery while trying to make sense of the nonsense.” That’s the first sentence of Alexey Lesovsky’s April 17 article about troubleshooting a PostgreSQL crash.
Going a little deeper, I have a handful of recent articles about specific database features in PostgreSQL.
First, how about a demonstration of PostgreSQL’s top-notch built-in support for full-text search? What better example than analyzing the public email of PostgreSQL contributor Tom Lane to find what his waking hours are? Turns out that he’s very consistent. In fact, it turns out you can use Tom Lane’s consistent email habits to spot server timezone misconfigurations.
Citus also published a nice article back at the beginning of April about row-level security. I didn’t include it last month but it’s worth mentioning now. PostgreSQL’s capabilities here are quite nice.
My past newsletters have been following Dimitri Fontaine’s series on PostgreSQL data types. We’ve got three new ones this time around: JSONEnum and Point types.
A big selling point for PostgreSQL is its extensibility. On May 8, Luca Ferrari from Italy published an article in BSD magazine which walked through the process of building a customer extension to provide a new foreign data wrapper that connects the database directly to a file system data source.
Our friends at Timescale put out an article about streaming replication on May 3. Lee Hampton gives one of the best descriptions of this critical HA concept that I’ve seen anywhere.
Finally, can a week go by without new articles about vacuum in PostgreSQL? It seems not!
On Apr 30, Jorge Torralba published an article on DZone about tuning autovacuum. He has a specific focus on bloat, which is an important reason for vacuuming. There are some nice examples here.
And back on April 3, Emily Chang from Datadog published perhaps one of the most detailed articles about vacuum that I’ve seen. Well worth reviewing.
To close up this edition: something a little different. This year marks the 15th anniversary of pgpool. And Tatsuo Ishii reminded us with a blog post on April 15.
So in honor of the 15th aniversary, let’s collect a few recent links *just* about pgpool!
Tatsuo also published two other articles in April about various features of pgpool:
And Vladimir Svedov at severalnines published a two-part series on pgpool in April as well.
And that’s a wrap for this week. Likely more content than you’ll have time for, as usual! My job here is done. :)

Originally posted at https://blog.pythian.com/log-buffer-546-carnival-vanities-dbas/
Categories: DBA Blogs

Pages

Subscribe to Oracle FAQ aggregator