Convert databases to different platforms using RMAN
Takeaway: The Oracle Database supports the direct movement of tablespaces from one instance of Oracle to another. In the past, the destination was required to use the same operating system platform as the original. Oracle 10g contains tools in the Recovery Manager (RMAN) to extend these moves to other platforms.
The transportable tablespace feature—copying datafiles directly between Oracle instances instead of unloading and loading data—was introduced in Oracle 8i and has grown in functionality ever since. At first, the tablespace to be moved had to have the same block size as the destination database. The addition of multiple block size support in Oracle 9i removed that limitation. Now, in Oracle 10g, the platform limitation has been largely removed as well.
The Recovery Manager (RMAN) program contains a new CONVERT command that you can use as part of a cross-platform migration. As little as one datafile, up to the entire database, can be transported with the help of this command.
The reason that a conversion is often necessary when moving across platforms is that computers store multi-byte numbers in different ways. The technical term endianness describes this, and the two main schemes are big-endian (high values to low as memory addresses increase) and little-endian (low values to high as memory addresses increase). To properly interpret the data in a tablespace, the bytes have to be ordered correctly for the operating system platform in use.
The view V$TRANSPORTABLE_PLATFORM lists the platforms that RMAN can convert. Each has a platform name and an endian format. By selecting from this view, you can see if the source and destination instances are using the same endianness.
The CONVERT command copies the files instead of working on them in-place, which is much safer but requires enough additional disk space to hold both versions.
There are three main forms of the CONVERT command:
- CONVERT TABLESPACE is only used on the source system and converts all the datafiles in the requested tablespace(s) to the target platform's format.
- CONVERT DATAFILE is only used on the destination system if CONVERT TABLESPACE was not used on the source (or if file name conversion is desired). Because the transported datafiles are not yet associated with a tablespace, they must be converted as datafiles.
- CONVERT DATABASE converts other structures, such as undo segments and parameter files in addition to all the permanent tablespaces. Control files and redo log files are rebuilt. For this option only, both source and destination must have the same endianness.
Even if the two systems use the same endianness, you can still benefit from the CONVERT command. The FORMAT clause enables you to convert pathnames, and one use is to copy datafiles into and out of ASM disk groups.
Listing A shows an example RMAN session on a Windows platform source system (little-endian), converting the USERS tablespace to an IBM zSeries destination system (big-endian). First the tablespace is made read only, using the RMAN SQL command. Then the CONVERT statement copies the files to the flash recovery area, converting them. Finally, the source tablespace is returned to read/write status. The copied files are now available to be copied to the destination server.
Miss a tip?
Check out the Oracle archive, and catch up on our most recent Oracle tips.
Bob Watkins (OCP, MCDBA, MCSE, MCT) is a computer professional with 25 years of experience as a technical trainer, consultant, and database administrator. Visit Bob's site.
Print/View all Posts Comments on this article
|
|
|
|
White Papers, Webcasts, and Downloads
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
- Tom Davenport Study: Linking decisions and information for organizational performance IBM Tom Davenport's new client study looks at approaches to linking ... Download Now
- VMware Infrastructure: A Guide to Bottom-Line Benefits VMware Frustrated by the high cost of maintaining or building ever-larger data centers? Get the facts you need to formulate your Virtualization Action Plan. Download Now
- Five Steps to Determine When to Virtualize YourServers VMware Thinking of virtualizing the servers at your company? Use this step-by-step guide to determine when's the best time to make your big move. Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET


