Oracle 18c installation in Linux

in this blog post i will describe the necessary steps to install Oracle 18c in Linux Red Hat.

First, pre-requisite steps:

check that all packages required are installed, check the following link as reference:

https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/supported-red-hat-enterprise-linux-7-distributions-for-x86-64.html#GUID-2E11B561-6587-4789-A583-2E33D705E498

Kernel values: https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/changing-kernel-parameter-values.html#GUID-FB0CC366-61C9-4AA2-9BE7-233EB6810A31

Another way to check pre-requisites is ORACHK tool , this tool can be downloaded from Oracle Support Doc ID 1268927.2.

copy the zip folder downloaded for ORACHK to database file system:

unzip orachk.zip

To check Installation Readiness, execute the following:

./orachk -profile preinstall

To check Upgrade Readiness, execute the following:

./orachk -u -o pre

Second, Installation using GUI:

reconfigure your profile to point to Oracle 18c binaries (new home).

use the following command to unzip the binaries:

unzip -q /oracle/app/LINUX.X64_180000_db_home.zip -d /oracle/ora15/product/18.3

 

cd /oracle/ora15/product/18.3

./runInstaller

11

22

33

44

55

66

77

88

Third, Silent Installation Option:

please note that you need to edit(modify) the file db_reponse_tmp.rsp located under $ORACLE_HOME/install/response

*** checking prerequisites before installation :

$ORACLE_HOME/runInstaller -silent -executePrereqs -responseFile $ORACLE_HOME/install/response/db_reponse_tmp.rsp

*** Silent Installation :

$ORACLE_HOME/runInstaller -silent -responseFile $ORACLE_HOME/install/response/db_reponse_tmp.rsp

 

you will need to run root.sh

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Applying RU (Release Update) to Oracle 18c

Since Oracle 12cR2 RU(Release Update) and RUR (Release Update Revision) was introduced by Oracle for patching every quarter.

The following is the guide in how to apply RU to Oracle 18c release, as you might know Oracle introduced 18c on-premise with 18.3 release….here i am applying January 2019 Oracle Security Patch release which is 18.5.

its worth pointing out that you might face patching issues…..check the below helpful references i blogged about it before:

https://geodatamaster.com/2018/07/19/oracle-psu-july-2018-error-ora-20001-latest-xml-inventory-is-not-loaded-into-table/

https://geodatamaster.com/2018/11/04/oracle-ojvm-psu-error/

download the latest RU patch and place it in a directory accessible by your database server:

cd /oracle-app/linux/18c_RU/18.5_DB/28822489

/$ORACLE_HOME/OPatch/opatch apply

opatch2

opatch222

sqlplus / as sysdba

SQL> STARTUP

exit

cd $ORACLE_HOME/OPatch

./datapatch -verbose

datapatch1

*** Post-Patch verification:

sqlplus / as sysdba
SQL> @?/rdbms/admin/utlrp.sql
//check your database components

SQL> select COMP_NAME,STATUS from dba_registry;
// query to list applied patches on the database instance:

SQL > select * from dba_registry_sqlpatch;

dba_registry_sqlpatch1

so the database has been successfully patched with full release number 18.5.0.0190115

if your database has “java” component, you need to download the java patch (OJVM) and repeat the above steps….except that you will startup the database in upgrade mode before running the data-patch.

I hope this is helpful……have a nice day.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

JVM Corruption and ORA-7445

The intention of this blog is to share a problem faced in a production instance. its strongly advised when you face ORA-7445 error is to contact Oracle Support and open a case with them.

So, my objective is to help here ….

what are the symptoms faced ?

Database version is 12cR1 (12.1.0.2.181016)

Database Alert log file has the following errors:

Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x7440038090] [PC:0x7FEA4DB100D4, java_nio_Bits__byteOrder()+204] [flags: 0x0, count: 1]

DDE: Problem Key ‘ORA 7445 [java_nio_Bits__byteOrder]’ was completely flood controlled (0x6) Further messages for this problem key will be suppressed for up to 10 minutes

When executing SQL Scripts using sqlplus….for example utlrp.sql the following errors were thrown:

SQL> @/rdbms/admin/utlrp.sql
ERROR at line 1:
ORA-03113: end-of-file on communication channel 

Process ID: 105404
Session ID: 2878 Serial number: 20833

Errors received from application side deployed in weblogic:

No More Data To Read From Socket

 

The reason of such symptoms is JVM Corruption !

To resolve this issue:

 

  1. Check JVM status by executing the following script:

 

spool jvm_info.log
—— REGISTRY INFO ——
SELECT SUBSTR(comp_name, 1, 30) comp_name, SUBSTR(version, 1, 20) version, status
FROM dba_registry
ORDER BY comp_name;
—— REGISTRY HISTORY ——-
SELECT TO_CHAR(action_time, ‘DD-MON-YYYY HH24:MI:SS’) act_time, action, version, id, comments
FROM dba_registry_history
ORDER BY action_time DESC;

—— JAVA OBJECT INFO ——
— Are there a substantial number of VALID Java objects in SYS?
SELECT owner, object_type, status, COUNT(*)
FROM dba_objects
WHERE object_type LIKE ‘%JAVA%’
GROUP BY owner, object_type, status
ORDER BY owner, object_type, status;
— Is the DBMS_JAVA package VALID?
SELECT owner, object_name, object_type, status
FROM dba_objects
WHERE object_name LIKE ‘DBMS_JAVA%’
OR object_name LIKE ‘%INITJVMAUX%’
ORDER BY owner, object_name, object_type;
— Are there any INVALID Java objects in SYS?
SELECT owner, NVL(longdbcs,object_name) long_name, object_type, status
FROM dba_objects, sys.javasnm$
WHERE object_type LIKE ‘%JAVA%’
AND status <> ‘VALID’
AND short (+) = object_name
ORDER BY owner, long_name, object_type;
—— JAVA ROLE INFO ——
— The number expected varies by release.
SELECT role
FROM dba_roles
WHERE role LIKE ‘%JAVA%’
ORDER BY role;
—— MEMORY INFO ——
SELECT *
FROM v$sgastat
WHERE pool = ‘java pool’ OR name = ‘free memory’
ORDER BY pool, name;
—— DATABASE PARAMETER INFO ——
show parameter pool_size
show parameter target
show parameter sga
—— TEST JAVAVM USAGE (and return the JDK version if > 11g) ——
— Calling routines in DBMS_JAVA will invoke the JavaVM and expose certain problems.
SET SERVEROUTPUT ON
DECLARE
ver NUMBER := 0;
val VARCHAR2(30);
BEGIN
BEGIN
SELECT TO_NUMBER( SUBSTR(version, 1, 2) )
INTO ver
FROM dba_registry
WHERE comp_name = ‘JServer JAVA Virtual Machine’;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
IF ver >= 12 THEN
EXECUTE IMMEDIATE
‘SELECT ”JDK version is ” ||
dbms_java.get_jdk_version() FROM dual’
INTO val;
ELSE
val := dbms_java.longname(‘JDK version not available’);
END IF;
dbms_output.put_line(val);
END;
/

spool off;

  1. Repair JVM:

 

**** Note down the current value of parameters JAVA_JIT_ENABLED & JOB_QUEUE_PROCESSES

 

spool create_Java.log

set echo on

connect / as sysdba

Alter system set JAVA_JIT_ENABLED=FALSE scope=both;

alter system set “_system_trig_enabled” = false scope=memory;

alter system set JOB_QUEUE_PROCESSES=0;

create or replace java system

/

@?/rdbms/admin/utlrp.sql

set echo off

spool off

exit

Then reset it back to original values you noted down:

SQL> alter system set java_jit_enabled = true;

SQL> alter system set “_system_trig_enabled”=TRUE;

SQL> alter system set JOB_QUEUE_PROCESSES=50;

SQL> @?/rdbms/admin/utlrp.sql

  1. Test that everything is ok:

 

Check database components

SQL> select * from dba_registry;

SQL> SELECT dbms_java.longname(‘TEST’) long_name FROM dual;

 

 

 

 

 

 

 

 

 

 

 

Oracle database premier support for Oracle 12cR1,12cR2,18c,19c

As a DBA you need to regularly check and review Oracle Support Matrix especially if you have a big infrastructure with mixed Oracle database releases. Also, its very important from a cost perspective as (it depends on your contract with Oracle), to avoid “Paid Extended Support”.

What can be read from different Oracle resource 18c & 19c are considered under 12.2 release umbrella.

To the date of writing this blog (December 15 2018), the following are support dates:

Oracle Support Dates

So 19c is considered the long term support !

