Can Oracle on Windows replicate to Linux for a near-zero down-time server move?
The answer; Yeah, probably…..
I have often thought that there is no good reason why Linux and Windows could not share a database of the same version because after-all they are the same endian type.
And so, when a DSP customer posed the question to the DBA team, i decided it was time to prove (or disprove) the possibility.
I took a Windows 7 Ultimate! edition 64-bit VM, and loaded 184.108.40.206 SE with grid infrastructure for stand-alone server and a single ASM disk (+DATA), and then knocked up an Oracle Enterprise Linux 6.7 VM, and loaded it with 220.127.116.11 GI & RDBMS and got to work!
I used RMAN to backup the MS Win database to a normal NTFS filesystem, got a backup of the SPFILE, created a standby control file, and then loaded the lot onto my NAS before SCP’ing the files across to the waiting OEL 7.
I edited the PFILE for path changes (F:\app\ turned into /u01/app), recreated the password file, and inserted a line into /etc/oratab.
Exported my ORACLE_HOME, ORACLE_SID and PATH variables in my .bash_profile, jumped into SQLPlus, and startup nomount pfile=‘/u01/app/backup/test.pfile’
Create spfile from pfile=‘/u01/app/backup/test.pfile’;
Restarted with no mount, and then switched to RMAN for the moment of truth.
Once in RMAN, I restored the controlfile from ‘/u01/backup/test.ctl’;
alter database mount;
catalog start with ‘/u01/backup/‘ noprompt;
and then performed a crosscheck to get rid of those pesky windows paths out of the control file.
After that, it was a simple matter of restoring and recovering the database, I switched logs a few times on the source (shipped them using the same method - I couldn’t be bothered installing Cygwin).
I only restored one of the logs to the FRA on the new host, and rolled that single new log into the database (SQLPlus> recover standby database) and ….. POINT PROVEN!!!!!!!
After ‘alter database activate standby database;’ and ‘alter database open;’, it was time to start gloating :)