This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

vendredi 14 avril 2017

online-move-table-12cr

online-move-table-12cr
[41]Home » [42]Articles » [43]12c » Here

Online Move of a Table in Oracle Database 12c Release 2 (12.2)

Oracle Database 12c Release 1 (12.1) introduced the ability to move
table partitions and sub-partitions online. In Oracle Database 12c
Release 2 (12.2) you can now perform an online move of a table, as well
as individual partitions and sub-partitions.
* [44]MOVE ONLINE
* [45]Restrictions

Related articles.
* [46]Online Move of Partitions and Sub-Partitions in Oracle 12c
Release 1 (12.1)

MOVE ONLINE

The following example shows how to online move a table.
-- Create table.
DROP TABLE t1 PURGE;

CREATE TABLE t1
(id NUMBER,
description VARCHAR2(50),
created_date DATE,
CONSTRAINT t1_pk PRIMARY KEY (id)
);


-- Populate it.
INSERT INTO t1
SELECT level,
'Description for ' || level,
CASE
WHEN MOD(level,2) = 0 THEN TO_DATE('01/07/2015', 'DD/MM/YYYY')
ELSE TO_DATE('01/07/2016', 'DD/MM/YYYY')
END
FROM dual
CONNECT BY level <= 1000;
COMMIT;

EXEC DBMS_STATS.gather_table_stats(USER, 't1');

We can now move the table using the ONLINE keyword.
-- Basic move.
ALTER TABLE t1 MOVE ONLINE TABLESPACE users;

-- Change table compression.
ALTER TABLE t1 MOVE ONLINE TABLESPACE users COMPRESS UPDATE INDEXES;
ALTER TABLE t1 MOVE ONLINE TABLESPACE users NOCOMPRESS UPDATE INDEXES;

-- Change storage parameters.
ALTER TABLE t1 MOVE ONLINE STORAGE (PCTINCREASE 0);

Restrictions

There are some restrictions associated with online moves of tables
described [47]here.
* It can't be combined with any other clause.
* It can't be used on a partitioned index-organized table or
index-organized tables that have a column defined as a LOB, VARRAY,
Oracle-supplied type, or user-defined object type.
* It can't be used if there is a domain index on the table.
* Parallel DML and direct path inserts are not supported against an
object with an ongoing online move.

For more information see:
* [48]ALTER TABLE
* [49]move_table_clause
* [50]Online Move of Partitions and Sub-Partitions in Oracle 12c
Source .... : https://oracle-base.com/articles/12c/online-move-table-12cr2
--------------------------

online-move-table-12cr

online-move-table-12cr
[41]Home » [42]Articles » [43]12c » Here

Online Move of a Table in Oracle Database 12c Release 2 (12.2)

Oracle Database 12c Release 1 (12.1) introduced the ability to move
table partitions and sub-partitions online. In Oracle Database 12c
Release 2 (12.2) you can now perform an online move of a table, as well
as individual partitions and sub-partitions.
* [44]MOVE ONLINE
* [45]Restrictions

Related articles.
* [46]Online Move of Partitions and Sub-Partitions in Oracle 12c
Release 1 (12.1)

MOVE ONLINE

The following example shows how to online move a table.
-- Create table.
DROP TABLE t1 PURGE;

CREATE TABLE t1
(id NUMBER,
description VARCHAR2(50),
created_date DATE,
CONSTRAINT t1_pk PRIMARY KEY (id)
);


-- Populate it.
INSERT INTO t1
SELECT level,
'Description for ' || level,
CASE
WHEN MOD(level,2) = 0 THEN TO_DATE('01/07/2015', 'DD/MM/YYYY')
ELSE TO_DATE('01/07/2016', 'DD/MM/YYYY')
END
FROM dual
CONNECT BY level <= 1000;
COMMIT;

EXEC DBMS_STATS.gather_table_stats(USER, 't1');

We can now move the table using the ONLINE keyword.
-- Basic move.
ALTER TABLE t1 MOVE ONLINE TABLESPACE users;

