Tuesday, February 17, 2015

RDBMS -- 11gR2 & Windows Single Node to Linux RAC(2 nodes) migration

Recently, migrated an Oracle Database 11gR2 from Single Node Windows 64 bit to Oracle Linux 64 2 node RAC system. Source database was on a NTFS filesystem. For the target database, as you may guess, we have used Oracle ASM .


Source and target database versions were 11.2.0.3 64 bit, so upgrading the database was not the point.
On the other hand,  the migration was already tricky, but the method that I have chosen for it, made the operation to be a clean work.
Besides, using rconfig reduces the effort that has to be taken in the post configuration phases.
There were other alternatives; but applied the following action plan;

  • Use rman convert the source db to Linux 64 bit.
  • Copy the converted database(like an image copy) to the RAC node 1.
  • Recreate the controlfile in the target and invalidate then validate all the plsql objects .(using transport.sql) --this operation is for creating a database from the converted datafiles in the local filesystem of rac node 1 . it is an in-place operation.
  • Use rconfig to physically move datafile from cooked filesystem(ext3) to ASM. 
  • Make the post configuration and deliver.
Okay. Lets take a look at the steps;

We first take our source database into read only mode,


Then use the plsql in the following picture to ensure that the source database is convertable,


Next, we use rman to convert the source database to "Linux x86 64-bit" .. This operation creates the Linux type datafiles in the directory we speficied in the command.


This operation also creates a sql script (TRANSPORT.sql) for us.. This script will be used in the next steps while we ll be configuring the target instance..


At this point; our work with the source is done, so we can take it back to read write mode.. 
Note that : This was a test run, that's why we took the source database into readwrite mode just after finishing our rman convert operation.. This must not be done for the production instance.. Source Production should be closed at this point..


Next, we copy the converted datafiles to the target system .. Copy them to a local mount point in 1st node

We modify the init.ora in the target according to the target node configuration.


Then, we modify the transport.sql for the target environment. We may change the db sid if we want, also we delete the lines for adding the tempfiles. We leave only one add tempfile line, because of the bug
"Bug 13912880 - Rconfig fails with SQLFatalErrorException ORA-25152 "TEMPFILE cannot be dropped"


Next , we set our target database environment and execute the transport.sql


Once the transport.sql is completed successfully, we have our database up and running in the target Linux Rac node 1..


During the run of the transport.sql , we monitor the invalid objects to estimate the finish time of the operation.
We also check the database for compatible parameter comparing with the ASM diskgroup compatabilities accordingly.


Next we configure rman parallelism for the upcoming rconfig operation.. Here we are using 12 parallel processes.. This parallelism should be equal to the disk heads of the associated storage devices.
.

Next, we configure our rconfig configuration xm file, and run rconfig..
Note that we can also run the rconfig by editing the xml file .. The line "Convert Verify = ONLY " makes rconfig to check the possible errors, and reports them.. If we see any problems after running rconfig with "ONLY" argument, we fix the errors and then reexecute the rconfig..
Once all the errors dissapear, we make Convert Verify = YES and run rconfig again.. Rconfig makes the real conversion when "convert verify=Yes"  is used in xml file.

For example: we got the error in verify phase:
LOG ARCHIVE DEST does not exists on all nodes in the cluster.
Thus, we created the missing directories in node 2 before making the real conversion..


 Okay, here we run the rconfig...


Note that : If we dont have init.ora in default location ($ORACLE_HOME/dbs), we can get ORA-01078 error.
It is because rconfig wants to read the default parameter file during its run.


Altough, convert only completes with success we can still encounter errors during the real conversion..
In these situations, we check the log files under cfgtoollogs/rconfig/SID/sqlLog directory




Moreover; we may got the the tempfile error because of the bug 13912880... Workaround is to have only one tempfile before running rconfig.



When rconfig finishes its run, it sets its Result code to 0 , and reports "Operation Succeeded"


Lastly, we make the post configuration( checking FRA sizes, checking local and scan listener configuration etc, setting optimal process and memory related parameters) in our RAC database and we are done !
We dont have to srvctl add commands and anything else.. All comes configured.

1 comment :

  1. You really did a great job by post this nice and relevant information about the window migration services.
    windows 8 to 10 migration
    windows 10 packaging

    ReplyDelete

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.