Moving Oracle Database Between Mount points

Thursday, September 29, 2011

Ø Take Backup of the database through RMAN. Below are some configuration changes which helps you take the backup effectively. Run the below commands in RMAN prompt.
1. Configure the backup location
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup_dumps/IDC/RMAN_Backups/RMAN_MX210XRL_%U';
2. Switch on contrfolfile autobackup
CONFIGURE CONTROLFILE AUTOBACKUP ON;
3. Set parallel parameter to 2 for the speedy backup.
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
Ø Take Backup of the database along with archives.
RMAN> Backup database plus archivelog;
Ø Create the new logfile groups with new mount point and drop the groups with old logfile members.
SQL>alter database ADD LOGFILE GROUP 4 ('/mwm_oradata_01/MX210XRL/redo04.log') size 100m;
SQL>Alter database drop logfile group 1;
Ø Once the backup is done shut down the database and change the parameter file for appropriate location of controlfiles.
Ø Move the control files physically from OS level to the new mount point(or Create the controlfile from the from rman backup by bringing the database in nomount state).
For 2nd option here is the command:
RMAN>restore controlfile from '/backup_dumps/IDC/MWM21DEV_HotBackup_03082011/RMAN_04mj1i6m_1_1';
Ø Mount the database and run the below command from rman to change the newname for datafiles and to restore the database from latest backup set.
RMAN>run
{
set newname for datafile '/mwm_oradata_03/MX210XRL/system01.dbf' TO '/mwm_oradata_01/MX210XRL/system01.dbf';
set newname for datafile '/mwm_oradata_03/MX210XRL/SYSAUX.dbf' TO '/mwm_oradata_01/MX210XRL/SYSAUX.dbf';
set newname for datafile '/mwm_oradata_03/MX210XRL/UNDOTBS1.dbf' TO '/mwm_oradata_01/MX210XRL/UNDOTBS1.dbf';
set newname for datafile '/mwm_oradata_03/MX210XRL/tools01.dbf' TO '/mwm_oradata_01/MX210XRL/tools01.dbf';
set newname for datafile '/mwm_oradata_03/MX210XRL/cists01.dbf' TO '/mwm_oradata_01/MX210XRL/cists01.dbf';
set newname for datafile '/mwm_oradata_03/MX210XRL/xmldbts01.dbf' TO '/mwm_oradata_01/MX210XRL/xmldbts01.dbf';
Restore database;
switch datafile all;
}
Ø Once done connect to the database as sysdba and run the below command.
SQL> Recover database;
Ø Check the datafile,controlfile and redo log file locations.
SQL> select name from v$datafile;
SQL> select name from v$controlfile;
SQL> select member from v$logfile;

No comments:

Post a Comment

 

Most Reading

Sidebar One

+1-800-574-0902 +44-20-7993-2673 (ID: 173296)