-- Change table compression.
ALTER TABLE t1 MOVE ONLINE TABLESPACE users COMPRESS UPDATE INDEXES;
ALTER TABLE t1 MOVE ONLINE TABLESPACE users NOCOMPRESS UPDATE INDEXES;

-- Change storage parameters.
ALTER TABLE t1 MOVE ONLINE STORAGE (PCTINCREASE 0);

Restrictions

There are some restrictions associated with online moves of tables
described [47]here.
* It can't be combined with any other clause.
* It can't be used on a partitioned index-organized table or
index-organized tables that have a column defined as a LOB, VARRAY,
Oracle-supplied type, or user-defined object type.
* It can't be used if there is a domain index on the table.
* Parallel DML and direct path inserts are not supported against an
object with an ongoing online move.

For more information see:
* [48]ALTER TABLE
* [49]move_table_clause
* [50]Online Move of Partitions and Sub-Partitions in Oracle 12c
Source .... : https://oracle-base.com/articles/12c/online-move-table-12cr2
--------------------------

scheduler-enhancements-12cr

scheduler-enhancements-12cr
[41]Home » [42]Articles » [43]12c » Here

Scheduler (DBMS_SCHEDULER) Enhancements in Oracle Database 12c Release 2
(12.2)

Oracle Database 12c Release 2 continues to extend the functionality of
the Oracle scheduler with in-memory jobs, job incompatibility
definitions and scheduler resource queues.
* [44]In-Memory Jobs
* [45]Job Incompatibility Definitions
* [46]Scheduler Resource Queues

Related articles.
* [47]All Scheduler Articles

In-Memory Jobs

Jobs are schema objects and as such are persisted to disk and include
comprehensive logging of job runs. This is great for conventional jobs,
but can represent an overhead if you want to create many short-lived
jobs, like when you use jobs to parallelize a process. Oracle 11gR1
introduced [48]lightweight jobs to reduce this overhead, but Oracle 12c
Release 2 introduced in-memory jobs to reduce the overhead even
further.

In-memory jobs come in two forms.
* IN_MEMORY_RUNTIME : These are used when you need an in-memory job
that has a repeat interval. This is a standard lightweight job, but
it is assigned to the DEFAULT_IN_MEMORY_JOB_CLASS job class, which
has a logging level of DBMS_SCHEDULER.LOGGING_FAILED_RUNS, not none
(DBMS_SCHEDULER.LOGGING_OFF) as suggested by the documentation.
That means there is no logging for successful runs, hence better
performance.
* IN_MEMORY_FULL : A job that must be associated with a program,
can't have a repeat interval and persists nothing to disk. These
jobs use a little more memory, but since they persist nothing to
disk they have reduced overheard and zero redo generation as a
result of the job mechanism itself. As nothing is persisted to disk
they are only present on the instance that created them.

We can see the logging level associated with the
DEFAULT_IN_MEMORY_JOB_CLASS job class here.
CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

SET SERVEROUTPUT ON
DECLARE
l_logging_level NUMBER;
BEGIN
DBMS_SCHEDULER.get_attribute (
name => 'SYS.DEFAULT_IN_MEMORY_JOB_CLASS',
attribute => 'logging_level',
value => l_logging_level);

DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_OFF =' || DBMS_SCHEDULER.L
OGGING_OFF);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_RUNS =' || DBMS_SCHEDULER.L
OGGING_RUNS);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_FAILED_RUNS=' || DBMS_SCHEDULER.L
OGGING_FAILED_RUNS);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_FULL =' || DBMS_SCHEDULER.L
OGGING_FULL);
DBMS_OUTPUT.put_line('l_logging_level =' || l_logging_level)
;
END;
/
DBMS_SCHEDULER.LOGGING_OFF =32
DBMS_SCHEDULER.LOGGING_RUNS =64
DBMS_SCHEDULER.LOGGING_FAILED_RUNS=128
DBMS_SCHEDULER.LOGGING_FULL =256
Source .... : https://oracle-base.com/articles/12c/scheduler-enhancements-12cr2
--------------------------

