Saturday, June 15, 2019

Exadata Database Machine X8: The Foundation for Cloud & Autonomous Databases: A Primer

Here is a very beneficial blog post on this topic.

Quick Recap - Oracle has introduced the following Hardware and Software with its next generation of Exadata Family:
  • Exadata X8-2 & X8-8 Database Server Overview.
  • Exadata X8-2 Intelligent Storage Server High Capacity (HC).
  • Exadata X8-2 Intelligent Storage Server Extreme Flash (EF).
  • Exadata X8-2 Storage Server Extended (XT).
  • Flexibility & Elasticity: License Cores as Workloads require them.
  • Exadata continues to lead in overall Database Performance.
Summary of Exadata X8 performance

Enjoy the next generation of Exadata with X8.

Cheers.

Wednesday, November 2, 2016

Oracle Java VM - Patching Regiment is separate from DB Home Patching

I learned an interesting fact about Oracle Java VM Patching - that it is separate from the Oracle DB Home PSU Patching even though, it does reside within the Oracle DB Home directory structure. Also, another point to be noted is that, the Oracle Grid Infrastructure (GI) Home does not have to patched for OJVM.
Here are some useful resources and documents that I went through to come to this conclusion - I must admit, it was a bit confusing. Basically, this translates into downloading a separate PSU for OJVM from the Oracle DB Home.
  • The OJVM Patching SAGA - Oracle Blogs
  • Patch Set Update and Critical Patch Update October 2015 Availability Document (Doc ID 2037108.1)
  • Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets (Doc ID 1454618.1)
  • Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU" (OJVM PSU) Patches (Doc ID 1929745.1)
  • October 2014 CPU Database JVM Vulnerabilities FAQ (Doc ID 1940702.1)
  • What to do if the Database JAVAVM Component becomes INVALID After installing an OJVM Patch? (Doc ID 2165212.1)
  • New Patch Nomenclature for Oracle Products (Doc ID 1430923.1)
 

Wednesday, October 19, 2016

ORA-600's due to Memory Corruption - Potential Causes/Solutions

In certain instances, the following ORA-600 errors can arise on Oracle 11.x or later - Possible Causes/Solution are mentioned below - please check for relevance in your particular scenario.
ORA-600 [kghfre2]
=================
DESCRIPTION:
A failed attempt to free a chunk of memory results in this ORA-600 error. Further investigation reveals that, this chunk header is neither "recreatable" nor "freeable".
and therefore generate this exception.

ORA-600 [17402]
===============
DESCRIPTION:
ORA-600[17402] is indicative of a Memory Heap Corruption.

ORA-600 [17183]
===============
DESCRIPTION:
Memory is checked to ensure that it is "freeable". If doing so causes a failure, this shall geenerating this ORA-600 exception. This also results in Memory Corruption and causes no Data Corruption.

Possible Causes - Require further investigation and RCA:
  1. Improper/Unpatched OS Stack
  2. Improper/Incorrectly configured VM/LPAR Memory Configuration
  3. Hardware Memory Issues
  4. SGA/PGA/UGA Memory Shortage/Exhaustion
Potential Solutions:
  1. Increase the SGA/PGA Memory Areas
  2. Perform full hardware diagnostics on the Memory Hardware
  3. Check the OS Stack for latest Patch levels

Sunday, September 4, 2016

Useful Queries for Long-Running Operations using v$session_longops and gv$session_longops

