ORACLE 8.X에서의 NATIONAL CHARACTERSET

제품 : ORACLE SERVER
작성날짜 : 2002-05-02
ORACLE 8.x에서의 NATIONAL CHARACTERSET
=======================================
PURPOSE
Oracle8 의 new feature인 National Character Set에 대해 설명한다.
Explanation
1. 개관
Oracle 8.0 에서는 Database Character Set 말고도 National Character Set을 정의할 수 있는 기능이 추가 되었다.
2. National Character Set
National character set은 NCHAR, NVARCHAR2, NCLOB 컬럼에 데이터를 저장할 때
사용되는 character set으로 데이터베이스 character set과는 별도로 정의할 수 있다.
National Character Set 값은 데이터베이스 생성시 지정되며, 컬럼 정보에
character set 식별자가 저장된다.
3. National Character Set이 사용되는 data type
1) NCHAR - fixed-length national character set을 저장할 수 있는 data type.
     컬럼의 length는 national character set이 fixed-width일 경우
     character의 갯수로 정의가 되고, varying-width character set일
     경우 byte 단위로 정의 된다.
2) NVARCHAR2 - variable-length national character set을 저장하는 data type.
     NCHAR와 마찬가지로 character set이 fixed-width인지, varing-width
     인지에 따라 컬럼의 length는 byte 단위로 정의가 되거나
     character의 갯수로 정의된다.
3) NCLOB - 4G 까지 national character set 데이터를 저장할 수 있는 data type.
     fixed-width charater set 만 사용할 수 있다.
NCHAR, NVARCHAR2, NCLOB data type은 Oracle 8.0 object의 attribute로 사용될
수 없다.
4. National Character Set을 사용하는 이유
National character set을 사용하는 이유는 다음과 같다.
1) 데이터베이스의 character set의 subset이 ASCII 나 EBCDIC 이어야 할 경우에도
fixed-width multi-type character set을 사용할 수 있다.
2) 데이터베이스에서 사용하는 character set이 아닌 다른 character set을 사용할
수 있게 해 준다.
3) NCHAR와 관련 data type은 SQL'92 표준안을 준수한다.
Fixed-width multi-type character set은 variable-width multi-type character set에 비해 성능상의 장점이 있다.
JS16SJIS나 ZHT32TRIS와 같은 variable-width multi-byte character set에는 수천가지 종류의 character가 있으며, 동일한 character set의 character가 1 byte, 2 byte 혹은 그 이상일 수 있다. 이경우 불가피하게, 각각의 character가 몇 byte인지를 분석하는 부담이 추가 된다.
반면 fixed-width character set은 이와 같은 추가 부담이 없으므로 national
character set을 사용할 경우 fixed-width를 사용하는 것이 좀더 효과적인 처리를
할 수 있게 된다.
Fixed-width multi-byte character set 가운데 일부 character set은 단순히
variable-width multi-byte character set의 일부분일 수 있는데,
이 경우 PL/SQL이나 SQL에서 identifier로 사용하는 single-type character
( 7-bit ASCII, EBCDIC )등이 포함되어 있지 않을 수도 있다. 따라서 데이터베이스
character set 외에 national character set이 필요하게 된다.
5. 고려사항
National character set은 CHAR/VARCHAR2/CLOB등에 사용되는 character set에서
나타낼 수 없는 character를 NCHAR/NVARCHAR2/NCLOB등에 저장하는 데 사용할 수
있다. 하지만, 다음과 같은 제약사항을 고려하여야 한다.
1) 한개의 column에 다른 언어를 조합해 저장할 수 없을 수 있다.
2) NCHAR/NVARCHAR2 컬럼의 liternal을 SQL 문장에 나타낼 수 없을 수 있다.
3) 데이터베이스의 기본 character set만이 object type에 사용될 수 있다.
4) character set과 national character set 이외의 다른 언어의 character set을
나타낼 수 없다.
다국어 애플리케이션에서는 database character set으로 Unicode( UTF8 )을
사용하는 것이 좀더 편리하다.
SQL이나 PL/SQL의 liternal로 national character set을 사용하기 위해서는
national character set이 데이터베이스의 기본 character set의 subset일 경우
가능하다.
National character를 liternal로 사용하기 위해서는 'N'을 앞에 붙인다.
예)
WHERE nchar_column = N'<characters>';
이때 <characters> 는 데이터베이스와 national character set에 모두 속하는
character이어야 한다.
경우에 따라서는 데이터베이스의 character set에 포함되지 않는 national
character set을 사용하여야 할 경우가 있을 수 있다. 이 경우에는
CHR(n USING NCHAR_CS) 함수를 사용하여 NVARCHAR2 값으로 사용하여야 한다.
예)
WHERE nchar_column = CHR(12345 USING NCHAR_CS) || CHR(23456 USING NCHAR_CS);
6. 주의 사항
NCHAR/NVARCHAR2을 OCI나 Pro*C에서 사용할 경우 variable-width character set을
사용할 수 없다. 프로그램을 컴파일할 수는 있으나 실행 시 다음과 같은 에러가
발생한다.
ORA-012704: Character set mismatch
OCI/Pro*C에서 NCHAR/NVARCHAR2에 variable-width character set의 사용은
Oracle 8.1.6에서 지원이 될 예정이다.
7. Fixed-Width Multi-Byte Character Set
Oracle 8에서 새로 지원되는 character set은 다음과 같다.
JA16SJISFIXED
JA16EUCFIXED
JA16DBCSFIXED
ZHT32TRISFIXED
KO16KSC5601FIXED
KO16DBCSFIXED
Reference Ducumment
<Note:62107.1>

Chinese and other Asian Linguistic Sorts are available in Oracle9i only.