Resources:

Release Schedule of Current Database Releases (Doc ID 742060.1)

https://mikedietrichde.com/2018/12/14/premier-support-extension-for-oracle-19c-and-more/

 

Oracle 18c sqlplus new features

This is a short blog about new features introduced in Oracle 18c sqlplus ….that could be helpful for you !

SET ROWLIMIT

The objective of this command is to display certain number of rows, especially with large tables

 

In the below example the COUNTRIES table has 25 records, when I set ROWLIMIT to 3 , only three rows will be displayed when querying the table (the first 3 rows)

Picture1

The below command will display the current setting:

Picture2

SET FEEDBACK ON SQL_ID

This command will return the sql_id for the SQL or PL/SQL statements that is currently being executed. This will consequently help in debugging activities.

As shown below the executed query will generate the SQL_ID with the query result:

Picture3

You can check it from v$sql by executing:

SQL> SELECT sql_text,sql_id FROM v$sql WHERE sql_id = ‘agjjdvhgdzd1q’;

Picture4

 

 

 

 

Oracle OJVM PSU Error

i am sharing a strange error faced while patching Oracle 12cR1 database on Linux with JAVA component (Please note that i am using OPatch utility version 12.2.0.1.14)

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files…

Applying interim patch ‘28440711’ to OH ‘/app/oracle/product/12.1.0.2’

ApplySession: Optional component(s) [ oracle.sqlj, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.

ApplySession failed but Oracle Home has not been modified.null

UtilSession failed: ApplySession failed but Oracle Home has not been modified.null

Log file location: /app/oracle/product/12.1.0.2/cfgtoollogs/opatch/opatch2018-10-26_00-39-02AM_1.log

OPatch failed with error code 73

opening the log file:

cat /app/oracle/product/12.1.0.2/cfgtoollogs/opatch/opatch2018-10-26_00-39-02AM_1.log

[Oct 26, 2018 12:39:03 AM] [INFO] CUP_LOG: Trying to load HomeOperations object

[Oct 26, 2018 12:39:03 AM] [INFO] CUP_LOG: HomeOperations provider not available

[Oct 26, 2018 12:39:03 AM] [INFO] CUP_LOG: This is unusual state. HomeOperations object is null, but it should not be null if HomeOperations create went thru. CUP is not available

[Oct 26, 2018 12:39:03 AM] [INFO] OPatch invoked as follows: ‘apply -invPtrLoc /app/oracle/product/12.1.0.2/oraInst.loc ‘

[Oct 26, 2018 12:39:03 AM] [INFO] Runtime args: [-Xms150m, -Xmx3072m, -XX:MaxMetaspaceSize=128M, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/app/oracle/product/12.1.0.2/cfgtoollogs/opatch, -DOPatch.ORACLE_HOME=/app/oracle/product/12.1.0.2, -DOPatch.DEBUG=false, -DOPatch.MAKE=false, -DOPatch.RUNNING_DIR=//app/oracle/product/12.1.0.2/OPatch, -DOPatch.MW_HOME=, -DOPatch.WL_HOME=, -DOPatch.COMMON_COMPONENTS_HOME=, -DOPatch.OUI_LOCATION=/app/oracle/product/12.1.0.2/oui, -DOPatch.FMW_COMPONENT_HOME=, -DOPatch.OPATCH_CLASSPATH=, -DOPatch.WEBLOGIC_CLASSPATH=, -DOPatch.SKIP_OUI_VERSION_CHECK=, -DOPatch.PARALLEL_ON_FMW_OH=]

[Oct 26, 2018 12:39:03 AM] [INFO] Heap in use : 23 MB

Total memory: 144 MB

Free memory : 120 MB

Max memory : 2731 MB

[Oct 26, 2018 12:39:03 AM] [INFO] Oracle Home : /app/oracle/product/12.1.0.2

Central Inventory : /app/oracle/product/oraInventory

from : /app/oracle/product/12.1.0.2/oraInst.loc

OPatch version : 12.2.0.1.14

OUI version : 12.1.0.2.0

OUI location : /app/oracle/product/12.1.0.2/oui

Log file location : /app/oracle/product/12.1.0.2/cfgtoollogs/opatch/opatch2018-10-26_00-39-02AM_1.log

[Oct 26, 2018 12:39:03 AM] [INFO] Patch history file: /app/oracle/product/12.1.0.2/cfgtoollogs/opatch/opatch_history.txt

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-TIME] Loading raw inventory

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-MEMORY] Loaded all components from inventory. Heap memory in use: 22 (MB)

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-MEMORY] Loaded all one offs from inventory. Heap memory in use: 22 (MB)

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-TIME] Raw inventory loaded successfully

