Skip to main content


Showing posts from November, 2015

Multitenant and standby: recover from subsetting

In the previous post we learnt how to exclude a PDB (or a datafile) from the standby database recovery. Of course, that might not be the real end goal. We may just want to skip it for now, but have the standby continue to be up-to-date for every other PDB, and eventually include the new PDB as well.

Again, standard Oracle pre-12c DBA knowledge is helpful here. These files are just missing datafiles and thus a backup can be used to restore them. The new 12c features add some quirks to this process, but the base is just sound backup and recovery.

Backup So let's start with a proper backup:

rman target=/ Recovery Manager: Release - Production on Mon Nov 16 12:42:38 2015 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. backup database; connected to target database: CDB2 (DBID=600824249) Starting backup at 16-NOV-15 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=193 devic…

Multitenant and standby: subsetting

In the previous post we looked at managing new PDBs added to a standby database, by copying the files to the DR server, as required. However, there is another possible approach, and that is to omit the PDB from the standby configuration altogether. There are two ways of achieving this:

1. Do it the old-school way. A long time before 12c arrived on the scene one could offline a datafile on the standby database to remove it. The same trick is used in TSPITR (tablespace point-in-time recovery), so that you don't need to restore and recover the entire database if you are only after some tablespaces.
2. adds the option to automatically exclude the PDB from standby(s). And 12.2 adds the option to be more specific in case of multiple standbys.

For the sake of curiosity I started by setting standby file management to manual again. What I found is that there was very little difference, and the steps to take are exactly the same - it’s just the error message that is slightly di…

Multitenant and standby databases

As you probably know, the Oracle 12c multitenant feature consists of a container database (CDB) and one or more pluggable databases (PDBs). Each PDB has a separate set of data files, however, a lot of other components are still shared.
The obvious one is the instance itself and, after all, that's a major selling point for this feature in the first place (i.e.; consolidation). But even at the database (=disk) level, a lot of things are common:

The dictionary is partially shared (linked) Redo logs contain changes for all PDBs and the CDB The undo is also shared (however, watch 12.2 for a possible change with this)
The nature of a shared (linked) dictionary and common redo logs imply that a standby (Data Guard) configuration is set up at the CDB level. One source CDB means one target CDB, with all PDBs going to the same single target CDB in a 1:1 relationship.

This problem is not completely new, having been introduced with transportable tablespaces in Oracle 8i – but the CDB is now …

Multitenant CDB views trick

In this post, let's look at the new dictionary views added by multitenant: the CDB views and how they actually work.
With the advent of Oracle 12c, and the multitenant database, one more layer of naming has been added. It is no longer enough to specify just the schema and table as a unique identifier, and that new required layer is, of course, the PDB.

Oracle has decided to keep things much the same for a user connecting to a PDB; although a DBA can see some differences (e.g. redo), a user (or an application) can be virtually oblivious to this new multi-tenancy functionality.
One of the consequences is that Oracle decided to have all DBA (plus ALL and USER) views show only the current PDB. So to show data from all PDBs a new family of views has been introduced; the CDB views. Generally speaking then, for any DBA view showing all objects in a PDB, there is an associated CDB view that displays this information globally, across all PDBs.
CDB$VIEW In, Oracle introduced a …

Update on my sessions for download

This year, I presented at Collaborate at April, I recently returned from Open World when I also had one presentation, and in a week or so I am to present at DOAG, too.

So let me recap all the links for these presentations:

What a DBA Should Know or How to Know Your Way Around Database (unique and non-unique IDs in the data dictionary) (DOAG 2015, presentation PDF, whitepaper PDF files for download, 0.6MB), 2015 Internals of the Oracle Database 12c Multitenant Architecture (Oracle OpenWorld 2014, Collaborate 2015, UKOUG 2015 updated for Oracle Open World 2015, PDF file for download, 0.8MB), 2015
And just to recap, 2014 presentations:
Evolution of Oracle Database Redo Logs Through Versions (Oracle OpenWorld 2014, NZOUG 2014, PDF file for download, 1.1MB), 2014Life of a transaction (NZOUG 2014, PDF file for download, 0.8MB), 2014

OCM 12c uprgade exam available

I have not noticed before, but the OCM 12c upgrade exam (that is, from 11c), is finally available. The Oracle University has now a proper page for it.
The pricing is same as for the 11g and the format seems to be the same, too. One day.

Truth to Oracle tradition, there is another page for this event, too. The second page has less details, but has a link to OCM exam schedule.

This also shows that the full 2-day 12c OCM is not available yet.

So I guess now I have to shed off dust of my rusty DBA skills, update them to include the new fancy 12c stuff and hopefully in February I will be ready for a try in Munich.