scheduler-enhancements-12cr

scheduler-enhancements-12cr
[41]Home » [42]Articles » [43]12c » Here

Scheduler (DBMS_SCHEDULER) Enhancements in Oracle Database 12c Release 2
(12.2)

Oracle Database 12c Release 2 continues to extend the functionality of
the Oracle scheduler with in-memory jobs, job incompatibility
definitions and scheduler resource queues.
* [44]In-Memory Jobs
* [45]Job Incompatibility Definitions
* [46]Scheduler Resource Queues

Related articles.
* [47]All Scheduler Articles

In-Memory Jobs

Jobs are schema objects and as such are persisted to disk and include
comprehensive logging of job runs. This is great for conventional jobs,
but can represent an overhead if you want to create many short-lived
jobs, like when you use jobs to parallelize a process. Oracle 11gR1
introduced [48]lightweight jobs to reduce this overhead, but Oracle 12c
Release 2 introduced in-memory jobs to reduce the overhead even
further.

In-memory jobs come in two forms.
* IN_MEMORY_RUNTIME : These are used when you need an in-memory job
that has a repeat interval. This is a standard lightweight job, but
it is assigned to the DEFAULT_IN_MEMORY_JOB_CLASS job class, which
has a logging level of DBMS_SCHEDULER.LOGGING_FAILED_RUNS, not none
(DBMS_SCHEDULER.LOGGING_OFF) as suggested by the documentation.
That means there is no logging for successful runs, hence better
performance.
* IN_MEMORY_FULL : A job that must be associated with a program,
can't have a repeat interval and persists nothing to disk. These
jobs use a little more memory, but since they persist nothing to
disk they have reduced overheard and zero redo generation as a
result of the job mechanism itself. As nothing is persisted to disk
they are only present on the instance that created them.

We can see the logging level associated with the
DEFAULT_IN_MEMORY_JOB_CLASS job class here.
CONN / AS SYSDBA
ALTER SESSION SET CONTAINER=pdb1;

SET SERVEROUTPUT ON
DECLARE
l_logging_level NUMBER;
BEGIN
DBMS_SCHEDULER.get_attribute (
name => 'SYS.DEFAULT_IN_MEMORY_JOB_CLASS',
attribute => 'logging_level',
value => l_logging_level);

DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_OFF =' || DBMS_SCHEDULER.L
OGGING_OFF);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_RUNS =' || DBMS_SCHEDULER.L
OGGING_RUNS);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_FAILED_RUNS=' || DBMS_SCHEDULER.L
OGGING_FAILED_RUNS);
DBMS_OUTPUT.put_line('DBMS_SCHEDULER.LOGGING_FULL =' || DBMS_SCHEDULER.L
OGGING_FULL);
DBMS_OUTPUT.put_line('l_logging_level =' || l_logging_level)
;
END;
/
DBMS_SCHEDULER.LOGGING_OFF =32
DBMS_SCHEDULER.LOGGING_RUNS =64
DBMS_SCHEDULER.LOGGING_FAILED_RUNS=128
DBMS_SCHEDULER.LOGGING_FULL =256
Source .... : https://oracle-base.com/articles/12c/scheduler-enhancements-12cr2
--------------------------

multitenant-application-containers-12cr

multitenant-application-containers-12cr
[41]Home » [42]Articles » [43]12c » Here

Multitenant : Application Containers in Oracle Database 12c Release 2 (12.2)

Application containers are a new feature in Oracle Database 12c Release
2 (12.2) that allow you to define an application root, like a mini CDB
root container, along with dependent application container PDBs. An
application root can house one or more applications, each made up of
shared configuration, metadata and objects that are used by the
pluggable databases associated with the application root.

