Wednesday, January 30, 2019

Oracle :Cross Platform DB migration; Checking Endian Format

Doing cross platform migration using RMAN


Starting from 10gR2, Oracle introduced the next magical feature of RMAN its ability to convert the database from one platform to a different one which shares the same endian format.  This feature is called Cross-Platform Database Migration.  

To convert the database from one platform to another, the endian format of both databases should be the same

To know if we can use RMAN for the migration, We cam query v$transportable_platform view which shows the endian format for almost all Oracle platforms: 


SQL> select * from v$transportable_platform;

PLATFORM_ID PLATFORM_NAME                  ENDIAN_FORMAT
----------- ------------------------------ --------------
1           Solaris[tm] OE (32-bit)          Big
2           Solaris[tm] OE (64-bit)          Big
7           Microsoft Windows NT             Little
10          Linux IA (32-bit)                Little
6           AIX-Based Systems (64-bit)       Big
3           HP-UX (64-bit)                   Big
5           HP Tru64 UNIX                    Little
4           HP-UX IA (64-bit)                Big
11          Linux IA (64-bit)                Little
15          HP Open VMS                      Little
8           Microsoft Windows IA (64-bit)    Little
9           IBM zSeries Based Linux          Big
13          Linux 64-bit for AMD             Little
16          Apple Mac OS                     Big
12          Microsoft Windows 64-bit for AMD Little




The v$database data dictionary view also adds two columns, platform ID and platform name:


select  name, platform_id, platform_name from v$database;

NAME      PLATFORM_ID PLATFORM_NAME
--------- ----------- ---------------------

P3OMS1D5           13 Linux x86 64-bit





To transport a tablespace from one platform to another, datafiles on different platforms must be in the same endian format (byte ordering).
The pattern for byte ordering in native types is called endianness. There are only two main patterns, big endian and little endian. Big endian means the most significant byte comes first, and little endian means the least significant byte comes first.

Thursday, January 24, 2019

Oracle : Difference between .trc and .trm


Oracle *.trm *.trc

A new type of files with .trm extension are created in ADR_HOME/trace directory in Oracle 11g databases. The following are some facts:

  • From 11g onwards, all the trace files are found in ADR_HOME/trace directory.
  • There is usually one “.trm” file for each “.trc” file.
  • The files located in the TRACE directory, with the “.trm” extensions, are called Trace
  • Metadata files. The metadata in .trm files describe the trace records stored inside of .trc trace files.
  • The Trace metadata allows tools, such as ADRCI, to post process the trace information.
  • By deleting the .trm file, you make the .trc file unusable for post processing from ADR using ADRCI tool.