[Oct 26, 2018 12:39:05 AM] [INFO] NApply::no CAS enabled, OPatch runs with legacy process.

[Oct 26, 2018 12:39:05 AM] [INFO] Verifying environment and performing prerequisite checks…

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-TIME] Running prerequisite checks

[Oct 26, 2018 12:39:05 AM] [INFO] opatch-external.jar is in /app/oracle/product/12.1.0.2/OPatch/jlib/opatch-external.jar

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-TIME] Loading cooked inventory

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-MEMORY] : Loading cooked one offs. Heap memory used 29 (MB)

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-MEMORY] : Loaded cooked oneoffs. Heap memory used : 25 (MB)

[Oct 26, 2018 12:39:05 AM] [INFO] [OPSR-TIME] Cooked inventory loaded successfully

[Oct 26, 2018 12:39:05 AM] [INFO] Checking conflict among patches…

[Oct 26, 2018 12:39:05 AM] [INFO] Running prereq checkConflictAmongPatchesWithDetail

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches can be applied: 28440711

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches are not required:

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches are auto rollbackable:

[Oct 26, 2018 12:39:05 AM] [INFO] Finished checking prereq checkConflictAmongPatchesWithDetail

[Oct 26, 2018 12:39:05 AM] [INFO] Conflict checking amongst patches PASSED

[Oct 26, 2018 12:39:05 AM] [INFO] Checking if Oracle Home has components required by patches…

[Oct 26, 2018 12:39:05 AM] [INFO] CheckMissingComps: Cached file does not exist or is invalid, re-build prereq result.

[Oct 26, 2018 12:39:05 AM] [INFO] Checking conflicts against Oracle Home…

[Oct 26, 2018 12:39:05 AM] [INFO] Running prereq checkConflictAgainstOHWithDetail

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches can be applied: 28440711

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches are not required:

[Oct 26, 2018 12:39:05 AM] [INFO] Following patches are auto rollbackable:

[Oct 26, 2018 12:39:05 AM] [INFO] Finished checking prereq checkConflictAgainstOHWithDetail

[Oct 26, 2018 12:39:06 AM] [INFO] Running prerequisite checks…

[Oct 26, 2018 12:39:06 AM] [INFO] Space Needed : 678.259MB

[Oct 26, 2018 12:39:06 AM] [INFO] Prereq checkPatchApplicableOnCurrentPlatform Passed for patch : 28440711

[Oct 26, 2018 12:39:07 AM] [INFO] Start fuser command /sbin/fuser /app/oracle/product/12.1.0.2/bin/oracle at Fri Oct 26 00:39:07 AST 2018

[Oct 26, 2018 12:39:07 AM] [INFO] Finish fuser command /sbin/fuser /app/oracle/product/12.1.0.2/bin/oracle at Fri Oct 26 00:39:07 AST 2018

[Oct 26, 2018 12:39:07 AM] [INFO] OPatch continues with these patches: 28440711

[Oct 26, 2018 12:39:07 AM] [INFO] Do you want to proceed? [y|n]

[Oct 26, 2018 12:39:07 AM] [INFO] Start to wait for user-input at Fri Oct 26 00:39:07 AST 2018

[Oct 26, 2018 12:39:11 AM] [INFO] Finish waiting for user-input at Fri Oct 26 00:39:11 AST 2018

[Oct 26, 2018 12:39:11 AM] [INFO] User Responded with: Y

[Oct 26, 2018 12:39:11 AM] [INFO] [OPSR-TIME] All checks passed.

[Oct 26, 2018 12:39:11 AM] [INFO] Need to look only in the OUI based Oracle Home to configure OCM

[Oct 26, 2018 12:39:11 AM] [INFO] Current working directory is : //app/oracle/product/12.1.0.2/OPatch

[Oct 26, 2018 12:39:11 AM] [INFO] OPatch is generic, it is not bundled with OCM.

[Oct 26, 2018 12:39:11 AM] [INFO] opatch-external.jar is in /app/oracle/product/12.1.0.2/OPatch/jlib/opatch-external.jar

