Saturday, March 31, 2012

Oracle 11g Determining the database characteristics


For transportable table spaces you need to make sure your source and target databases are compatible.
If the target does not have the same endian format yo need to convert the tablespace contents. You can find out the endian types of supported Oracle database platforms  using this query.
select platform_id, platform_name, endian_format
 from v$transportable_platform
 order by endian_format, platform_ID;
This query returns the character set  for your platform (Note the first two lines do some column formatting. I like to use WOR, short for WORD WRAP, to make more readable text)
COLUMN my_platform FORMAT A24 WOR
COLUMN my_endian_format FORMAT  A24 WOR
select platform_name my_platform,
  endian_format my_endian_format
  from v$transportable_platform
  join v$database using(platform_name);
This query returns the NLS_CHARACTERSET (Database Character Set) and the NLS_NCHAR_CHARACTERSET (National Character Set ) for your database
select *
 from v$nls_parameters
 where parameter like ('%CHARACTERSET');