Tuesday, November 4, 2008

Migrate BPEL to Another Windows Server

To start, the below are vital. When in doubt, don't!

  • You're migrating from a Windows machine to a Windows machine.
  • You have a compelling reason against using standard backup and recovery practices to perform this operation.
  • You know how to export and import registry keys.
  • You know how to use the Windows Resource Kit SC.exe command to create Windows Services.
  • You're planning on keeping the new server name and IP Address the same as the old one. This is important!
  • You know the right methodology, based on your organization's best practices, to migrate a server that's going to keep the same name as an existing server.
  • You have no interest in actually trying this in a production environment, because it's not supported, nor is it very wise to go tossing your BPEL instances about like they're bags of candy and your servers are trick-or-treaters.


All that said, here we go.

We had to this to move our Production BPEL Instances to a new set of servers. The original servers were Windows 2003 Server, Standard, 32-Bit, the new are Windows 2003 Server, Enterprise, 64-Bit.

Reinstalling isn't an option, because then we'd have to redeploy several hundred BPEL processes, and go through rounds of regression testing for each process. Ugly. Oracle wasn't much help, and, really, nor should they be, because moving to another server is dicey.

I've performed migrations to different Dehydration Stores in the past, and what always struck me about Oracle on Windows is how self-contained the little buggers are. You have your Oracle Home directories, one Central Inventory, and some registry keys. I figured moving the whole shebang over to another server should be pretty simple. I was a bit off on that one.

This is how it's done.

  1. Build your new server (We'll call this either New, or Target)
  2. Disable all Oracle Services on Original Server (We'll call this Old, Original, or Source)
  3. Perform a log cleanup to minimize the amount of data copied
    -- Remove backup OPMN logs
    -- Remove domain.log files
  4. Copy all Oracle Home directories to exact same volume and path on new server
  5. Copy C:\Program Files\Oracle to the target server
    -- Copy to C:\Program Files\Oracle on 32-Bit systems
    -- Copy to C:\Program Files (x86)\Oracle on 64-Bit systems
  6. Create the following permanent environment variables on the target server
    -- ORACLE_HOME – (Leave Blank)
    -- PATH – Modify to include all Oracle references from the old server
    -- PHPRC – Should point to one of the php5.ini files in an Oracle Home - If your old server doesn't have this, don't freak out, you'll probably be fine.
  7. Export the following registry keys from the source server
    HKLM\Software\ORACLE
    HKLM\Software\Apache Group
    HKLM\Software\ORACLE\inst_loc
  8. On the exported keys, make the following changes (Also, do yourself a favor and read up on the Wow6432Node on 64-Bit Windows. It's an eye-opener)
    -- If moving to a 32-Bit System: No Change
    -- If moving to a 64-Bit System: Change Software\Oracle to Software\Wow6432Node\Oracle
    -- If moving to a 64-Bit System: Change the inst_loc value to reflect Program Files (x86)
  9. Import the above keys into the Target server’s registry
  10. Create Oracle Services using the SC command and the services on the old server as a template
  11. Reboot
  12. Check the OUI to make sure it sees installed applications
  13. Check OPatch on the homes to make sure the inventory is intact.
  14. Start BPEL


That's it.

You can leave comments if you have questions or, better yet, find this process wildly successful.

No comments: