Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Renovate old Apps Server Hardware on oracle

I had a situation to renovate the hardware of very old server and we do not have idea about some of the application running, It may be fresh installation of application can create performance issue and also we are facing the complexity of same patched version oracle binaries. I planned to restore the whole system through the system restore policy and restore and recover the database with the RMAN cold backup and after performance tuning and testing the different aspect of oracle will provide the same IP configuration to the new server.
This scenario assumes that we have two networked Windows 2003 hosts, DBSERVER and DBSERVER1. A target database named SADHAN is on DBSERVER and is registered in Recovery catalog RMAN. We want to Restore & Recovery of SADHAN on DBSERVER1, while original database server DBSERVER is completely offline. In my case the O/S is Windows 2003 and the Oracle Database Product is 9i R2 ( Standard Edition patched oracle binaries are restored through system restore procedure. Click for More info: Backup & Restoring System using Acronis
If our goal is to perform a Test run of our disaster recovery procedures, or to permanently move a database to a new host, then we can use the Restore & Recovery Procedure.
If we use Restore & Recovery procedure, then the DBID for the restored database will be the same as the DBID for the original database, so after the restore & recovery procedure is completed, if we connect to the Test database and the recovery catalog DB, the recovery catalog will be updated with information about the Test DB that can interfere with RMAN's ability to restore and recover the source database (due to same DBID)
If our goal is to create a new copy of our target database for ongoing use on a new host, then use the RMAN DUPLICATE command instead of Restore & Recovery procedure. The DUPLICATE command assigns a new DBID to the database it creates and enabling it to be registered in the same recovery catalog as the original database.
In the night we planned to take the system restore by shutting down the original database and in the early morning we opened the original database for end user. In the day time we done the system restore to new server using Acronis system restore policy. Finally we are able to get the same oracle binaries. In the next Day I have taken the sufficient downtime for RMAN backup and restore policy synchronies the database.
To do a consistent" backup with RMAN, the database must be mounted as RMAN needs to access and update the control files. With an OS scripted backup pre-RMAN, the database was truly "COLD" -- there would be no Oracle processes running.
At the moment I had to restore the database on the new server the old server was not available anymore.
  1. Taking RMAN COLD backup including  Current Controlfile Backup.
  2. Shutdown the Old Database to restrict any modification.
  3. Copy the backup on other host on the same location as per the DBserver.
  4. Create PFILE from current server and Copy the Destination server location.
  5. Copy or Create tnsname.ora, listener.ora and password file to the destination host folder.
  6. Testing and Validating Listener and RMAN Repository Connection.
  7. Create Oracle Service for windows (in our case just check it is started) and check all other folder is already restored through system restore.
  8. Start the database on new host with the Pfile.
  9. Restore Control file
  10. Restore whole database
  11. Recover whole database.
  12. Validate the Restore & Recovery procedure Correctness.
  13. Enter change the IP address, name of Old server to New server.
  14. Check the Application is running successfully.
  15. After successful testing make the server available for end users.
I have already password file and server parameter file into the new $ORACLE_HOME/dbs
Due to system restore. I also have same directory structure on the new server.
I create a pfile from spfile and copied it into the new server/
Connected to an idle instance.

SQL>STARTUP FORCE NOMOUNT PFILE='D:\oracle\ora92\dbs\sadhan.sql';
SQL>CREATE SPFILE FROM PFILE='D:\oracle\ora92\dbs\sadhan.sql';
File created.
SQL> shutdown immediate; --bounce back the database
SQL> Startup nomount;

Caution: Make sure RMAN is not connected to recovery catalog, otherwise RMAN records information about restored database in recovery catalog as the DBID is same. Thus you are not able to restore and recover the database in future with this RMAN.
C:\> rman target /
connected to target database: SADHAN (not mounted)
RMAN:\>SET DBID 63198018;
RMAN> restore controlfile from "H:\ORABACK\C-1103102985-20100216-02";
RMAN> alter database mount;
RMAN> sql ‘alter database mount’;
Note: The Blue mark command you can choose optionally.
RMAN> list backup;
RMAN> Restore database;
Method: Restore database (when CRD file is Ok) through RMAN
When Database is all ready running only need to synchronies database file.
RMAN> connect target /
connected to target database (not started)
Verify the Database:
Immediate after successful Restore and Recovery operation you must verify this operation later we can use our monitoring script to compare and verify the old and new database.
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            E:\oracle
Oldest online log sequence     0
Next log sequence to archive   1
Current log sequence           1
SQL> Select name, dbid from v$database;
NAME            DBID
--------- ----------
SADHAN       63198018
Finally change the server IP and name with the old IP and name connect it with the same Environment. Our all of the application is running fine having no issue. In fact it was very old idea but preventing us from different complexity and Headache. In next post i will try to explain about how to take system restore so that we can easily start our database on destination server.


Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

7 Steps to configure BDR replication in postgresql

Postgres Streaming Replication Configuration

vacuumlo - removing large objects orphans from a database PostgreSQL