[Oct 26, 2018 12:39:11 AM] [INFO] opatch-external.jar is in /app/oracle/product/12.1.0.2/OPatch/jlib/opatch-external.jar

[Oct 26, 2018 12:39:11 AM] [INFO] You selected -local option, hence OPatch will patch the local system only.

[Oct 26, 2018 12:39:11 AM] [INFO] Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = ‘/app/oracle/product/12.1.0.2’)

[Oct 26, 2018 12:39:11 AM] [INFO] Is the local system ready for patching? [y|n]

[Oct 26, 2018 12:39:11 AM] [INFO] Start to wait for user-input at Fri Oct 26 00:39:11 AST 2018

[Oct 26, 2018 12:39:12 AM] [INFO] Finish waiting for user-input at Fri Oct 26 00:39:12 AST 2018

[Oct 26, 2018 12:39:12 AM] [INFO] User Responded with: Y

[Oct 26, 2018 12:39:12 AM] [INFO] Backing up files…

[Oct 26, 2018 12:39:12 AM] [INFO] OUI-67117:Backing up files affected by the patch ‘NApply’ for restore. This might take a while…

[Oct 26, 2018 12:39:15 AM] [INFO] Applying patch 28440711…

[Oct 26, 2018 12:39:15 AM] [INFO] Starting apply session

[Oct 26, 2018 12:39:15 AM] [INFO] opatch-external.jar is in /app/oracle/product/12.1.0.2/OPatch/jlib/opatch-external.jar

[Oct 26, 2018 12:39:15 AM] [INFO] ApplySession applying interim patch ‘28440711’ to OH ‘/app/oracle/product/12.1.0.2’

[Oct 26, 2018 12:39:15 AM] [INFO] Applying interim patch ‘28440711’ to OH ‘/app/oracle/product/12.1.0.2’

[Oct 26, 2018 12:39:15 AM] [INFO] [OPSR-TIME] Starting to apply patch “28440711” to local system

[Oct 26, 2018 12:39:15 AM] [INFO] opatch-external.jar is in /app/oracle/product/12.1.0.2/OPatch/jlib/opatch-external.jar

[Oct 26, 2018 12:39:15 AM] [INFO] OPatch detected ARU_ID/Platform_ID as 226

[Oct 26, 2018 12:39:15 AM] [INFO] ApplySession: Optional component(s) [ oracle.sqlj, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.

[Oct 26, 2018 12:39:15 AM] [INFO] [OPSR-TIME] Saving patch 28440711 in patch storage

[Oct 26, 2018 12:39:15 AM] [WARNING]OUI-67124:ApplySession failed but Oracle Home has not been modified.null

[Oct 26, 2018 12:39:16 AM] [SEVERE] OUI-67073:UtilSession failed: ApplySession failed but Oracle Home has not been modified.null

[Oct 26, 2018 12:39:16 AM] [INFO] ——————————————————————————–

[Oct 26, 2018 12:39:16 AM] [INFO] The following warnings have occurred during OPatch execution:

[Oct 26, 2018 12:39:16 AM] [INFO] 1) OUI-67124:ApplySession failed but Oracle Home has not been modified.null

[Oct 26, 2018 12:39:16 AM] [INFO] ——————————————————————————–

[Oct 26, 2018 12:39:16 AM] [INFO] Finishing UtilSession at Fri Oct 26 00:39:16 AST 2018

[Oct 26, 2018 12:39:16 AM] [INFO] Log file location: /app/oracle/product/12.1.0.2/cfgtoollogs/opatch/opatch2018-10-26_00-39-02AM_1.log

[Oct 26, 2018 12:39:16 AM] [INFO] Stack Description: java.lang.RuntimeException: ApplySession failed but Oracle Home has not been modified.null

at oracle.opatch.SystemCall.fastCopy(SystemCall.java:297)

at oracle.opatch.SystemCall.copyFile(SystemCall.java:1131)

at oracle.opatch.SystemCall.copyFile(SystemCall.java:1023)

at oracle.opatch.SystemCall.copyRecurse(SystemCall.java:1571)

at oracle.opatch.SystemCall.copyRecurse(SystemCall.java:1411)

at oracle.opatch.ApplySession.saveOriginalPatch(ApplySession.java:1258)

at oracle.opatch.ApplySession.processLocal(ApplySession.java:3496)

