Sie sind auf Seite 1von 41

Upcoming: Advisor Webcast: Oracle Database 12c Patching New Features

Upcoming Advisor Webcast Schedule

Check out Note ID : 740966.1

Select your Product Area

Scan through the list of Current Topics

Register for the session of your interest

Upcoming: Advisor Webcast: Oracle Database 12c Patching New Features


Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 2
ATTENTION AUDIO Options
Option 1: Voice Streaming Audio Broadcast Option 2: Teleconference (Dial In)
No need to dial in on a telephone Requires telephone to dial in
Questions can be asked in the WebEx Q&A panel Questions can be asked over the phone or in the
WebEx Chat
Details
Conference ID: 23905590
International dial in: +44 (0) 1452 562 665
US Free call: 1866 230 1938
List with national toll free numbers is available
in Doc ID: 1148600.1
View anytime during the conference using
Communicate > Teleconference > Join
Teleconference from your WebEx menu

Upcoming: Advisor Webcast: Oracle Database 12c Patching New Features


Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 3
Oracle Advisor Webcast
Oracle Database 12c Patching New
Features
Asad Hasan
Principal Software Engineer

Dec 17, 2014

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 4


Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracles products remains at the sole discretion of Oracle.

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 5


Oracle Advisor Webcast
Oracle Database 12c Patching New
Features
Asad Hasan
Principal Software Engineer

Dec 17, 2014

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 6


Objectives
Introduction of Queryable Patch Inventory

and Datapatch

Concept of QPI with Demo of its features

Purpose of Datapatch & its Usage

Comparison from Traditional Method

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 7


Agenda

1 Overview of Oracle Patching


2 Queryable Patch Inventory
3 Insider Look at QOpatch
4 Datapatch -Introduction and Benefits
5 Multitenant for Simplified Patching

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 8


Overview of Oracle Patching
Method to Apply Code Fixes to Oracle Software

PSU SPU/CPU Bundle Patch Interim Patch

Platform Unix Unix Windows All

Applicable Target
Release Time Quaterly Quaterly On Request
Dates
Security + Security +
Security
Definition Recommended Recommended Single Bug
Fixes
Fixes Fixes

*SPU Not available from 12.1.0.1 onward

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Patch Listing :
Opatch lsinventory

Central Inventory Central Local Inventory


Pointer file Inventory Complete Patch List
(oraInst.loc) (inventory.xml) (comps.xml)

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Queryable Patch Inventory 12c New Feature
Using SQL Query get the list of database patches .

OPatch in 12.1 supports inventory in XML Format.

Opatch lsinventory - Queryable Return XML


Patch Interface Type
xml

Inventory data is stored in Database tables

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Components of Queryable Patch Inventory

Preprocessor

DBMS_QOPATCH
Oracle_loader

External
Table

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Preprocessor
Oracle_loader DBMS_QOPATCH

External Table External


View External data as if it were data in a database table. Table

Table is OPATCH_XML_INV,rdbms/admin/catqitab.sql
CLOB (Character Large Object) is an Oracle data type.

ORACLE_LOADER Preprocessor
Oracle_loader DBMS_QOPATCH
Load Data Text Based
Default access driver External
Table

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Preprocessor
Oracle_loader DBMS_QOPATCH

External
PREPROCESSOR Table

Preprocessor Program represented by :


preprocessor opatch_script_dir:'qopiprep.bat'
Converts data to a record format for Oracle_loader.

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Queryable Patch Inventory SQL Interface

DBMS_QOPATCH ,dbmsqopi.sql
Real Time access OUI Patch Inventory DBMS_QOPATCH subprograms

PLSQL/SQL interface to view


GET_OPATCH_LIST
List of patches applied
Complete OPatch Inventory GET_OPATCH_LSINVENTORY

SQL Patch Status GET_SQLPATCH_STATUS

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Summarize the Workflow:
Database
Select * from
select * from Oracle Loader Preprocessor
OPATCH_XML_INV Opatch lsinventory -
Access Driver xml
OPATCH_XML_INV

Select on External table (OPATCH_XML_INV)


Preprocessor program opatch lsinventory xml
Load/Copy the Data in tables.

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Directory objects required for the QPI:

select directory_name,directory_path from dba_directories where


directory_name like 'OPATCH%';

OPATCH_LOG_DIR qopatch_log.log
/u01/app/oracle/product/12.1.0/dbhome_1/Qopatch

OPATCH_SCRIPT_DIR qopiprep.bat
/u01/app/oracle/product/12.1.0/dbhome_1/Qopatch

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Demonstration

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 18


Overview of Datapatch
This is the driver script
Automates post-patch SQL actions for database patches.
Supports Interim Patches, PSUs and Bundle Patches
Determines the pending apply/rollback SQL actions
Supports Oracle Multitenant

Script Location :
WINDOWS %ORACLE_HOME%\Opatch\datapatch
UNIX $ORACLE_HOME/OPatch/datapatch

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Deployment Automation Pre and Post 12c
Patches with both Binary and SQL Changes

Apply software bits using


standard OPatch

Restart DB and manually datapatch automatically detects and


