view counter

Feed items

V$DATABASE.CREATED -- is this the Database Creation timestamp ?

Some of us who have done more than one CREATE CONTROLFILE and observed what happens know that V$DATABASE.CREATED is not "Creation date of the database".
It is actually "Creation date of the *controlfile*". I am surprised that even the 11.2 documentation hasn't been updated yet.

Here's a simple demonstration :


SQL> select created, sysdate from v$database;

CREATED SYSDATE
--------- ---------
02-MAY-10 20-JUL-10

SQL> alter database backup controlfile to trace;

Database altered.

(Off Topic) : "Now Is That Architecture ?"

Here's a post about an implementation that IT and Business should both study.

.
.
.

Some Common Errors - 6 - Not collecting Metrics

In recent versions, Oracle Enterprise Manager, StatsPack and AWRs have automated collection of Metrics. Unfortunately, these aren't preserved for a long time.

Know your data and write a better query

If you "know" your data you can find opportunities to improve your query. This without having to add indexes and even as you have 100% statistics on the table and full histograms.

Here is a simple case study :

RECOVER DATABASE starts with an update -- 2

Continuing my previous post where I showed that a RECOVER DATABASE USING BACKUP CONTROLFILE starts with an Update

I STARTUP MOUNT the database :


ora10204>sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jun 4 22:55:11 2010

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

RECOVER DATABASE starts with an update

There have been a few questions on my blog about the RECOVER DATABASE command :
Suppose I dont need incomplete recovery but I issued "recover database using backup controlfile"
I notice that I cannot issue normal recover command anymore.
Does this statement modifies something?

Database Links

Recently I came across a question on Database Links.

A Database Link, I define as, is an implicit connection from one database to another which is used to reference / extract / update data from/in the remote database.
Here are some "guidelines" I would advise :
1. Check with your IT Security department / Guidelines / SOPs / Standards about whether Database Links are permitted and, if so, what conditions/restrictions apply to them before creating a Database Link.

Cardinality Estimation

The Explain Plan output for an SQL statement shows the Execution Plan that the Optimizer has determined to be the "best" to satisfy the submitted SQL statement.
The Cardinality (which I define as "number of rows retrieved for a certain step in the execution plan") estimation done by the Optimizer is critical.

Read Only Tablespaces and BACKUP OPTIMIZATION

A Read Only Tablespace does not get updated. The datafile headers, too, are not updated.
The BACKUP OPTIMIZATION feature of Oracle RMAN identifies files not changed since the last backup as files for which the backup can be "optimized" -- i.e. *skipped*. I disagree with the title "OPTIMIZATION" and find it misleading.

Here is an example of a Read Only Tablespace and BACKUP OPTIMIZATION.

First a create a Read Only Tablespace with some data :


ora10204>sqlplus ' /as sysdba'

Database and SQL Training

A friend of mine, Stephane Faroult has created a site "Konagora" with free introductory tutorials on databases and SQL.
Stephane is the author of "The Art of SQL" and "Refactoring SQL Applications". Although both are targeted towards developers (who need not be on Oracle or Oracle-only), the latter book has even been useful to me as a DBA interested in Performance Tuning.

view counter