I have compiled a few useful queries to estimate the elapsed and remaining time for Long Running operations using using v$session_longops and gv$session_longops.
A description of v$session_longops and gv$session_longops:
SQL> desc v$session_longops;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 SID                                                NUMBER
 SERIAL#                                            NUMBER
 OPNAME                                             VARCHAR2(64)
 TARGET                                             VARCHAR2(64)
 TARGET_DESC                                        VARCHAR2(32)
 SOFAR                                              NUMBER
 TOTALWORK                                          NUMBER
 UNITS                                              VARCHAR2(32)
 START_TIME                                         DATE
 LAST_UPDATE_TIME                                   DATE
 TIMESTAMP                                          DATE
 TIME_REMAINING                                     NUMBER
 ELAPSED_SECONDS                                    NUMBER
 CONTEXT                                            NUMBER
 MESSAGE                                            VARCHAR2(512)
 USERNAME                                           VARCHAR2(30)
 SQL_ADDRESS                                        RAW(8)
 SQL_HASH_VALUE                                     NUMBER
 SQL_ID                                             VARCHAR2(13)
 SQL_PLAN_HASH_VALUE                                NUMBER
 SQL_EXEC_START                                     DATE
 SQL_EXEC_ID                                        NUMBER
 SQL_PLAN_LINE_ID                                   NUMBER
 SQL_PLAN_OPERATION                                 VARCHAR2(30)
 SQL_PLAN_OPTIONS                                   VARCHAR2(30)
 QCSID                                              NUMBER

SQL> desc gv$session_longops;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 INST_ID                                            NUMBER
 SID                                                NUMBER
 SERIAL#                                            NUMBER
 OPNAME                                             VARCHAR2(64)
 TARGET                                             VARCHAR2(64)
 TARGET_DESC                                        VARCHAR2(32)
 SOFAR                                              NUMBER
 TOTALWORK                                          NUMBER
 UNITS                                              VARCHAR2(32)
 START_TIME                                         DATE
 LAST_UPDATE_TIME                                   DATE
 TIMESTAMP                                          DATE
 TIME_REMAINING                                     NUMBER
 ELAPSED_SECONDS                                    NUMBER
 CONTEXT                                            NUMBER
 MESSAGE                                            VARCHAR2(512)
 USERNAME                                           VARCHAR2(30)
 SQL_ADDRESS                                        RAW(8)
 SQL_HASH_VALUE                                     NUMBER
 SQL_ID                                             VARCHAR2(13)
 SQL_PLAN_HASH_VALUE                                NUMBER
 SQL_EXEC_START                                     DATE
 SQL_EXEC_ID                                        NUMBER
 SQL_PLAN_LINE_ID                                   NUMBER
 SQL_PLAN_OPERATION                                 VARCHAR2(30)
 SQL_PLAN_OPTIONS                                   VARCHAR2(30)
 QCSID                                              NUMBER

How to estimate the elapsed and remaining time for a long-running operation in Oracle?
Note the only difference in the two queries is v$session_longops VS gv$session_longops and the addition of the inst_id column to indicate the ID of the RAC instance.
RAC environments:
SELECT 
        serial#,
        inst_id,
        sid,
        opname,
        sofar,
        (totalwork) - (sofar) remaining_work,
        start_time,
        round(elapsed_seconds/60) elapsed_time_in_mins,
        round(time_remaining/60)  remaining_time_in_mins
   FROM gv$session_longops
 WHERE time_remaining > 0

 and SOFAR <> TOTALWORK;
 order by 6 desc;



Non-RAC environments:
SELECT 
        serial#,
        sid,
        opname,
        sofar,
        (totalwork) - (sofar) remaining_work,
        start_time,
        round(elapsed_seconds/60) elapsed_time_in_mins,
        round(time_remaining/60)  remaining_time_in_mins
   FROM v$session_longops
 WHERE time_remaining > 0

 and SOFAR <> TOTALWORK;
 order by 6 desc;

Very similarly, how to estimate the elapsed and remaining time for a long-running RMAN operation in Oracle?




RAC environments:
SELECT 
        serial#,
        inst_id,
        sid,
        opname,
        sofar,
        (totalwork) - (sofar) remaining_work,
        start_time,
        round(elapsed_seconds/60) elapsed_time_in_mins,
        round(time_remaining/60)  remaining_time_in_mins
   FROM gv$session_longops
 WHERE time_remaining > 0
 and opname like '%RMAN%'
 order by 6 desc;

