Database Caching Mode Oracle Database 12C release 1 (12.1)

This feature is available starting with Oracle Database 12c Release 1 (12.1.0.2)

It enables to force caching of all segments into buffer cache automatically(when the segments are accessed). With this option turned on even FULL scans or NOCACHE LOBs are loaded into buffer cache. In previous releases it was not guaranteed that a given segments will be cached unless you specified KEEP buffer.

When to use it:

  • when you have enough memory to keep all segments in memory
  • when you are limited by I/O system and response time

Continue reading

Advanced Index Compression Oracle Database 12C release 1 (12.1)

Advanced Index Compression is available starting with Oracle Database 12c Release 1 (12.1.0.2)

It improves compression ratio for multi column indexes that in previous releases were not good candidates for prefix compression. It reduces the size of all supported unique and non-unique indexes. It still providing efficient access to the indexes.

Notes about advanced index compression

  • it is not supported for bitmap indexes or index-organized tables.

  • it cannot be specified on a single column unique index.

  • it can be specified for whole index or just on index partition level
  • extended clause COMPRESS ADVANCED LOW
    COMPRESS ADVANCED LOW

Continue reading

Oracle Database 12.1.0.2 patch

New important patch 12.1.0.2 is available on Oracle Support.The patch brings a lot of new features:

  • Oracle Database In-Memory
  • Oracle Big Data SQL
  • Oracle JSON Document Store
  • Oracle REST Data Services
  • Improvements to Oracle Multitenant
  • Advanced Index Compression
  • Zone Maps
  • Approximate Count Distinct
  • Attribute Clustering
  • Full Database Caching
  • Rapid Home Provisioning

All details are here MOS Note:1905806.1. The patch is very important because of Oracle Database In-Memory. It can really drastically change your Oracle battles and games :p. Personally I consider this patch as one big NUKE blast !

As of tomorrow I’m planing to use  this version for new articles.

Have a fun 🙂

Tomasz

Security extension INHERIT [ANY] PRIVILEGES Oracle Database 12C release 1 (12.1)

This new extension in Oracle 12C closes security gap in previous release. When  a user (INVOKER) calls a PL/SQL code with pragma AUTHID CURRENT_USER of other user  then the code is executed with privileges of current user (INVOKER rights).

It’s very useful but can be dangerous if called code has got harm code. For example we can create simple function “get_me_dba_fnc” in schema SH with the pragma AUTHID CURRENT_USER and call it as user TOMASZ with high privileges like DBA and  by mistake grant DBA role to SH without noticing it.

role inherit

In Oracle 12C you can control inheritance of privileges by using following clauses

  • INHERIT PRIVILEGES
  • INHERIT ANY PRIVILEGES

Continue reading

View security extension BEQUEATH CURRENT_USER Oracle Database 12C release 1 (12.1)

This new feature in Oracle 12C changes behavior of calling functions within views. In previous releases all functions used within a view were called using rights of creator of the view (DEFINER rights) no matter if the functions used pragma AUTHID CURRENT_USER(INVOKER rights).

In Oracle 12C you can specify dedicated pragma  during view creation BEQUEATH CURRNT_USER so all functions that are using AUTHID CURRENT_USER will be called with INVOKER rights.

It’s worth to read article: Authid current_user, authid definer

Continue reading

Install Oracle 12C Release 1 (12.1) on Centos Linux 7

This article presents how to install Oracle 12C(12.1.0.1) Release 1 on Centos Linux 7.

Read following article how to install Centos Linux 7: Install Centos Linux 7 (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).

Software

Software for 12CR1 is available on OTN or edelivery

Database software

linuxamd64_12c_database_1of2.zip 
linuxamd64_12c_database_2of2.zip

Continue reading

Role and Privileges Analysis Oracle Database 12C release 1 (12.1)

It’s very nice new feature in Oracle Database 12C helping quickly analyze  what roles and privileges are used inside database and by who.

Quick summary about this extension and its features:

  • new PL/SQL package DBMS_PRIVILEGE_CAPTURE to run analysis
    • for both system privileges and object privileges
    • on application module level or user session level
    • in dedicated time
  • create reports that describe used privileges and objects
  • no need to use database vault
  • can show used and unused privileges for system and objects so it’s easy to decide what can be revoked, changed(grant less powerful roles, privileges) to make more secured database

role and privileges analysis

Continue reading

Install Oracle Enterprise Manager 12C release 4(12.1.0.4) on OEL 5/6

This article presents installation of new Oracle Enterprise Manager 12C version 12.1.0.4 on Oracle Linux OEL5, OEL6. It can be installed using Oracle 12C Release 1 so it’s up to you weather you use database version 11G Release 2 or 12C Release 1 as your repository.

Read following articles to find out how to install Linux OEL5,6.

Read following articles to find out how to install Oracle Database 11G Release 2

Read following articles to find out how to install Oracle Database 12C Release 1

This installation was done using following software:

  • Oracle Virtual Box – 64 bit
  • Oracle Enterprise Linux 6 – 64 bit
  • Oracle Database 11G Release 2(11.2.0.4) – 64 bit for Linux
  • Oracle Oracle Enterprise Manager 12C release 4(12.1.0.4) – 64 bit for Linux

Binaries Oracle Enterprise Manager 12C (12.1.0.4)

em12104_linux64_disk1.zip - enterprise software
em12104_linux64_disk2.zip - enterprise software
em12104_linux64_disk3.zip - enterprise software

You need at least 5GB of memory for this installation so check your VirtualBox settings before proceeding.

Continue reading