13 Eylül 2017 Çarşamba

RAC => 12cR2 New Feature "Open Instance Read-Only Mode (Mix Mode)"

With 12cR2, there is a new cluster parameter "INSTANCE_MODE" which allows you to open an instance in read-only mode.

This parameter gives the ability your instances can be in a mix-mode.

The following information is from Oracle Docs:
  • READ-WRITE instance is a regular Oracle instance.
  • READ-ONLY instance is an Oracle instance that can only be opened in read-only mode.
  • READ-MOSTLY instance is an Oracle instance that performs very few database writes.


These restrictions apply when setting the parameter on different Oracle Real Application Clusters (Oracle RAC) instances:
1.There must be at least one instance alive with INSTANCE_MODE set to READ-WRITE at any given time. If the only instance with INSTANCE_MODE set to READ-WRITE goes down, all other instances will be brought down by Oracle automatically.
2.An instance with INSTANCE_MODE set to READ-ONLY cannot be the first instance to open a database or any pluggable database (PDB) among all instances in an Oracle RAC cluster.
3.Oracle does not support co-existence of an instance with INSTANCE_MODE set to READ-ONLY and an instance with INSTANCE_MODEset to READ-MOSTLY in the same Oracle RAC cluster.
Demo:




29 Temmuz 2017 Cumartesi

Dataguard => 12cR2 New Feature "Using DBCA to Create Physical Standby Database"


With 12cR2, you can create physical standby database by using DBCA utility. This new feature make the process easier and also automates some steps which you need to accomplish manually at earlier releases.

Restrictions:


  • DBCA can create only single instance standby instance. If required, you can manually convert it to RAC database later.
  • DBCA can only be used to create standby database for non-multitenant primary site.
  • If you want to configure Dataguard Broker, you need to configure it manually too. 
  • Primary database needs to be started via spfile.


Advantages:


  • No need to create static listener (for duplicate method)
  • It creates password file automatically
  • No need to touch any RMAN utility explicitly
  • No need to make entries for "tnsnames.ora" before dbca. You can use direct connection string.
  • You can run additionals scripts after creation progress is finished by using -customScripts parameter.


The basic createDuplicateDB command has the following syntax:


dbca -createDuplicateDB 
    -gdbName global_database_name 
    -primaryDBConnectionString easy_connect_string_to_primary
    -sid database_system_identifier
    [-createAsStandby 
        [-dbUniqueName db_unique_name_for_standby]]
    [-customScripts scripts_list]

Example:


 dbca -silent -createDuplicateDB -gdbName PRMRY -primaryDBConnectionString 192.168.56.101:1521/PRMRY -sid STDBY -sysPassword ora123 -createAsStandby -dbUniqueName STDBY

You need to run the following command at standby site:








10 Temmuz 2017 Pazartesi

Partition => 12cR2 New Feature "Read-Only Partition/Subpartition"



With 12cR2, now you can create or modify your partitions/subpartitions as "READ ONLY" and prevent them against DML operations.


CREATE TABLE list_hash_tab (
  id           NUMBER,
  code         VARCHAR2(10),
  description  VARCHAR2(50),
  created_date DATE
)
PARTITION BY LIST (code)
SUBPARTITION BY HASH (id)
(
   
   PARTITION part_aa values ('AA')
   (
      SUBPARTITION part_aa_01, SUBPARTITION part_aa_02),
   
   partition part_bb values ('BB')
   (
      SUBPARTITION part_bb_01, SUBPARTITION part_bb_02)
);


alter table list_hash_tab modify partition part_aa read only;

alter table list_hash_tab modify subpartition part_bb_01 read only;


28 Haziran 2017 Çarşamba

Dataguard => 12cR2 New Feature "Multiple Instance Redo Apply"

Starting in Oracle 12.2, we can run Redo Apply all or on some standby instances.
With this concept of multiple instance redo apply (MIRA), Redo Apply performance can scale as wide as the target RAC configuration allows.

This feature is crucial for Exadata and RAC customers with demanding high workloads on the primary database. For Active Data Guard customers, they can have real-time access to the data being churned on the primary database.

The ALTER DATABASE RECOVER MANAGED STANDBY DATABASE command, now accepts new INSTANCES [ ALL | integer] clause to start Redo Apply on multiple instances. The ALL option, starts redo apply on all the RAC standby instances that are in open or mount mode. All the instances must be in the same mounted or open mode; one instance cannot be in open mode (Active Data Guard or read-only mode) while others are in mounted mode. The integer option, specifies the number of RAC standby instances that will perform redo apply. We cannot specify which RAC instance(s) will perform the redo apply.

Starting redo apply on multiple instances has the following restrictions:
• In-Memory column store is not supported.
• Block Change tracking (BCT) is not supported.

With multi-node MRP, redo apply performance is now directly correlated to network bandwidth and latency between the primary and standby database environments

11 Haziran 2017 Pazar

RMAN Simulation For Tape


You can test RMAN tape utility without any media manager

CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=/u01/app/oracle/backup/)' format '%U.bck';

CONFIGURE DEFAULT DEVICE TYPE TO 'sbt';

CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 2 BACKUP TYPE TO BACKUPSET;






10 Haziran 2017 Cumartesi

RMAN => 12cR2 New Feature "recover database until available redo"


After you restore your database, it is sometimes possible to lost your archivelogs to recover but even so you want to recover as far as possible and open your database with resetlogs.

Before 12cR2, if you face such a case like that, you need to switch SQL*Plus and run the below command:

recover database using backup controlfile until cancel;
Then, you should say “CANCEL” and open with resetlogs option.

or

you need to identifiy missing archivelog and give the "restore" command with until sequence/until time option.

After 12cR2, you dont need that extra step, you can directly say to oracle with RMAN to recover database  as far as possible and cancel it automatically.


The below screenshot is from classic output if I delete the sequence 5 manually.
























And this is new behaviour with 12cR2, it could recover the database until sequence 5 without issue.


Installation

post for install

Dataguard

post for dataguard

PL/SQL

post for plsql

DB Admin

Exadata

post for exadata