Posts

Showing posts from September, 2010

Rebuild reporting database

In one of my previous posts , I had spoken about creating a reporting database that is editable at the same time, though the edits are transient. The last month, I faced an interesting situation wherein we had to rebuild this reporting database. In this post, I'll talk about rebuild the reporting database when it is corrupted. Context The standby database has been corrupted due to a server crash and needs to be rebuilt from the primary database. Solution I followed the steps mentioned in this post about creating a physical standby database. The steps in the pre-requisites can be skipped because they are already existing. The rest of the steps hold good!

Creating a physical standby database

Requirement Create a standby database for the primary production database. Pre-requisites 1. The primary database is in archive log mode. 2. Primary and standby database names: Primary DB Name: PRIM Primary DB Host: primary.hostname.com Standby DB Name: STBY Standby DB Host: standby.hostname.com 3. Initialization parameters required for enabling standby instance to be set on the primary: *.LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM,STBY)' *.LOG_ARCHIVE_DEST_2='SERVICE=STBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STBY' *.log_archive_dest_state_2='ENABLE' *.log_file_name_convert='/u001/app/oracle/stby/data/','/opt/apps/prim/data/' *.standby_file_management='auto' *.db_file_name_convert='/u001/app/oracle/stby/data/','/opt/apps/prim/data/' *.fal_client='PRIM' *.fal_server='STBY' *.db_name='PRIM' *.db_unique_name='PRIM' 4. The listener and tnsnames to be modified on the pr