The examples in this article use Oracle Managed Files (OMF) so no file
name conversions are needed. You can add the appropriate
FILE_NAME_CONVERT or PDB_FILE_NAME_CONVERT settings if you need them.
* [44]Manage an Application Root
* [45]Manage Application PDBs
* [46]Manage Applications
+ [47]Install an Application
+ [48]Upgrade an Application
+ [49]Uninstall an Application
* [50]Application Common Objects
* [51]Manage an Application Seed
* [52]Application Container Views

Related articles.
* [53]Multitenant : All Articles

Manage an Application Root

Creating a new application container is similar to creating a regular
PDB, but you need to include the AS APPLICATION CONTAINER clause.
CONN / AS SYSDBA

CREATE PLUGGABLE DATABASE appcon1 AS APPLICATION CONTAINER ADMIN USER app_admin
IDENTIFIED BY Password1;
ALTER PLUGGABLE DATABASE appcon1 OPEN;

You can also create an application container by cloning an existing
PDB.

Once the application container is closed it can be dropped in the
normal way provided it has no associated PDBs.
CONN / AS SYSDBA

ALTER PLUGGABLE DATABASE appcon1 CLOSE;
DROP PLUGGABLE DATABASE appcon1 INCLUDING DATAFILES;

Basic management of the application container is similar to a regular
PDB, including cloning, unplug, plugin etc. An application container
can only be unplugged if it has no associated PDBs.

Manage Application PDBs

To create an application PDB you must be connected to an application
root, not the CDB root. The application root container in this case is
in the local instance, but it could be in a remote instance if we
defined a local proxy PDB to pointing to it.
CONN / AS SYSDBA
ALTER SESSION SET container = appcon1;

Once connected to the application root we can create a pluggable
database as normal, only this time it is an application PDB.
CREATE PLUGGABLE DATABASE apppdb1 ADMIN USER pdb_admin IDENTIFIED BY Password1;
ALTER PLUGGABLE DATABASE apppdb1 OPEN;

Once we've created a new application PDB we should sync it with all the
applications defined in the application root. We will discuss
applications later.
ALTER SESSION SET container = apppdb1;
ALTER PLUGGABLE DATABASE APPLICATION ALL SYNC;
Source .... : https://oracle-base.com/articles/12c/multitenant-application-containers-12cr2
--------------------------

multitenant-application-containers-12cr

multitenant-application-containers-12cr
[41]Home » [42]Articles » [43]12c » Here

Multitenant : Application Containers in Oracle Database 12c Release 2 (12.2)

Application containers are a new feature in Oracle Database 12c Release
2 (12.2) that allow you to define an application root, like a mini CDB
root container, along with dependent application container PDBs. An
application root can house one or more applications, each made up of
shared configuration, metadata and objects that are used by the
pluggable databases associated with the application root.

The examples in this article use Oracle Managed Files (OMF) so no file
name conversions are needed. You can add the appropriate
FILE_NAME_CONVERT or PDB_FILE_NAME_CONVERT settings if you need them.
* [44]Manage an Application Root
* [45]Manage Application PDBs
* [46]Manage Applications
+ [47]Install an Application
+ [48]Upgrade an Application
+ [49]Uninstall an Application
* [50]Application Common Objects
* [51]Manage an Application Seed
* [52]Application Container Views

Related articles.
* [53]Multitenant : All Articles

Manage an Application Root

Creating a new application container is similar to creating a regular
PDB, but you need to include the AS APPLICATION CONTAINER clause.
CONN / AS SYSDBA

CREATE PLUGGABLE DATABASE appcon1 AS APPLICATION CONTAINER ADMIN USER app_admin
IDENTIFIED BY Password1;
ALTER PLUGGABLE DATABASE appcon1 OPEN;

You can also create an application container by cloning an existing
PDB.

Once the application container is closed it can be dropped in the
normal way provided it has no associated PDBs.
CONN / AS SYSDBA

ALTER PLUGGABLE DATABASE appcon1 CLOSE;
DROP PLUGGABLE DATABASE appcon1 INCLUDING DATAFILES;

Basic management of the application container is similar to a regular
PDB, including cloning, unplug, plugin etc. An application container
can only be unplugged if it has no associated PDBs.

