Sunday 27 July 2014

Cloning an Oracle 11gR2 Database from an Existing Oracle 11gR2 Database using The Traditional Cold Backup Technique

Requirement: To clone an existing test database for the application team on the same database server with a planned downtime window for the test database.

Solution: The test database can be cloned by using the traditional cold backup technique, which is as follows -

1. Collect metadata (information about the control file trace, data files, temp files and online redo log files) about the test database using SQL*Plus.
2. Create a pfile for the new database, which will be cloned from the existing test database.
3. Perform a clean shutdown of the test database on the database server.
4. Perform an image copy of the test database files to the corresponding new locations.
5. Startup the new database in NOMOUNT mode.
6. Create the control file of the new database.
7. Open the new database using the RESETLOGS option.
8. Create the tempfile(s) of the new database.
9. Create the spfile of the new database, and bounce the new database.
10. Create the listener entry and TNS entry for the new database, and register the database with the listener.
11. Add the database instance entry to the oratab file.
12. Startup the existing test database on the database server.

Kindly note that the above technique cannot be used in a production environment unless an outage window has been agreed with the customer. In a production environment, we generally use the RMAN Active Duplication technique to clone a database, which is mostly in ARCHIVELOG mode.

Total Duration: 1-2 Hour(s)

Saturday 12 July 2014

Moving an Oracle 11.2.0.4.0 Enterprise Edition Standalone Database from a Red Hat Enterprise Linux 6.0 Node to an Oracle Solaris 11.1 Node Using an Oracle RMAN Full Database Backup

Scene: There is a requirement to move an existing Oracle Enterprise Edition database from a server running Red Hat Enterprise Linux 6.0 to a server running Oracle Solaris 11.1 because of the myriad benefits that Oracle Solaris 11.1 offers over Red Hat Enteprise Linux 6.0.

Solution: One can accomplish the above by using RMAN - Oracle's proprietary backup and recovery manager, which provides database backup, restore, and recovery capabilities addressing high availability and disaster recovery concerns.

In my tutorial below, I will demonstrate to you how to use Oracle RMAN to move an enterprise edition database from one node to another by using the backup, restore and recovery capabilities provided by this fantastic software.

Time Duration: 4-5 hours