Text box

Please note that the problems that i face may not be the same that exist on your environment so please test before applying the same steps i followed to solve the problem .

Tuesday, 10 April 2012

Using RMAN to perform recovery

To recover a database we have two steps:
1-Retrieving a copy of the datafile from a backup "Restore".
2-Retrieving a copy of the datafile from a backup "Recover".

This should bring the database to the destired SCN (usually the most recent one).


The Restore
command retrieves the datafile onto disk from a backup location on tape, disk, orother media, and makes it available to the database server. RMAN restores from backup any
archived redo logs required during the recovery operation. If backups are stored on a media
manager, channels must be configured or allocated for use in accessing backups stored there.


The Recover command  takes the restored copy of the datafile and applies to it the changes
recorded in the database’s redo logs.

Comparing Complete and Incomplete Recovery





Thursday, 29 March 2012

Determine database character set


You can  run the following SQL to determine whether your database character set is UTF-8. 


SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;


It should return the value AL32UTF8. 

Another option is to run the following SQL :




SELECT * FROM NLS_DATABASE_PARAMETERS;

The value against NLS_CHARACTERSET should be UTF8.It will indicate also the national character set.

Wednesday, 28 March 2012

useful database upgrade notes



I was searching for useful upgrade notes and i found the following so i decided to share it:


Minimizing Downtime During Production Upgrade [ID 478308.1]
Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
Different Upgrade Methods For Upgrading Your Database [ID 419550.1]
Migration of Oracle Database Instances Across OS Platforms[ID 733205.1]
Oracle® Database Upgrade Guide:
10g Release 2 (10.2)
http://docs.oracle.com/cd/B19306_01/server.102/b14238/upgrade.htm#i1011372



Tuesday, 14 February 2012

RMAN backup types


1-A whole database backup includes all datafiles and at least one control file.
Partial database backups may include zero or more tablespaces, zero or more datafiles, and
may or may not include a control file.
Full backups are non-incremental RMAN backups. You can make a full backup of only one
datafile. “Full” does not refer to how much of the database is backed up, but to the fact that the
backup is not incremental.

2-Incremental backups make a copy of all data blocks that have changed since some previous
backup. Oracle Database 10g supports two levels of incremental backup (0 and 1). A level 0 or
baseline backup is equivalent to a full backup and contains all data blocks. A level 1
cumulative incremental backs up all database blocks changed since the level 0 backup. A level
1 differential incremental backs up all database blocks changed since a level 0 or level 1
backup. To restore using incremental backups, the baseline backup must first be restored, and
then the incremental backup. You can make incremental backups with Recovery Manager
(RMAN).
Offline backups (also known as cold or consistent backups) are taken while the database is not
open. They are consistent because at the time of the backup, the system change number (SCN)
in the datafile headers matches the SCN in the control files.


Online backups (also known as hot or inconsistent backups) are taken while the database is
open. The backups are inconsistent because, with the database open, there is no guarantee that
the datafiles are synchronized with the control files.

Why Do we need to backup our data?

We need backup because of the following:
• Media failure: The failure of a read or write of a database file due to a physical problem with the file.
• User errors: Data in your database is changed or deleted incorrectly.

Responding to User Error
Possible responses to user error include:
• Re-entering the lost data manually, if a record of the changes exists.
• Importing the dropped object, if a suitable export file exists or the object is still available on a standby
database.
• Performing tablespace point-in-time recovery (TSPITR) of one or more tablespaces.
• Returning the database to a past state using database point-in-time recovery.
• Using one of the Oracle Flashback features to recover from logical corruption by returning affected objects to a past state.