Flashback Logging

One of the waits that is specific to ASSM (automatic segment space management) is the “enq: FB – contention” wait. You find that the “FB” enqueue has the following description and wait information when you query v$lock_type, and v$event_name:


SQL> execute print_table('select * from v$lock_type where type = ''FB''')
TYPE                          : FB
NAME                          : Format Block
ID1_TAG                       : tablespace #
ID2_TAG                       : dba
IS_USER                       : NO
DESCRIPTION                   : Ensures that only one process can format data  (more...)

Managing Oracle Database 12c with Enterprise Manager – Part IX


We are discussing the management of Oracle Database 12c via Oracle Enterprise Manager 12c. In our previous blog post on this topic, we looked at how easy it was to set up Oracle Data Redaction for a 12c database using Enterprise Manager - this capability being used to hide confidential data on the fly as it is being displayed.
We will now look at the Database Resource Manager and its new capabilities to handle PDBs (more...)

Managing Oracle Database 12c with Enterprise Manager – Part VIII


We are discussing the management of Oracle Database 12c in Oracle Enterprise Manager 12c. In our previous blog post on this topic, we started to look at Data Redaction, and created a Policy on the HR user and Salary column. We specified Full Redaction as seen below, to hide all the Salary column figures (a zero will be displayed).


Click on “Show SQL”, this displays the PL/SQL code that is generated to (more...)

Managing Oracle Database 12c with Enterprise Manager – Part VII


We are discussing the management of Oracle Database 12c in Oracle Enterprise Manager 12c. In our previous blog post on this topic, we looked at how user administration is performed for a 12c Database using Enterprise Manager, such as the creation of a common user for the CDB$ROOT.
Let us talk now about the capability of Oracle Data Redaction. This is a new Oracle Database 12c feature, which camouflages data on the fly when being (more...)

PDB Logging Clause : What you give with one hand, you take away with the other…

The Oracle 12c 12.1.0.2 release came with a bit of functionality called the PDB Logging Clause. Or to put it another way, it didn’t because the feature just didn’t work. I raised an SR highlighting the issue.

The PDB logging clause is meant to allow you to define a default logging clause for the whole PDB. If a tablespace is created in the PDB without an explicit logging clause, the current PDB (more...)

Optimizing work environment. Part II, command line

(the first part can be found here)

Now let’s consider command line. There is a lot of things that can be done to improve user experience here as well.

1) Maintain a local script repository on the machine(s) you’re using the most. To make sqlplus search there, define SQLPATH variable (using Control Panel => System => Advanced => Environment variables on Windows, or shell initialization scripts such as .profile or .bash_profile on Unix).

2) (more...)

Recovering an Oracle Database with Missing Redo

Background

I ran into a situation where we needed to recover from an old online backup which (due to some issues with the RMAN “KEEP” command) was missing the archived redo log backups/files needed to make the backup consistent.  The client wasn’t concerned about data that changed during the backup, they were interested in checking some very old data from long before this online backup had started.

