Posts

Showing posts from 2016

Step by Step - How to resolve redo log file corruption using ALTER DATABASE CLEAR UNARCHIVED LOGFILE command

Image
Connect to sys using sqlplus in admin command prompt Check whether your database is in archive log mode or not. Run command ARCHIVE LOG LIST. It will show you the following details: It is always preferable to have your database in archive log mode. The reason being if your database is in archive log mode you can recover from all committed changes in the event of an OS or disk failure. This query will display the path of redo log files, their group and their status. It is always recommended to have a minimum of two members in one group. As you can see I have only 1 member in group 6 whose current status is INACTIVE. I intentionally have 1 member to generate a scenario for the sake of this practical. Now go to the specified path where the redo log member of group 6 is located and open it in a notepad. It will show some symbolic data. Delete couple of lines and save it the original location which is the one we got as a result of query. Why did we do the above step i.

Restoring and Recovering the Database on a New Host using RMAN

Image
This blog will demonstrate detailed steps to restore a database on New Host using RMAN. You can also use it to move a production database to new host as test database. Here, we are going to use the source database with the DB_NAME=ORCL and we are going to restore this ORCL database on the test database machine. 1. Preparing to restore the database on a new host: If you use the procedure in this section, then the DBID for the restored database equals the DBID for the original database. Do not register a test database created in this way in the same recovery catalog as the source database. Because the DBID of the two databases is the same, the metadata for the test database can interfere with RMAN's ability to restore and recover the source database.  Record the DBID for your source database. You can find the DBID by connecting to the database with RMAN as shown below: Take backups of all the datafiles, controlfiles, spfile and archivelog files on the source database

Oracle Database 11g New Feature - Backup-Based Duplication Without a Target Connection

Image
We have Target Database name as TECH And we are creating a duplicate database using RMAN Auxiliary Instance with name as AUXDB by using the backup location but without making connection to target database but we will be accessing Recovery Catalog DB. Note :- This practical assume you have same directory structures and it is performed on same server. Just the database name is different so we are converting the path with respect to dbname only.   Check log_mode of Target Database. Target must be in archivelog mode. Otherwise put the database in archivelog mode. Now create a new database manually or via DBCA say CATDB. Then run the below command on CATDB to set this as the new Recovery Catalog for our Use. Connect to the newly created Recovery Catalog Via RMAN Now register your target database (tech) with newly created recovery catalog database (catdb) On Windows Platform You need to Create a new Instance for auxdb which also creates a password file for the sam