Similar Messages

  • ORACLE 9I 에서의 NATIONAL CHARACTERSET(AL16UTF16)

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-27
    ORACLE 9I 에서의 NATIONAL CHARACTERSET("AL16UTF16" )
    ===================================================
    Description
    ~~~~~~~~~~~
    Oracle 9i 에서는 NCHAR(National Character Set) 를 UTF8 와 AL16UTF16 만을 지원한다.
    AL16UTF16 는 Oracle 9i 에서 새롭게 소개된 character set으로 16 bit unicode data 이다.
    그러므로 기존에 다양한 NCHAR 를 설정한 Oracle 8/8i 의 client에서 Oracle 9i 로 connect시
    지원하지 않는 NCHAR 로 문제가 야기될 수 있다.
    National Language Support character 이 지원하는 datatypes 은 다음과 같다.
    National Language Support character datatypes:
    NCHAR
    NVARCHAR2
    NCLOB.
    Oracle 9i 에서는 default NATIONAL CHARACTER SET 이 AL16UTF16 으로 설정되어 DB가 생성된다.
    8/8i 에서는 지원하지 않는 character set 이므로 character set이 깨지는것을 막고 data가 정상적으로
    저장되게 하기 위해서는 8/8i 의 client side에 NLS patch 를 적용해야만 한다.
    (NCHAR, NVARCHAR2 or NCLOB column data 사용이 가능하게 된다.)
    다음과 같은 경우 문제 발생
    ~~~~~~~~~~~~~~~~~~~~~~~~
    - 8/8i 과 9i 연동해서 datatype을 NCHAR, NVARCHAR2 or NCLOB 를 사용하고자 할 경우
    - Oracle 8/8i client 에서 9i의 NCHAR, NVARCHAR2 or NCLOB data 를 수정하거나 읽고자 할 경우
    Possible Symptoms
    ~~~~~~~~~~~~~~~~~
    a. Client 8/8i 에서 Oracle 9i 에 접속하여 NCHAR, NVARCHAR2 or NCLOB column 의 data를
    access 하고자 할때 다음 처럼 quer가 수행된다.
    eg: Assume a table NC defined as ( A VARCHAR2(10), B NVARCHAR2(100) )
    From an Oracle8 client running WE8DEC:
    SQL> insert into nc values('hello','hello');
    SQL> select * from nc;
    A B
    hello h e l l o
    ^^ Note the extra spaces between characters
    b. db link 를 이용하여 data 를 access 하고자 할때 ORA-24365 에러 발생
    SQL> select * from [email protected];
    ERROR at line 1:
    ORA-02068: following severe error from V9.WORLD
    ORA-24365: error in character conversion
    Workarounds
    ~~~~~~~~~~~
    새로운 character set 에 대한 이해가 가능토록 Patch 적용을 수행하거나
    NATIONAL CHARACTER SET 으로 UTF8을 사용하는 것이다.
    Patch 적용후에 query를 수행한 결과
    Eg:
    SQL> select convert(b,'WE8DEC') from nc;
    CONVERT(B,'WE8DEC')
    hello
    만약 Oracle 8/8i 를 Oracle 9i로 migratio 을 해야 한다면 다음 단계를 따라야 한다.
    Migration Path
    ~~~~~~~~~~~
    Oracle8/8i에서 NCAHR 를 사용하는 경우 우선 Oracle server 8.2로 다음 단계처럼
    migration 을 수행한다.(character set이 UTF8 인경우 제외)
    1) NCHAR, NVARCHAR, or NCLOB column이 포함된 table에 대해 모두 export를 한다.
    2) NCHAR, NVARCHAR, or NCLOB column이 포함된 table을 모두 drop 한다.
    3) Oracle8 Migration Utility를 이용하여 Oracle 8.2 로 upgrade를 한다.
    4) export 받은 table을 모두 import 한다.
    다음은 patch 에 대한 정보이다.
    Patches
    ~~~~~~~
    Oracle intends to make patches available for 8.1.7 and 8.0.6
    on all platforms where these releases are available. These patches
    can be used with any patch set release on that platform.
    Eg: The patch for 8.0.6 on HPUX 32 bit can be used with 8.0.6.0, 8.0.6.1,
    8.0.6.2 or 8.0.6.3.
    The patches must be installed in the ORACLE_HOME of any tools being
    used to connect to the Oracle9i database, and in the ORACLE_HOME of
    any Oracle8/8i server which uses database links to an Oracle9i instance.
    Oracle does not intend to make patches available for any other releases
    unless explicitly requested to do so. Any such request would need to be
    made whilst the target release is still in its "Error Correction Support"
    period. (Note : 8.1.6 will be desupported from October 2001)
    References
    ~~~~~~~~~~
    Note. 140014.1
    Notification of desupport of other NCHAR character sets besides UTF8 and AL16UTF16 <Note:102633.1>
    The base bug for tracking patches for this issue is <Bug:1634613>

    This is embarrasing, I feel just like a fool, I was reading Oracle 9i R2 documentation instead of Oracle 9i R1 documentation, that's why I was using "EXTENT MANAGEMENT LOCAL". Definitely I need get some sleep.
    You are right, I removed "EXTENT MANAGEMENT LOCAL" and additionally I changed "DATAFILE" for "TEMPFILE" at the specification of default temporary tablespace and the DB was successfully created.
    Thanks a lot!

  • Unicode Migration using National Characterset data types - Best Practice ?

    I know that Oracle discourages the use of the national characterset and national characterset data types(NCHAR, NVARCHAR) but that is the route my company has decide to take and I would like to know what is the best practice regarding this specifically in relation to stored procedures.
    The database schema is being converted by changing all CHAR, VARCHAR and CLOB data types to NCHAR, NVARCHAR and NCLOB data types respectively and I would appreciate any suggestions regarding the changes that need to be made to stored procedures and if there are any hard and fast rules that need to be followed.
    Specific questions that I have are :
    1. Do CHAR and VARCHAR parameters need to be changed to NCHAR and NVARCHAR types ?
    2. Do CHAR and VARCHAR variables need to be changed to NCHAR and NVARCHAR types ?
    3. Do string literals need to be prefixed with 'N' in all cases ? e.g.
    in variable assignments - v_module_name := N'ABCD'
    in variable comparisons - IF v_sp_access_mode = N'DL'
    in calls to other procedures passing string parameters - proc_xyz(v_module_name, N'String Parameter')
    in database column comparisons - WHERE COLUMN_XYZ = N'ABCD'
    If anybody has been through a similar exercise, please share your experience and point out any additional changes that may be required in other areas.
    Database details are as follows and the application is written in COBOL and this is also being changed to be Unicode compliant:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16

    ##1. while doing a test convertion I discovered that VARCHAR paramaters need to be changed to NVARCHAR2 and not VARCHAR2, same for VARCHAR variables.
    VARCHAR columns/parameters/variables should not by used as Oracle reserves the right to change their semantics in the future. You should use VARCHAR2/NVARCHAR2.
    ##3. Not sure I understand, are you saying that unicode columns(NVARCHAR2, NCHAR) in the database will only be able to store character strings made up from WE8MSWIN1252 characters ?
    No, I meant literals. You cannot include non-WE8MSWIN1252 characters into a literal. Actually, you can include them under certain conditions but they will be transformed to an escaped form. See also the UNISTR function.
    ## Reason given for going down this route is that our application works with SQL Server and Oracle and this was the best option
    ## to keep the code/schemas consistent between the two databases
    First, you have to keep two sets of scripts anyway because syntax of DDL is different between SQL Server and Oracle. There is therefore little benefit of just keeping the data type names the same while so many things need to be different. If I designed your system, I would use a DB-agnostic object repository and a script generator to produce either SQL Server or Oracle scripts with the appropriate data types or at least I would use some placeholder syntax to replace placeholders with appropriate data types per target system in the application installer.
    ## I don't know if it is possible to create a database in SQL Server with a Unicode characterset/collation like you can in Oracle, that would have been the better option.
    I am not an SQL Server expert but I think VARCHAR data types are restricted to Windows ANSI code pages and those do not include Unicode.
    -- Sergiusz

  • Database characterset and National Characterset

    Hi,
    I am asking a basic question here in this forum.
    What is a Database Characterset and what is National Characterset? I did google, but did not get too much of help.
    Thanks
    -Neel

    When looking for basic Oracle terms or concepts, better reference the source directly.
    Via http://tahiti.oracle.com you'll find the Globalization Support Guide. Relevant chapter to begin with is 2 - Choosing a Character Set.
    Simply put, database character set is for "char" data types and national character set is for "nchar" data types.
    For most applications the latter is never needed and current recommendation is to choose AL32UTF8 for database character set, which basically makes national character set i.e. unicode data type solution obsolete. See chapter 6 in the same book for more information.

  • Problem: Materialized View between Oracle servers w/different CHARACTERSET

    I am trying to create a MATERIALIZED VIEW where the master table is a remote Oracle 8 server with NLS_CHARACTERSET = 'WE8ISO8859P1'. The destination view is an Oracle 10g with NLS_CHARACTERSET = 'AL32UTF8'.
    I am getting error: ORA-12703: this character set conversion is not supported.
    I've tried to use CONVERT on my SELECT statment but according to the error message, CONVERT does not support 'AL32UTF8'.
    I need help. Please!

    First off, I'd strongly suggest reading through Metalink Note 237593.1 Problems connecting to AL32UTF8 databases from older versions (8i and lower).
    There is a good chance that the destination database character set will need to be converted to UTF8 rather than AL32UTF8 (assuming that this isn't going to cause issues with surrogate pairs). You may be able to keep the destination character set unchanged if you install at least the 8.1.7.4 patchset on the source database as well as a hanfddful of different one-off patches, but it looks like you're probably going to need to change the destination character set.
    Justin

  • Character  set Encoding

    Hi,
    Everybody i just want to know default character set encoding that is
    use to store data in oracle 9i..
    or is there any difference between Mssqi2005 character set encoding and oracle 9i character set encoding.
    please reply................
    regard's
    paritosh tomar

    DarkFiBrE72 wrote:
    Its AL16UTF16,
    From metalink
    Starting in Oracle 9i the National Characterset (NLS_NCHAR_CHARACTERSET) will be
    limited to UTF8 and AL16UTF16.
    For more details refer to The National Character Set in Oracle 9i and 10g
    Any other NLS_NCHAR_CHARACTERSET will no longer be supported.
    When upgrading to 10g the value of NLS_NCHAR_CHARACTERSET is based
    on value currently used in the Oracle8 version.
    If the NLS_NCHAR_CHARACTERSET is UTF8 then new it will stay UTF8.
    In all other cases the NLS_NCHAR_CHARACTERSET is changed to AL16UTF16
    and -if used- N-type data (= data in columns using NCHAR, NVARCHAR2 orNCLOB )
    may need to be converted.
    Edited by: DarkFiBrE72 on Sep 24, 2008 7:12 PMI'm not sure if the OP was referring to the National character set? Is this implied by the corresponding SQL Server characterset mentioned?
    Otherwise I would assume we are talking about the Database character set, which allows numerous different character sets and types (single-byte, multi-byte, Unicode etc. depending on Oracle release).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Lyrics character set encoding?

    Hi,
    For a few of my songs, I accidentily pasted in some French lyrics from Safari while I was using BIG5 character encoding. I've since corrected the lyrics but I think the iPod still tries to show the lyrics using BIG5 encoding. Everything looks ok in iTunes but accented marks don't show up correctly on my nano.
    There's probably a painful way to fix this. Maybe there's an easy way?

    DarkFiBrE72 wrote:
    Its AL16UTF16,
    From metalink
    Starting in Oracle 9i the National Characterset (NLS_NCHAR_CHARACTERSET) will be
    limited to UTF8 and AL16UTF16.
    For more details refer to The National Character Set in Oracle 9i and 10g
    Any other NLS_NCHAR_CHARACTERSET will no longer be supported.
    When upgrading to 10g the value of NLS_NCHAR_CHARACTERSET is based
    on value currently used in the Oracle8 version.
    If the NLS_NCHAR_CHARACTERSET is UTF8 then new it will stay UTF8.
    In all other cases the NLS_NCHAR_CHARACTERSET is changed to AL16UTF16
    and -if used- N-type data (= data in columns using NCHAR, NVARCHAR2 orNCLOB )
    may need to be converted.
    Edited by: DarkFiBrE72 on Sep 24, 2008 7:12 PMI'm not sure if the OP was referring to the National character set? Is this implied by the corresponding SQL Server characterset mentioned?
    Otherwise I would assume we are talking about the Database character set, which allows numerous different character sets and types (single-byte, multi-byte, Unicode etc. depending on Oracle release).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Region type URL  and character set encoding

    Hello,
    I'd like to include static html page using URL region, but there is some translation done between encoding of input static html page and output of HTML DB. Does anyone know how the file encoding is translateded when the page is rendered?
    I have tried some encodings of input file (CP1250, UTF-8, Unicode) but it did not work.

    DarkFiBrE72 wrote:
    Its AL16UTF16,
    From metalink
    Starting in Oracle 9i the National Characterset (NLS_NCHAR_CHARACTERSET) will be
    limited to UTF8 and AL16UTF16.
    For more details refer to The National Character Set in Oracle 9i and 10g
    Any other NLS_NCHAR_CHARACTERSET will no longer be supported.
    When upgrading to 10g the value of NLS_NCHAR_CHARACTERSET is based
    on value currently used in the Oracle8 version.
    If the NLS_NCHAR_CHARACTERSET is UTF8 then new it will stay UTF8.
    In all other cases the NLS_NCHAR_CHARACTERSET is changed to AL16UTF16
    and -if used- N-type data (= data in columns using NCHAR, NVARCHAR2 orNCLOB )
    may need to be converted.
    Edited by: DarkFiBrE72 on Sep 24, 2008 7:12 PMI'm not sure if the OP was referring to the National character set? Is this implied by the corresponding SQL Server characterset mentioned?
    Otherwise I would assume we are talking about the Database character set, which allows numerous different character sets and types (single-byte, multi-byte, Unicode etc. depending on Oracle release).
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Implementation of double byte character in oracle 10.2.0.5 database

    Hi experts,
    There is an oracle 10.2.0.5 standard edition database running on windows 2003 platform. The application team needs to add a column of the datatype double byte (chinese characters) to an existing table. The database character set is set to WE8ISO8859P1 and the national characterset is AL16UTF16. After going through the Oracle Documentation our DBA team found out that its possible to insert chinese characters into the table with the current character set.
    The client side has the following details:
    APIs used to write data--SQL Developer
    APIs used to read data--SQL Developer
    Client OS--Windows 2003
    The value of NLS_LANG environment variable in client environment is American and the database character set is WE8ISO8859P1 and National Character set is AL16UTF16.
    We have got a problem from the development team saying that they are not able to insert chinese characters into the table of nchar or nvchar column type. The chinese characters that are being inserted into the table are getting interpreted as *?*...
    What could be the workaround for this ??
    Thanks in advance...

    For SQL Developer, see my advices in Re: Oracle 10g - Chinese Charecter issue and Re: insert unicode data into nvarchar2 column in a non-unicode DB
    -- Sergiusz

  • How login in BI Publisher from MyApp (Oracle Forms 11.1.2)

    Hi.
    Anyone can help me, as I login from my application in Oracle Forms 11.1.2, BI Publisher 11.1.6
    Thank you very much
    Carlos

    I would not use the national characterset, but change the database characterset instead. Oracle is perfectly capable of suporting multibyte charactersets like UTF-16 or UTF-8.
    Take a look how to verify if you can change the database characterset using csalter or if you'd need to create a new database:
    http://www.oracle-base.com/articles/10g/CharacterSetMigration.php
    If you change the database characterset to e.g. AL32UTF8 your VARCHAR2 columns are multibyte enabled (and depending on your NLS_LENGTH_SEMANTICS the precision you specified are BYTEs or CHARs), and you won't need to change your sourcecode at all.
    The national characterset is there to support multiple charactersets in one database; As you simply want to support multibyte it's by far more easy to change the database characterset. Change the database characterset to AL32UTF8 (4 byte variable-width characterset) and you won't have problems with charactersets at all in the future.
    Also changing to NVARCHAR2 multibyte won't be a easy "alter table modify blabla", as the data itself also needs to be migrated. The whole migration plus the change of your entire code plus the bug that this doesn't even work in forms makes a reinstall of your database install and a characterset migration via exp/imp by far the easiest solution.
    cheers

  • Can you suggest a best way to store and read arabic from oracle database?

    Hi ,
    can you suggest a best way to store and read arabic from oracle database?
    My oracle database is Oracle Database 10g Release 10.1.0.5.0 - 64bit Production on unix HP-UX ia64.
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET WE8ISO8859P1
    I have presently stored the data in nvarchar2 field. But i am not able to display it correctly.

    Using the national characterset should work but there are other factors that you have to consider when working with NCHAR/NVARCHAR2/NCLOB.
    If possible, changing the characterset is usually the best solution if it's a possiblity for you.
    For more info:
    Dear Gurus: Can u pls explain the difference between VARCHAR2 & NVARCHAR2??

  • Charsets - java -oracle

    Hi,
    I am trying to transfer data from an Oracle -Long field to an
    CLOB field in another Oracle- database.
    The transfer of the data works fine, except for the tranfer
    of the euro -currency -sign.
    The charsets of the databases are set to ISO8859-15.
    This charset is supported on my operating system
    Charset.availableCharsets()When i output the hex-representation of the
    euro-sign I get the following:
    ffffffef, ffffffbf, ffffffbd
    according to the ISO8859-15 code-chart this should be 'A4' I guess.
    I have tried various scenarious, e.g reading the input with
    the encoding "ISO8859-15", reading it with "windows-1252" and
    converting it to ISO8859-15, but without any success.
    When I read the data via sqlplus(which also works with ISO8859-15)
    I get the euro currency sign and I get a byte-value 128(which seems
    to be correct). Here the charset conversion seems to be o.k..
    I am using Windows-NT, with Oracle-jdbc-ThinClient.
    somehow the oracle client does some characterset-conversion that
    I am missing, but nevertheless I am just reading the bytes and
    get wrong Hex-digits!!!?????.
    thanks for any help,
    regards,
    alex
    InputStream druckdat = rs.getBinaryStream(colDruckdat);
         try{
            //inputReader = new InputStreamReader(druckdat, "ISO8859-15");
         byte[] byteArr = new byte[10000];
            druckdat.read(byteArr);
         printHexString(byteArr);
         //String string = new String(byteArr, "windows-1251");
         //printHexString(string);
    void printHexString(byte[] byteArr){
                   for(int k=0; k<byteArr.length; k++){
                        if(k % 8 == 0)
                             System.out.println("\n");
                        System.out.print(Integer.toHexString(new Integer(byteArr[k]).intValue()));
                        //System.out.print(new Integer(byteArr[k]).intValue());
                        System.out.print(",   ");

    i am not sure if the problems i had with oracle are identical to yours, but anyway here is what i found out:
    i had a oracle 9i with database character set of ISO8859P1 and national character set UTF8. Problem was that when i wanted to insert or read non-8859-1 characters i just got garbage. Reason was the automatic charset conversion done by the thin driver which first converts to the database character set before sending the data to the db. if one uses a NCHAR data type the db then converts it to the national character set in use there. This obviously is a problem when the database character set is only a subset of the national character set, resulting in information loss.
    unfortunately one has to use oracle-specific API (OraclePreparedStatement and its method setFormOfUse( types. NCHAR) so the thin driver doesn't use this conversion. This problem continues if one dynamically creates a SQL statement and wants to do an executeQuery() (standard jdbc API), it again gets converted automagically by the thin driver but OracleStatement has no method to suppress the conversion. So to avoid charset conversion one has to use the UNISTR function and encode the string to UTF-16 code points.
    Of (only some) help were the jdbc developers guide and the globalization docs from oracle you can find on tahiti.oracle.com
    i suspect you suffer from the same problem as 8859-1 and 8859-15 differ most prominently in the euro sign, and i guess your database character set is set to ISO8859P1.

  • Oracle character set confused

    Dear all:
          We installed the Latest NW7.0 SR3 for EP&EP core for my Portal application. After that ,i found that our oralce default character set is UTF-8. But some of other Java codes(Iviews,pages..which we developed on Tomcat envionment.)are based in the environment of Oracle character set ZHS16GBK. So iam confused that The NW7.0 SR3 can only install in 64bit OS and a Unicode system. Can i change the oracle character set from UTF8 to ZHS16GBK. Or how can i install the SAP system whose oracle basing on character set ZHS16GBK.
    Thanks everyone.

    Hello Shao,
    ok lets clarify some things at the beginning.
    A SAP Java system is not "only using" the database characterset, it is using the national characterset (column types NCHAR, NVARCHAR2, NCLOB). You can check this by reading sapnote #669902.
    You can also check sapnote #456968/#695899 for the supported super sets:
    => As of SAP Web AS Release 7.00 and Oracle client 10g, multibyte character sets are no longer supported
    With these informations you can not use ZHS16GBK.
    > But some of other Java codes(Iviews,pages..which we developed on Tomcat envionment.)are based in the environment of Oracle character set ZHS16GBK
    Sorry but i don't understand this sentence.
    What is your problem with the java code? Do you have custom tables with column types CHAR,VARCHAR2 or CLOB?
    Regards
    Stefan

  • Problem in installation of Oracle 9i in windows xp

    hi everybody
    I've encountered an error while installing Oracle 9i. At the end of installation process when it wants to configure "Database Configuration Assistant" it passes the two first steps :
    "Copying database files"
    "Initializing database"
    but it fails through the step of "Creating and starting Oracle instance" at the progress of 81% and it shows an error dialog with no comment and no hint (just an empty window is shown).
    Any help would be greatly appreciated. Thanks in Advance.

    thank you for your help. This is last 50 lines from the install log:
    Starting to execute optional autolaunch configuration tools
    Launched configuration tool Oracle Net Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -Duser.dir=C:\oracle\ora92\network\jlib -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\ewt3.jar;C:\oracle\ora92\jlib\ewtcompat-3_3_15.jar;C:\oracle\ora92\network\jlib\NetCA.jar;C:\oracle\ora92\network\jlib\netcam.jar;C:\oracle\ora92\jlib\netcfg.jar;C:\oracle\ora92\jlib\help3.jar;C:\oracle\ora92\jlib\oracle_ice5.jar;C:\oracle\ora92\jlib\share.jar;C:\oracle\ora92\jlib\swingall-1_1_1.jar;C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\network\tools" oracle.net.ca.NetCA /orahome C:\oracle\ora92 /orahnam OraHome92 /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp,nmp,tcps /cfg local /authadp NO_VALUE /nodeinfo NO_VALUE /responseFile C:\oracle\ora92\network\install\netca_typ.rsp
    Configuration tool Oracle Net Configuration Assistant succeeded
    Result code for launching of configuration tool is 0
    Launched configuration tool Oracle Database Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -DORACLE_HOME="C:\oracle\ora92" -DJDBC_PROTOCOL="thin" -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\ewt3.jar;C:\oracle\ora92\jlib\kodiak.jar;C:\oracle\ora92\jlib\ewtcompat-3_3_15.jar;C:\oracle\ora92\lib\xmlparserv2.jar;C:\oracle\ora92\jdbc\lib\classes111.zip;C:\oracle\ora92\classes;C:\oracle\ora92\jlib\gss-1-1.zip;C:\oracle\ora92\jlib\oembase-9_2_0.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\assistants\jlib\assistantsCommon.jar;C:\oracle\ora92\jlib\share.jar;C:\oracle\ora92\jlib\swingall-1_1_1.jar;C:\oracle\ora92\assistants\dbca\jlib\dbca.jar;C:\oracle\ora92\jlib\help3.jar;C:\oracle\ora92\jlib\oracle_ice5.jar;C:\oracle\ora92\jlib\netcfg.jar;C:\oracle\ora92\lib\vbjorb.jar;C:\oracle\ora92\lib\vbjtools.jar;C:\oracle\ora92\lib\vbjapp.jar;" oracle.sysman.assistants.dbca.Dbca -progress_only -createDatabase -templateName General_Purpose.dbc -gdbName bill -sid bill -datafileJarLocation C:\oracle\ora92\assistants\dbca\templates -datafileDestination C:\oracle\oradata -responseFile NO_VALUE -characterset AL32UTF8 -passwordDialog true Protected value, not to be logged
    Configuration tool Oracle Database Configuration Assistant was canceled
    Result code for launching of configuration tool is -1
    Launched configuration tool Agent Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\network\agent\agentca.jar" oracle.agent.AgentCA /orahome C:\oracle\ora92 /nodeinfo NO_VALUE
    Configuration tool Agent Configuration Assistant succeeded
    Result code for launching of configuration tool is 0
    Launched configuration tool Starting Oracle HTTP service
    Command which is being spawned is C:\oracle\ora92\Apache\Apache//bin/startapache.exe C:\oracle\ora92\Apache\Apache\Apache.exe -k start -d C:\oracle\ora92\Apache\Apache
    Configuration tool Starting Oracle HTTP service succeeded
    Result code for launching of configuration tool is 0
    Error :*** Alert: One or more tools have failed. It is recommended but not required that these tools succeed for this installation. You can now select these tools, read its details to examine why they failed, fix those problems, and retry them. Or, you can click "Next" to continue. ***
    User selected: Yes/OK
    Launched configuration tool Oracle Database Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -DORACLE_HOME="C:\oracle\ora92" -DJDBC_PROTOCOL="thin" -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\ewt3.jar;C:\oracle\ora92\jlib\kodiak.jar;C:\oracle\ora92\jlib\ewtcompat-3_3_15.jar;C:\oracle\ora92\lib\xmlparserv2.jar;C:\oracle\ora92\jdbc\lib\classes111.zip;C:\oracle\ora92\classes;C:\oracle\ora92\jlib\gss-1-1.zip;C:\oracle\ora92\jlib\oembase-9_2_0.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\assistants\jlib\assistantsCommon.jar;C:\oracle\ora92\jlib\share.jar;C:\oracle\ora92\jlib\swingall-1_1_1.jar;C:\oracle\ora92\assistants\dbca\jlib\dbca.jar;C:\oracle\ora92\jlib\help3.jar;C:\oracle\ora92\jlib\oracle_ice5.jar;C:\oracle\ora92\jlib\netcfg.jar;C:\oracle\ora92\lib\vbjorb.jar;C:\oracle\ora92\lib\vbjtools.jar;C:\oracle\ora92\lib\vbjapp.jar;" oracle.sysman.assistants.dbca.Dbca -progress_only -createDatabase -templateName General_Purpose.dbc -gdbName bill -sid bill -datafileJarLocation C:\oracle\ora92\assistants\dbca\templates -datafileDestination C:\oracle\oradata -responseFile NO_VALUE -characterset AL32UTF8 -passwordDialog true Protected value, not to be logged
    Configuration tool Oracle Database Configuration Assistant failed
    Result code for launching of configuration tool is 1
    Warning :*** Alert: Do you really want to exit? ***
    User selected: Yes/OK
    Launched configuration tool LaunchOEM
    Command which is being spawned is C:\oracle\ora92\bin\oemapp.bat console "oem.LoginMode=standalone"
    *** End of Installation Page***
    ShowEndSession = SHOW_END_SESSION_PAGE = true
    User Exit

  • Oracle 9i installation hanging in "Clone Database Creation in Process"

    Hi all,
    I have been struggling in installing the 9i in my laptop.
    Here is my setup,
    OS: Windows Server 2003 Enterprise Edition SP2 in VMWare
    Database: Oracle 9i 9.2.0.1.0
    When it automatically comes to "Database Configuration Assistant", there are 4 steps.
    Copying Database files
    Initializing Database
    Creating and starting Oracle Instance
    Completing database creation
    The 1st 3 steps has been completed and the installation just hangs at the last step when the completion rate is 88%.
    Anyone got problem like this ?
    Here are the details I have so far for the DBCA during installation process,
    Listener Control complete.
    Listener start failed. Listener may already be running.
    Listener configuration complete.
    Default local naming configuration complete.
    Oracle Net Services configuration successful. The exit code is 0
    Since I am completely new to installing DB, please help me to get rid of this frustration.
    Thanks !
    Regards,
    Chris

    Capacity Planner 9.2.0.1.0
              Enterprise Manager Events 9.2.0.1.0
              Enterprise Manager Base Classes 9.2.0.1.0
              Required Support Files 9.2.0.1.0
              Enterprise Manager Installation Prerequisite Checks 9.2.0.1.0
              Utilities Common Files 9.2.0.1.0
              Enterprise Manager Quick Tours 9.2.0.1.0
              Oracle Display Fonts 9.0.2.0.0
              regexp 2.0.20.0.0
              Oracle OLAP Worksheet 9.2.0.1.0
              Oracle OLAP API 9.2.0.1.0
              Oracle Developer Server Forms Manager 9.2.0.1.0
              Oracle Intelligent Agent Base Component Files 9.2.0.1.0
              Oracle Internet Directory Client Common Files 9.2.0.1.0
              Sun JDK 1.3.1.0.1a
              Oracle Directory Manager 9.2.0.1.0
              Visigenics ORB 3.4.0.0.0
              Assistant Common Files 9.2.0.1.0
              Enterprise Manager Paging and OMS Common Files 9.2.0.1.0
              XML Parser for C 9.2.0.1.0
              Oracle Net Configuration Assistant 9.2.0.1.0
              Character Set Migration Utility 9.2.0.1.0
              Enterprise Manage Website Translated Files 9.2.0.1.0
              Oracle Net Manager 9.2.0.1.0
              Oracle Net 9.2.0.1.0
              Oracle Perl Interpreter 5.00503.0.0.0c
              Apache Web Server files 1.3.22.0.0a
              Oracle JDBC/OCI Driver for JDK 1.4 9.2.0.1.0
              Database Configuration Assistant 9.2.0.1.0
              Oracle JDBC/OCI Driver for JDK 1.2 9.2.0.1.0
              Oracle INTYPE File Assistant 9.2.0.1.0
              SQLJ Runtime 9.2.0.1.0
              Oracle JDBC/OCI Interfaces 9.2.0.1.0
              Advanced Queueing (AQ) API 9.2.0.1.0
              Oracle Caching Service for Java 2.1.0.0.0a
              Recovery Manager 9.2.0.1.0
              JSDK 2.0.0.0.0d
              Apache JServ 1.1.0.0.0g
              Oracle interMedia Java Client 9.2.0.1.0
              Oracle Java Layout Engine 2.0.1.0.0
              Oracle Administration Assistant for Windows NT 9.2.0.1.0
              Oracle XML SQL Utility 9.2.0.1.0
              SQLJ Translator 9.2.0.1.0
              Enterprise Login Assistant 9.2.0.1.0
              Oracle Services For Microsoft Transaction Server 9.2.0.1.0
              Enterprise Manager Paging Server 9.2.0.1.0
              Oracle Java Tools 9.2.0.1.0
              Oracle ODBC Driver 9.2.0.1.0
              Authentication and Encryption 9.2.0.1.0
              Oracle Wallet Manager 9.2.0.1.0
              Oracle Database User Interface 2.2.11.0.0
              Oracle SNMP Agent 9.2.0.1.0
              Oracle Provider for OLE DB 9.2.0.1.0
              Oracle Objects for OLE 9.2.0.4.4
              Oracle C++ Call Interface 9.2.0.1.0
              Oracle OLAP Cube Viewer 9.2.0.1.0
              Oracle OLAP CWM Lite 9.2.0.1.0
              Object Type Translator 9.2.0.1.0
              SQL*Plus 9.2.0.1.0
              Oracle Call Interface (OCI) 9.2.0.1.0
              SQL*Loader 9.2.0.1.0
              Secure Socket Layer 9.2.0.1.0
              Oracle Internet Directory Client 9.2.0.1.0
              Oracle Net Listener 9.2.0.1.0
              Advanced Replication 9.2.0.1.0
              Oracle Complete DSS Starter Database 9.2.0.1.0
              Oracle Complete OLTP Starter Database 9.2.0.1.0
              Oracle Starter Database 9.2.0.1.0
              Oracle Message Gateway Common Files 9.2.0.1.0
              Oracle Common Schema Demos 9.2.0.1.0
              Change Management Common Files 9.2.0.1.0
              Oracle UIX 2.0.20.0.0
              Oracle Help for the Web 1.0.7.0.0
              XML Class Generator for C++ 9.2.0.1.0
              XML Parser for C++ 9.2.0.1.0
              XML Parser for Oracle JVM 9.2.0.1.0
              XML Transx 9.2.0.1.0
              XML Transviewer Beans 9.2.0.1.0
              XML Class Generator for Java 9.2.0.1.0
              XSQL Servlet 9.2.0.1.0
              XML Parser for PL/SQL 9.2.0.1.0
              Oracle SQLJ 9.2.0.1.0
              Enterprise Manager Common Files 9.2.0.1.0
              Common Files For Generic Connectivity Using OLEDB 9.2.0.1.0
              Oracle SOAP Client 2.0.0.0.0a
              Oracle Workflow Manager 9.2.0.1.0
              Oracle Net Integration 9.2.0.1.0
              Oracle XML Runtime Components 9.2.0.1.0
              Enterprise Manager Database Applications 9.2.0.1.0
              Oracle SOAP Server 2.0.0.0.0a
              Oracle Database Demos 9.2.0.1.0
              Oracle Ultra Search Common Files 9.2.0.1.0
              Enterprise Manager Console 9.2.0.1.0
              Enterprise Manager Integrated Applications 9.2.0.1.0
              Enterprise Manager Client 9.2.0.1.0
              Database Workspace Manager 9.2.0.1.0
              Oracle interMedia Java Advanced Imaging 9.2.0.1.0
              Oracle interMedia Client Compatibility Files 9.2.0.1.0
              Oracle interMedia Java Media Framework Client 9.2.0.1.0
              Oracle interMedia Client Demos 9.2.0.1.0
              Oracle interMedia Web Client 9.2.0.1.0
              BC4J Runtime for Database 9.0.2.692.1
              Oracle Change Management Pack 9.2.0.1.0
              Oracle interMedia Annotator 9.2.0.1.0
              Data Management Services Common Files 9.2.0.1.0
              Oracle interMedia Common Files 9.2.0.1.0
              Oracle interMedia Image 9.2.0.1.0
              Oracle interMedia Audio 9.2.0.1.0
              Oracle interMedia Video 9.2.0.1.0
              Database Upgrade Assistant 9.2.0.1.0
              Oracle Intelligent Agent Config Tool 9.2.0.1.0
              Oracle Intelligent Agent 9.2.0.1.0
              PL/SQL Embedded Gateway 9.2.0.1.0
              Oracle HTTP Server Extensions 9.2.0.1.0
              Oracle eBusiness Management Extensions 9.2.0.1.0
              Oracle EMD Agent Extensions 9.2.0.1.0
              Oracle interMedia Client Option 9.2.0.1.0
              Oracle SOAP for JServ 2.0.0.0.0a
              MIcrosoft SQLServer(TM) Extensions 9.2.0.1.0
              Oracle Management Pack for Oracle Applications 9.2.0.1.0
              Oracle Windows Interfaces 9.2.0.1.0
              Export/Import 9.2.0.1.0
              Apache Configuration for Oracle XML Developer's Kit 9.2.0.1.0
              Oracle Tuning Pack 9.2.0.1.0
              Oracle Forms Extensions 9.2.0.1.0
              Oracle XML Developer's Kit 9.2.0.1.0
              Oracle Java Server Pages 1.1.3.1.0
              Oracle Diagnostics Pack 9.2.0.1.0
              Oracle Ultra Search Middle-Tier 9.2.0.1.0
              Oracle Dynamic Services Server 9.2.0.1.0
              Oracle Mod PL/SQL Gateway 3.0.9.8.3b
              Apache Configuration for Oracle Java Server Pages 1.1.2.3.0
              Oracle Text 9.2.0.1.0
              Generic Connectivity Common Files 9.2.0.1.0
              New Database ID 9.2.0.1.0
              Database SQL Scripts 9.2.0.1.0
              Generic Connectivity Using OLEDB - SQL 9.2.0.1.0
              Oracle HTTP Server 9.2.0.1.0
              XML 9.2.0.1.0
              Generic Connectivity Using OLEDB - FS 9.2.0.1.0
              iSQL*Plus 9.2.0.1.0
              Generic Connectivity Using ODBC 9.2.0.1.0
              Enterprise Manager Webserver Integration 9.2.0.1.0
              Reporting Framework 9.2.0.1.0
              Oracle interMedia Locator 9.2.0.1.0
              Oracle Management Server 9.2.0.1.0
              Oracle Ultra Search Server 9.2.0.1.0
              Oracle interMedia 9.2.0.1.0
              Oracle Trace 9.2.0.1.0
              Oracle9i Syndication Server 9.2.0.1.0
              Enterprise Manager Web Site 9.2.0.1.0
              Oracle Applications Extensions 9.2.0.1.0
              Oracle Intelligent Agent Extensions 9.2.0.1.0
              Oracle Programmer 9.2.0.1.0
              Migration Utility 9.2.0.1.0
              Oracle Enterprise Manager Products 9.2.0.1.0
              Oracle9i Development Kit 9.2.0.1.0
              Oracle Advanced Security 9.2.0.1.0
              Oracle JVM 9.2.0.1.0
              Database Verify Utility 9.2.0.1.0
              PL/SQL 9.2.0.1.0
              Oracle Database Utilities 9.2.0.1.0
              Oracle9i 9.2.0.1.0
              Oracle Net Services 9.2.0.1.0
              Oracle COM Automation Feature 9.2.0.1.0
              Oracle Data Mining 9.2.0.1.0
              Oracle OLAP 9.2.0.1.0
              Oracle Spatial 9.2.0.1.0
              Oracle Partitioning 9.2.0.1.0
              Enterprise Edition Options 9.2.0.1.0
              Oracle9i Database 9.2.0.1.0
    Starting to execute optional autolaunch configuration tools
    Launched configuration tool Oracle Net Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -Duser.dir=C:\oracle\ora92\network\jlib -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\ewt3.jar;C:\oracle\ora92\jlib\ewtcompat-3_3_15.jar;C:\oracle\ora92\network\jlib\NetCA.jar;C:\oracle\ora92\network\jlib\netcam.jar;C:\oracle\ora92\jlib\netcfg.jar;C:\oracle\ora92\jlib\help3.jar;C:\oracle\ora92\jlib\oracle_ice5.jar;C:\oracle\ora92\jlib\share.jar;C:\oracle\ora92\jlib\swingall-1_1_1.jar;C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\network\tools" oracle.net.ca.NetCA /orahome C:\oracle\ora92 /orahnam OraHome92 /instype typical /inscomp client,oraclenet,javavm,server,ano /insprtcl tcp,nmp,tcps /cfg local /authadp NO_VALUE /nodeinfo NO_VALUE /responseFile C:\oracle\ora92\network\install\netca_typ.rsp
    Configuration tool Oracle Net Configuration Assistant succeeded
    Result code for launching of configuration tool is 0
    Launched configuration tool Oracle Database Configuration Assistant
    Command which is being spawned is C:\Program Files\Oracle\jre\1.1.8\bin/jrew.exe -DORACLE_HOME="C:\oracle\ora92" -DJDBC_PROTOCOL="thin" -classpath ";C:\Program Files\Oracle\jre\1.1.8\lib\i18n.jar;C:\Program Files\Oracle\jre\1.1.8\lib\rt.jar;C:\oracle\ora92\jlib\ewt3.jar;C:\oracle\ora92\jlib\kodiak.jar;C:\oracle\ora92\jlib\ewtcompat-3_3_15.jar;C:\oracle\ora92\lib\xmlparserv2.jar;C:\oracle\ora92\jdbc\lib\classes111.zip;C:\oracle\ora92\classes;C:\oracle\ora92\jlib\gss-1-1.zip;C:\oracle\ora92\jlib\oembase-9_2_0.jar;C:\oracle\ora92\jlib\srvm.jar;C:\oracle\ora92\assistants\jlib\assistantsCommon.jar;C:\oracle\ora92\jlib\share.jar;C:\oracle\ora92\jlib\swingall-1_1_1.jar;C:\oracle\ora92\assistants\dbca\jlib\dbca.jar;C:\oracle\ora92\jlib\help3.jar;C:\oracle\ora92\jlib\oracle_ice5.jar;C:\oracle\ora92\jlib\netcfg.jar;C:\oracle\ora92\lib\vbjorb.jar;C:\oracle\ora92\lib\vbjtools.jar;C:\oracle\ora92\lib\vbjapp.jar;" oracle.sysman.assistants.dbca.Dbca -progress_only -createDatabase -templateName General_Purpose.dbc -gdbName orcl -sid orcl -datafileJarLocation C:\oracle\ora92\assistants\dbca\templates -datafileDestination C:\oracle\oradata -responseFile NO_VALUE -characterset WE8MSWIN1252 -passwordDialog true Protected value, not to be logged

Maybe you are looking for