Manage Application PDBs

To create an application PDB you must be connected to an application
root, not the CDB root. The application root container in this case is
in the local instance, but it could be in a remote instance if we
defined a local proxy PDB to pointing to it.
CONN / AS SYSDBA
ALTER SESSION SET container = appcon1;

Once connected to the application root we can create a pluggable
database as normal, only this time it is an application PDB.
CREATE PLUGGABLE DATABASE apppdb1 ADMIN USER pdb_admin IDENTIFIED BY Password1;
ALTER PLUGGABLE DATABASE apppdb1 OPEN;

Once we've created a new application PDB we should sync it with all the
applications defined in the application root. We will discuss
applications later.
ALTER SESSION SET container = apppdb1;
ALTER PLUGGABLE DATABASE APPLICATION ALL SYNC;
Source .... : https://oracle-base.com/articles/12c/multitenant-application-containers-12cr2
--------------------------

oracle-db-12cr2-rac-installation-on-oracle-linux-6-using-virtualbo

oracle-db-12cr2-rac-installation-on-oracle-linux-6-using-virtualbo
[41]Home » [42]Articles » [43]12c » Here

Oracle Database 12c Release 2 (12.2) RAC On Oracle Linux 6 Using VirtualBox

This article describes the installation of Oracle Database 12c Release
2 (12.2 64-bit) RAC on Linux (Oracle Linux 6 64-bit) using VirtualBox
(5.1) with no additional shared disk devices.
* [44]Introduction
* [45]Download Software
* [46]VirtualBox Installation
* [47]VirtualBox Network Setup
* [48]Virtual Machine Setup
* [49]Guest Operating System Installation
* [50]Oracle Installation Prerequisites
+ [51]Automatic Setup
+ [52]Manual Setup
+ [53]Additional Setup
* [54]Install Guest Additions
* [55]Create Shared Disks
* [56]Clone the Virtual Machine
* [57]Install the Grid Infrastructure
* [58]Install the Database Software
* [59]Create a Database
* [60]Check the Status of the RAC

Related articles.
* [61]All RAC Articles
* [62]Oracle Database 12c Release 2 (12.2) RAC On Oracle Linux 7
Using VirtualBox

Introduction

One of the biggest obstacles preventing people from setting up test RAC
environments is the requirement for shared storage. In a production
environment, shared storage is often provided by a SAN or high-end NAS
device, but both of these options are very expensive when all you want
to do is get some experience installing and using RAC. A cheaper
alternative is to use virtualization to fake the shared storage.

Using VirtualBox you can run multiple Virtual Machines (VMs) on a
single server, allowing you to run both RAC nodes on a single machine.
In addition, it allows you to set up shared virtual disks, overcoming
the obstacle of expensive shared storage.

Virtual RAC

Before you launch into this installation, here are a few things to
consider.
* The finished system includes the host operating system, two guest
operating systems, two sets of Oracle Grid Infrastructure
(Clusterware + ASM) and two Database instances all on a single
server. As you can imagine, this requires a significant amount of
disk space, CPU and memory.
* Following on from the last point, the VMs will each need at least
4G of RAM, preferably more if you don't want the VMs to swap like
crazy. Don't assume you will be able to run this on a small PC or
laptop. You won't.
* This procedure provides a bare bones installation to get the RAC
working. There is no redundancy in the Grid Infrastructure
installation or the ASM installation. To add this, simply create
double the amount of shared disks and select the "Normal"
redundancy option when it is offered. Of course, this will take
more disk space.
* During the virtual disk creation, I always choose not to
preallocate the disk space. This makes virtual disk access slower
during the installation, but saves on wasted disk space. The shared
disks must have their space preallocated.
* This is not, and should not be considered, a production-ready
system. It's simply to allow you to get used to installing and
using RAC.
Source .... : https://oracle-base.com/articles/12c/oracle-db-12cr2-rac-installation-on-oracle-linux-6-using-virtualbox
--------------------------