Non-RAC environments:
SELECT 
        serial#,
        inst_id,
        sid,
        opname,
        sofar,
        (totalwork) - (sofar) remaining_work,
        start_time,
        round(elapsed_seconds/60) elapsed_time_in_mins,
        round(time_remaining/60)  remaining_time_in_mins
   FROM gv$session_longops
 WHERE time_remaining > 0
 and opname like '%RMAN%'

 and SOFAR <> TOTALWORK;
 order by 6 desc;

How to estimate the estimated remaining time for a long-running SQL query?
RAC:
select sql_id, totalwork, sofar, elapsed_seconds,time_remaining from gv$session_longops where sql_id in ('INSERT_SQL_ID_IN_HERE');

Non-RAC:
select sql_id, totalwork, sofar, elapsed_seconds,time_remaining from v$session_longops where sql_id in ('INSERT_SQL_ID_IN_HERE');





Thursday, August 18, 2016

Useful MOS resources for Oracle Database 12c

In this post, I have compiled some useful MOS resources and docs regarding Oracle's 12c Database (Oracle's DB Platform for the Cloud); These present a fantastic learning opportunity for DBAs, DMAs and Cloud Admins, especially those seeking an upgrade learning path to 12c from prior versions.
  • Complete Checklist for Upgrading to Oracle Database 12c Release 1 using DBUA(Doc ID 1516557.1)
  • Oracle Database 12c Release 1 (12.1) Upgrade New Features(Doc ID 1515747.1)
  • Oracle ASM 12c New Features (Technical Overview)(Doc ID 1569648.1)
  • Oracle Database Advisor Webcast Schedule and Archive recordings(Doc ID 1456176.1)
  • Data Guard: Oracle 12c – New and updated Features (Doc ID 1558256.1)
  • Oracle NET 12c New Features (Doc ID 1615858.1)
  • How to Upgrade to Oracle Database 12c release1 (12.1.0) and Known Issues(Doc ID 2085705.1 
  • Master Note For Oracle Database 12c Release 1 (12.1) Database/Client Installation/Upgrade/Migration Standalone Environment (Non-RAC)(Doc ID 1520299.1)
  • Oracle Database 12c Standard Edition 2 (12.1.0.2)(Doc ID 2027072.1)
  • Oracle Database 12c Install Options and the Installed Components(Doc ID 1961277.1)
  • Oracle Database 12c Takes Advantage of Optimized Shared Memory Feature on Oracle Solaris(Doc ID 1579199.1)
  • Known Issues and Properly Running Certified RCU Versions Against Oracle Database 12c(Doc ID 2004652.1)
  • Step by Step Examples of Migrating non-CDBs and PDBs Using ASM for File Storage (Doc ID 1576755.1)
  • Support Impact of the Deprecation Announcement of Oracle Restart with Oracle Database 12c(Doc ID 1584742.1)
  • Difference Between Major Components of Traditional Databases and Multitenant Databases CDB/PDB Introduced in Version 12c (Doc ID 2013529.1)
  • Oracle Multitenant Option - 12c : Frequently Asked Questions (Doc ID 1511619.1)
  • Initialization parameters in a Multitenant database - FAQ and Examples (Doc ID 2101638.1)
  • Initialization parameters in a Multitenant database - Facts and additional information (Doc ID 2101596.1)
  • PDB Failover in a Data Guard environment: Unplugging a Single Failed PDB from a Standby Database and Plugging into a New Container (Doc ID 2088201.1)
  • Making Use Deferred PDB Recovery and the STANDBYS=NONE Feature with Oracle Multitenant (Doc ID 1916648.1)
  • Oracle Database 12c Release 1 (12.1) DBUA In Silent Mode(Doc ID 1516616.1)
  • Where Manageability Data is Stored in 12c Multi-tenant (CDB) database (Doc ID 1586256.1)
  • How to Restore - Dropped Pluggable database (PDB) in Multitenant (Doc ID 2034953.1)
  • Data Guard Impact on Oracle Multitenant Environments (Doc ID 2049127.1)
  • Master Note for the Oracle Multitenant Option (Doc ID 1519699.1)
  • Script For Getting Complete Basic Information about configured CDB and PDB in Oracle Database Multitenant 12c (Doc ID 2012221.1)
  • 12c Multitenant Container Databases (CDB) and Pluggable Databases (PDB) Character set restrictions / ORA-65116/65119: incompatible database/national character set ( Character set mismatch: PDB character set CDB character set ) (Doc ID 1968706.1)
  • How to set a Pluggable Database to have a Different Time Zone to its own CDB (Doc ID 2127835.1)







Monday, July 18, 2016

How to drop and recreate Oracle ASM Disk Groups in RAC

This post covers the simple commands on ow to drop and recreate Oracle ASM Disk Groups in RAC.
Warning: Running these commands shall result in Data Loss.
SQL> create pfile from spfile;
$ asmtool -delete \\.\ASMDISK01
$ asmtool -delete \\.\ASMDISK02
$ asmtool -delete \\.\ASMDISK03

$ asmcmd
ASMCMD> lsdg

$ srvctl status diskgroup -g DATA01
$ srvctl status diskgroup -g RECO01
$ srvctl stop diskgroup -g DATA01 -f
$ srvctl stop diskgroup -g RECO01 -f
SQL> drop diskgroup RECO01 force including contents;
Diskgroup dropped.
SQL> drop diskgroup DATA01 force including contents;
Diskgroup dropped.
Now that the ASM Disk Groups and constituent Disks have been dropped/erased, the new ASM Disk Groups can be recreated.
CREATE DISKGROUP DATA01 EXTERNAL REDUNDANCY
  DISK '/dev/asm/asmdisk*';

Resources:
How To Drop and Recreate ASM Diskgroup (Doc ID 563048.1)

Wednesday, June 1, 2016

My New book coming out - Building Database Clouds in Oracle Database 12c

After a lot of hard work, I am thrilled to announce that my new book on Oracle-centric Cloud Computing is becoming available in a matter of a few days.


I had been contemplating authoring a book within the Oracle Cloud domain for a few years—the project finally started in 2013. I am very proud of my coauthors’ industry credentials and the depth of experience that they brought to this endeavor. From inception to writing to technical review to production, authoring a book is a lengthy labor of love and at times a painful process; this book would not have been possible without the endless support of the awesome Addison-Wesley team.
 


You can order the book online at:
Amazon - Building Database Clouds in Oracle Database 12c

 


I have copied the Preface from the "Publisher's Website: Addison Wesley" to provide a brief overview to the Reader:

Preface

Cloud Computing is all the rage these days. This book focuses on DBaaS (database-as-a-service) and Real Application Clusters (RAC), one of Oracle’s newest cutting-edge technologies within the Cloud Computing world.
Authored by a world-renowned, veteran author team of Oracle ACEs/ACE directors with a proven track record of multiple best-selling books and an active presence in the Oracle speaking circuit, this book is intended to be a blend of real-world, hands-on operations guide and expert handbook for Oracle 12c DBaaS within Oracle 12c Enterprise Manager (OEM 12c) as well as provide a segue into Oracle 12c RAC.
Targeted for Oracle DBAs and DMAs, this expert’s handbook is intended to serve as a practical, technical, go-to reference for performing administration operations and tasks for building out, managing, monitoring, and administering DB Clouds with the following objectives:
 
  • Practical, technical guide for building Oracle Database Clouds in 12c
  • Expert, pro-level DBaaS handbook
  • Real-world DBaaS hands-on operations guide
  • Expert deployment, management, administration, support, and monitoring guide for Oracle DBaaS
  • Practical best-practices advice from real-life DBaaS architects/administrators
  • Guide to setting up virtualized DB Clouds based on Oracle RAC clusters
In this technical, everyday, hands-on, step-by-step book, the authors aim for an audience of intermediate-level, power, and expert users of Oracle 12c DBaaS and RAC.

This book covers the 12c version of the Oracle DB software.