at oracle.opatch.ApplySession.process(ApplySession.java:5044)

at oracle.opatch.ApplySession.process(ApplySession.java:4906)

at oracle.opatch.OPatchACL.processApply(OPatchACL.java:310)

at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:1397)

at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:363)

at oracle.opatch.opatchutil.NApply.process(NApply.java:343)

at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1105)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at oracle.opatch.UtilSession.process(UtilSession.java:359)

at oracle.opatch.OPatchSession.process(OPatchSession.java:2670)

at oracle.opatch.OPatch.process(OPatch.java:811)

at oracle.opatch.OPatch.main(OPatch.java:861)

Caused by: java.lang.RuntimeException: ApplySession failed but Oracle Home has not been modified.null

… 22 more

Caused by: java.lang.RuntimeException

… 22 more

Work Around Solution:

If you are placing the patch outside your Oracle database file systems, copy it to one of your “local database file systems” where the owner of the file system will be your oracle user.

Apply the patch again…and it will work !!!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unified Auditing in Oracle 18c

Oracle database Unified Audit Trail was introduced in Oracle 12cR1 , as a mechanism to unify different oracle database audits (based on different features) under one view. As you may know “mixed mode” auditing is enabled by default starting with 12cR1 release. One of the limitations when switching from “standard auditing” to “unified auditing” in both Oracle 12cR1 and 12cR2 is you can’t push audits to syslog anymore. This has changed in Oracle 18c, you can push audits to SYSLOG in Unix/Linux OS and to windows event log.

A new init parameter has been introduced “unified_audit_systemlog”

https://docs.oracle.com/en/database/oracle/oracle-database/18/refrn/UNIFIED_AUDIT_SYSTEMLOG.html#GUID-C4E65709-0FE3-4945-8F39-7B0867E2494A

Picture1

In window OS I have set the parameter as TRUE as shown below:

Picture2

For simulation through RMAN I have executed command to take controlfile backup then check the windows event log:

 

Picture3.png

Another new feature in 18c , is the ability to export and import unified audit trail !

Command to export:

expdp system/XXXXXXXX full=y directory=DUMP_DIR logfile=exp_unified18c_log.log dumpfile=exp_unified18c.dmp INCLUDE=AUDIT_TRAILS

Picture4

 

 

 

 

 

 

 

 

 

Oracle 18c new feature: Cloning PDB using DBCA (Database Configuration Assistant)

Here I am cloning a local PDB using DBCA, which is a new feature in oracle 18c:

Go to

cd $ORACLE_HOME/bin

Execute the command:

dbca

make sure X-windows is configured: export DISPLAY=PCXXXX:0.0

Picture1Picture2Picture3Picture4Picture5Picture6Picture7Picture8

You can use silent installation:

In Linux:

./dbca -silent -createpluggabledatabase -sourcedb ORACLE -createpdbfrom PDB -pdbName PDB_TEST_CLONE2 -sourcepdb PDB_TEST

In Windows:

dbca -silent -createpluggabledatabase -sourcedb ORACLE -createpdbfrom PDB -pdbName PDB_TEST_CLONE2 -sourcepdb PDB_TEST

silent_install

Upgrading Oracle database from 12cR2 to 18c in Windows

Download the binary for OTN and extract the ZIP file:

Picture1

Choose “set up Software only” option:

Picture2

Upgrading existing Oracle database from 12cR2 to 18c

In the unzipped binaries go to “bin” folder then search for dbua.bat file

 

UP1UP2

UP3

You will see a list of pre-requisite checks that is being listed, in my case I will hit “Fix & Check Again” option….this will successfully eliminate the check with severity “Error” regarding recycle bin not being purged as shown below:

UP4UP5I accepted the warning message, press “Yes”

UP6

DBUA (Database Upgrade Assistant) is providing a rollback (recovery strategy) in case the upgrade fails, you have to choose on of three options:

  • Flashback to guaranteed restore point
  • Full RMAN backup – restore script is also provided as shown below
  • You will be responcible for the recovery strategy

UP7UP8UP9UP10

Wait until the upgrade finishes successfully !

After successfully upgrading your Oracle database, you can enable a new feature in 18c called “Read-Only” Oracle Homes .

This feature enables you take a software image, and separating configuration files. Also, it will improve your patching process as the patched (binaries) image can be distributed to other servers.