complete
Restart DB post
andinstall
call completes post install actions
SQL
actions
datapatch to complete post
install actions SQL
datapatch
(EMCC / OPatchAuto does it
automatically)

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Logic of Datapatch Post Patch

OH Patch List

DB_HOME/ Compare Run Apply/


SID Patch Rollback
Level scripts

SQL Patch Registry


Table

Constant Logic : Datapatch will sync OH and sql patch level


Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 21
SQL Patch Registry Table

Track the SQL patches applied and rolled back.


SQL patch registry table is one per Database.
It can put more than one row per patch_id

View - dba_registry_history Table :REGISTRY$HISTORY


View - dba_registry sqlpatch Table :REGISTRY$SQLPATCH

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


SQL Patch Registry (dba_registry_sqlpatch)
Column Name Example
Patch_id 19303936
Patch_Uid 18116864
Action_Time 22-OCT-14 03.10.42.321237 PM
Description Database Patch Set Update : 12.1.0.2.1
LOGFILE $ORACLE_BASE/cfgtoollogs/sqlpatch/19303936/<u
nique patch ID>
STATUS SUCCESS
VERSION 12.1.0.2
Action APPLY
FLAGS NB
Bundle_Series PSU ,WINBUNDLE
Bundle_ID bundle id="1"
Bundle_data rdbms/admin/prvtpckl.plb

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Which Patch Deployment Method Uses Datapatch ?
OPatch
Opatchauto
Enterprise Manager Cloud Control
Upgrade

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Multitenant for Simplified Patching

Oracle Multitenant provides a new paradigm for rapid patching


Simplifies and speeds up patching process
Provides the flexibility to perform selective patching among all pluggable
databases a container

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Multitenant for Simplified Patching
Patching the Container Database Results in Patching all of its
Pluggable Databases

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Running datapatch with Database 12c
After OPatch apply, Connect to the DB

SQL> Connect / as sysdba


SQL> startup
SQL> alter pluggable database all open; [only for
Multitenant DB]
SQL> quit
> $ORACLE_HOME/OPatch/datapatch [-verbose]

Other options
-apply / -rollback <patch_id>
-force[-bundle_series]:runs apply/rollback as
provided even if it was already done.

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 27


Demonstration

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 28


Variety of Patch -datapatch

Napply patch Multiple Patches packaged under one Patch ID


Composite Patch - A Composite patch combines a group of constituent
patches
One-off Patch - Standalone Patch

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Location of Logfiles
DATAPATCH LOG
<oracle base>/cfgtoollogs/sqlpatch/<patch id>/<patch uid>
And the file name is
patchid_[apply/rollback]_<dbname>[_<pdbname>]_<timestamp>.log
CATCON LOG
/tmp/sqlpatch_catcon_0.log

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Top Articles and Community Links
Queryable Patch Inventory
PL/SQL Packages and Types Reference
Doc ID 1530108.1

Deployment Automation for Patches


with SQL changes
Doc ID 1585822.1
Doc ID 1948198.1

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 31


Summary
What we covered today
Understanding of QPI and its
Functioning
Demonstration on Usage of
Queryable Patch Interface
Purpose of Datapatch Script

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 32


Q&A
To ask a question on the phone
line, select *1 on your phone.
To ask a question online, use the
Q&A area at the top.
Your question will be read aloud in
the order received.
Question can also be asked on the
My Oracle Support Communities

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 33


Question and Answer Instructions

Q&A panel

3
Send your question
2
Ask: ALL PANELLIST leave default!

1
type your question here

Copyright 2014 Oracle and/or its affiliates. All rights reserved. |


Oracle Advisor Webcast Program
Locating Current Schedule & Archived Recordings

From Note ID : 740966.1 drill


down to your area of interest

Select your Product Area

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 35


Oracle Advisor Webcast Program
Locating Current Schedule & Archived Recordings For DB

Note:
Click column headings to sort
Hover on Webcast Title for more
information
Recordings available within 48
hours
Advisor Webcast Questions on a
webcast or ask questions via the
Questions? link

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 36


Learn More
Available References and Resources to Get Proactive

My Oracle Support Essentials Webcast Series


https://support. oracle.com | Doc ID: 553747.1

My Oracle Support Blog


https://blogs.oracle.com/supportportal/

Get Proactive in My Oracle Support


https://support. oracle.com | Doc ID: 432.1

Ask the Get Proactive Team


get-proactive_ww@oracle.com

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 37


Accessing My Oracle Support Community
1. Via My Oracle Support -> Community Tab 2. Directly https://communities.oracle.com

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 38


Where Can I Get Slides and Recording From This Session?
1. PDF link and recording link from Doc ID 740966.1 (within 48 hours)
2. Oracle Database > Database Install/Upgrade/Opatch > Content Tab > Documents
(within 24 hours)

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 39


Session Related Community Links

The following thread will have a copy


of the presentation and can be used
for additional questions or discussions
on this topic.

https://community.oracle.com/thread/
3635334

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 40


THANK YOU

Copyright 2014 Oracle and/or its affiliates. All rights reserved. | 41

Das könnte Ihnen auch gefallen