Visualizing the scenario using a timeline (not to (more...)

Flashback logging

When database flashback first appeared many years ago I commented (somewhere, but don’t ask me where) that it seemed like a very nice idea for full-scale test databases if you wanted to test the impact of changes to batch code, but I couldn’t really see it being a good idea for live production systems because of the overheads.

Features and circumstances change, of course, and someone recently pointed out that if your production system is multi-terabyte and you’re (more...)

Useful list of Oracle Conferences and Call For Papers

Do you want to know what Oracle conferences are run, where they are and when? Do you present (or are thinking of presenting) and want to know when the call for papers is open?

Then go and look at Jan Karremans’ excellent page on oracle conferences.

It lists most (all?) of the European and US conferences and is a really useful reference – I’ve not come across a similar, maintained list. The below is (more...)

I’m speaking at OUG Ireland

Next March 19th I’ll be speaking at OUG Ireland in Dublin, presenting some cool stuff around Oracle Database 12c, PDB Cloning, ZFS snapshots and Change management through EM12c. The topic is easy going and can be interesting for DBA’s and developers as well. The abstract and agenda of OUG Ireland is in here http://bit.ly/1vg3Lie . […]

Optimizer statistics – Stale percentage and partitioning

Oracle is full of surprises, dbms_stats and optimizer statistics as well. That’s why I’m starting a new series named “Optimized statistics” in which I’ll cover some gathering and usage issues related to them. As we know 11g have a cool feature which tracks how much data we had changed in our objects and if it’s […]

UKOUG Systems Event and Exadata Content

I’ve been involved in organising a couple of upcoming UKOUG events.

I will be involved with the engineered systems stream for the annual UKOUG conference, returning after an absence of a couple of years, to once again being held in Birmingham.

While the planning for this is at a very early stage, Martin Widlake will be giving you the inside scoop on this.

The event I really want to talk about though is an event (more...)

Converting non-CDB database to a PDB when TDE is in use

Converting a non-CDB database to a PDB is a rather straightforward process. However once TDE (Transparent Data Encryption) gets involved certain things become not so obvious so I've decided to write a small guide on how to accomplish that. In order for a non-CDB database to be converted to a PDB it's version needs to be at least 12.1.0.2.0.

Encryption Wallet Location

My encryption wallet location is set to the following (more...)

restore validate archivelog

A common mistake I see in backup validation is not validating archivelog or Level 1 backup.

Here I will demonstrate various methods to validate achivelog.

Validate archivelog and does not list details for archivelog backup set. Too little information?

RMAN> restore validate archivelog from time “TO_DATE(‘2015-MAR-04 22:03:32′,’YYYY-MON-DD HH24:MI:SS’)”;

Starting restore at 2015-MAR-07 10:34:02
using channel ORA_DISK_1

channel ORA_DISK_1: scanning archived log /oradata/archivelog/hawklas/hawk_ba986d3b_1_871886678_245.arc
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from  (more...)

ORA-28221

This post shows that if a profile has a password verify function and you assign it to a user who does not have the ALTER USER privilege, that user will not be able to change his or her password without using the REPLACE option. You can see what I mean in the example below, which I tested in Oracle 11.1. First I created a password verify function:

SQL> conn / as sysdba
Connected.

Revoking OEM12c License Packs

We’ve decided to stop using Database Lifecycle Management Pack in our EM environment (don’t ask).

Disabling a management pack is just as easy as enabling the pack in the first place.

Go to the bottom of the Setup menu and select Management Packs | Management Pack Access.

revoke_mgmtpack_access00

To completely disable the pack, click radio buttons

  • All Targets (Licensable targets and dependent targets)
  • Pack based Batch Update

Select the management pack from the list and move it (more...)

Friday Philosophy – Do Average to Be a Success

A few days ago a friend of mine, helifromfinland, tweeted something that exactly matched the topic that I was thinking of doing my next Friday Philosophy on. Heli said:

I am learning to do things well enough, not always perfect. Even writing that sentence feels so wrong but #babysteps :-D

That made me smile – I know the feeling myself and I know some people for whom it is all-consuming. It is something that I (more...)

Optimizing working environment. Part I, GUI

Working with database performance troubleshooting means dealing with challenging and exciting problems. But it also means doing certain things over and over. And over. Like typing the same query or clicking the same button zillion times a day. And when you’re doing something very frequently, anything that can be done to simplify or automate such tasks becomes very important. So I decided to share some of the tricks I use to optimize my working experience in (more...)

x$bh and consistency

Oracle caches the data blocks in buffer cache in various modes depends on the block usage.  As per the Oracle documentation it can CR (Consistent mode – reads), XCUR (Current mode – updates), FREE etc.   I understand and other heard saying – whenever a block READs into memory will be in CR mode while if the block is fetching for UPDATE it will be in XCUR mode so that sessions can apply the (more...)

RMAN-06023: no backup or copy of datafile # found to restore

There’s a great note from MOS – Checklist for an RMAN Restore (Doc ID 1554636.1) but how many of you review this before performing a restore?

If you don’t then you are as guilty as I am.

RMAN> restore database until time "TO_DATE('2015-MAR-04 19:53:54','YYYY-MON-DD HH24:MI:SS')" preview summary;

Starting restore at 2015-MAR-05 18:03:28
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=9 device type=DISK

datafile 5 will be created automatically during restore operation
datafile 6 will be created  (more...)