SQL Query to Get / Find out Character Set Information of an Oracle Database

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
The script queries the NLS_DATABASE_PARAMETERS view to retrieve character set-related information of the database. Here's what the script does: PARAMETER: This column represents the name of the parameter related to character sets. VALUE: This column contains the value of the character set parameter. The WHERE clause filters the results to include only rows where the parameter name contains the string "CHARACTERSET". This ensures that you get the relevant character set information.
set pages 100 lines 120 col parameter for a40 col value for a30 
SELECT
  PARAMETER,
  VALUE
FROM
  NLS_DATABASE_PARAMETERS
WHERE
  PARAMETER LIKE '%CHARACTERSET%';
advertisements
 
PARAMETER				 VALUE
---------------------------------------- ------------------------------
NLS_NCHAR_CHARACTERSET			 AL16UTF16
NLS_CHARACTERSET			 AL32UTF8

In this sample output, you can see the character set information of the Oracle database. The NLS_CHARACTERSET parameter indicates the character set used for storing CHAR and VARCHAR2 data types, while the NLS_NCHAR_CHARACTERSET parameter indicates the character set used for storing NCHAR and NVARCHAR2 data types. Please note that the character set information is crucial when working with data that involves different languages, characters, and encodings. It impacts data integrity and compatibility, so it's important to understand and manage character set settings appropriately.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer