In certain circumstances, it may be desirable to restore a
database from an RMAN backup onto a machine other than the original
host.
For example,Restore and recover data at a given point in time for UAT/Testing, or to
duplicate a production instance.
The example assumes:
the target database is on host A
the database is to be restored onto host B
the directory structure of host B is different to host A
the ORACLE_SID will not change for the restored database
a recovery catalog is being used
the backups were carried out to disk (for...
Monday, 23 December 2013
Thursday, 19 December 2013
Full Database Recovery or Disaster Recovery.
You use the RESTORE and RECOVER commands to restore and recover the database.RMAN checks last good backup set and restore the datafiles to the state they were in when that backup set was created. When restoring database files with RMAN, it reads the datafile header and makes the determination as to whether the file needs to be restored.
If you cannot restore datafiles to their default locations, then you must update the control file to reflect the new locations of the datafiles. Use the RMAN SET NEWNAME command within a RUN command to specify...
Wednesday, 18 December 2013
Open Physical Standby For Read Write Testing and Flashback
Open the Standby database in read write mode for any reporting or testing and then move it back to standby database using the flashback technology.
Using a combination of Data Guard, restore points, and Flashback Database, a physical standby database can be opened temporarily in read/write mode for development, reporting, or testing purposes, and then flashed back to a point in the past to be reverted back to a physical standby database. When the database is flashed back, Data Guard automatically synchronizes the standby database with the...
Tuesday, 17 December 2013
Disable a table Constraints
ORA-02297: cannot disable constraint -dependencies exist
Whenever you try to disable a constraint of a table it fails with error message ORA-02297: cannot disable constraint -dependencies exist as below.
SQL> alter table transaction disable constraint TRANSACTION_PK;
alter table transaction disable constraint TRANSACTION_PK
*
ERROR at line 1:
ORA-02297: cannot disable constraint (OMS.TRANSACTION_PK) - dependencies exist
Cause :
Disable constraint command fails as the table is parent table and it has foreign key that are dependent on...
DATABASE HEALTH CHECK
One of the daily task for oracle DBA to measure the health of databases.
This includes the database status,instance name, database open mode, start up time,DR status,Archive log generation etc.
The following script can be used to generate the oracle Database health Report. Below script is very basic script written to check database status, additions can be made to script as per the requirements.
This report generates the following basic checks.
1. DATABASE STATUS
2. DATABASE NAME AND MODE
3. DR DATABASE STATUS
4....