Character Set Error in PL/SQL

Hi,
While connecting to PL/SQL Developer I am getting this following error.
Database character set (AL32UTF8) and client character set (WE8MSWIN1252) are different.
Character set conversion may cause unexpected results.
Note: you can set the client character set through the NLS_LANG registry key in
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_XE.
Please help me avoid this error.
Thanks.

That is presumably a PL/SQL Developer error. You may want to contact the vendor of that particular product to understand that warning because it makes no sense to me.
It is perfectly appropriate, and quite normal, for the client character set to be a subset of the database character set. Setting the client character set to match the database character set can create a host of problems that lead to invalid data being stored in the database. This appears designed to increase the odds that this particular tool will work correctly while decreasing the odds that everything else in your environment will work correctly. That seems like a relatively poor trade-off to me.
Justin

Similar Messages

  • Java Character set error while loding data using iSetup

    Hi,
    I am getting the following error while migrating settup data from R12 (12.1.2) Instance to another R12 (12.1.2) Instance, Both the Database has same DB character set (AL32UTF8)
    we are getting this error while migrating any setup data
    Actual error is
    Downloading the extract from central instance
    Successfully copied the Extract
    Time taken to download Extract and write as zip file = 0 seconds
    Validating Primary Extract...
    Source Java Charset: AL32UTF8
    Target Java Charset: UTF-8
    Target Java Charset does not match with Source Java Charset
    java.lang.Exception: Target Java Charset does not match with Source Java Charset
         at oracle.apps.az.r12.common.cpserver.PreValidator.validate(PreValidator.java:191)
         at oracle.apps.az.r12.loader.cpserver.APILoader.callAPIs(APILoader.java:119)
         at oracle.apps.az.r12.loader.cpserver.LoaderContextImpl.load(LoaderContextImpl.java:66)
         at oracle.apps.az.r12.loader.cpserver.LoaderCp.runProgram(LoaderCp.java:65)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Error while loading apis
    java.lang.NullPointerException
         at oracle.apps.az.r12.loader.cpserver.APILoader.callAPIs(APILoader.java:158)
         at oracle.apps.az.r12.loader.cpserver.LoaderContextImpl.load(LoaderContextImpl.java:66)
         at oracle.apps.az.r12.loader.cpserver.LoaderCp.runProgram(LoaderCp.java:65)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Please help in identifying and resolving the issue
    Sachin

    The Source and Target DB character set is same
    Output from the query
    ------------- Source --------------
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    VALUE
    AL32UTF8
    And target Instance
    -------------- Target----------------------
    SQL> select value from nls_database_parameters where parameter='NLS_CHARACTERSET';
    VALUE
    AL32UTF8
    The Error is about Source and Target JAVA Character set
    I will check the Prevalidator xml from How to use iSetup and update the note
    Thanks
    Sachin

  • Character set error comming in  stored procedure

    i am writing these SQL lines when execute these giving me error
    SQL Lines
    SELECT DocDate,
    NVL(SMTransType.Description, '<Not Provided>') DESCRIPTION,
    CASE
    WHEN DocType = 'GRN' THEN ( SELECT GrnNo
    FROM IVGrnMst
    WHERE ID = DocID )
    END "ReceiptNo",
    CASE
    WHEN DocType = 'PUR' THEN ( SELECT PrNo ---- its data type VARCHAR2(50)
    FROM IVPurReturnMst
    WHERE ID = DocID )
    WHEN DocType = 'SCP' THEN ( SELECT ConsumptionCode --its data type NVARCHAR2(50)*
    FROM IvStoreConsumptionMst
    WHERE ConsumptionId = DocID )
    END "IssueNo"
    FROM IVStockRegister Stock INNER JOIN
    SMTransType
    ON Stock.DocType = SMTransType.Code;
    SQL SQL Error: ORA-12704: character set mismatch
    12704. 00000 - "character set mismatch"

    are you sure your SELECTs on in the case after when return single value?
    try this, please
    SELECT DocDate,
      NVL(SMTransType.Description, '<Not Provided>') DESCRIPTION,
      CASE
        WHEN DocType = 'GRN'
        THEN
          ( SELECT MIN(GrnNo) FROM IVGrnMst WHERE ID = DocID
      END "ReceiptNo",
      CASE
        WHEN DocType = 'PUR'
        THEN
          (SELECT MIN(PrNo) ---- its data type VARCHAR2(50)
          FROM IVPurReturnMst
          WHERE ID = DocID
        WHEN DocType = 'SCP'
        THEN
          (SELECT MIN(ConsumptionCode) --its data type NVARCHAR2(50)
          FROM IvStoreConsumptionMst
          WHERE ConsumptionId = DocID
      END "IssueNo"
    FROM IVStockRegister Stock
    INNER JOIN SMTransType
    ON Stock.DocType = SMTransType.Code;

  • Character set error during startup

    Hi all
    This is a follow up of the following problem: Paralel Install of Ora8i and Ora9i
    Please read it before continue.
    This seems to be a database problem, so that I post it here:
    I'm going forward with my problem. It seems that's a problem with versions in the startup routine. When I try to start the instances with the 9i dbstart tool, all is going well.
    Now I changed the oracle script in /etc/init.d in a was that it will explicitly start the 9i dbstart tool. Now the instances come up normally, except the following error during mount of the instance:
    ORA-12709: error while loading create database character set.
    For me it looks like an mistaken during the creation of the database. Or perhaps its again a version problem.
    Any clue around for this?
    Greetings
    Salvatore

    Ok Here the answers:
    1) Error during startup
    2) Error during startup
    3) Error during startup
    The Oracle Environment seems to be OK. I can use all variables in the oracle script during OS boot.
    I suspect that something is going wrong during the database creation. But in the Oracle Error Message Documentation I read "contact Support Services". So I'm unsure what to do. AFAIK we don't have a support contract, nor I can use any paid service.

  • Character set error oracle 10g

    I have a 10g TARGET database with a single byte character set of western european and 9i SOURCE databse with multibyte character of UTF8 since the character sets are different to load data from 9i to 10g I am using national character set NCHAR columns on target database to store the multi byte data :
    this is the table i am working on loading
    CREATE TABLE RAN_TEST1_MDL
    ( MODEL_ID NUMBER(15) NOT NULL,
    PRODUCT_ID NUMBER(15) NULL,
    MODEL_CODE NVARCHAR2(540) NULL,
    ODM_CODE NVARCHAR2(900) NULL,
    MODEL_DESC NVARCHAR2(1200) NULL )
    tablespace csn_d_01 LOGGING NOCOMPRESS NOCACHE NOPARALLEL MONITORING
    The table is test table on oracle 10g database .
    This is the query I am running
    INSERT /*+append*/ INTO WORK_HIER_MDL(
    MODEL_ID,
    PRODUCT_ID,
    MODEL_CODE,
    ODM_CODE,
    MODEL_DESC
    SELECT
    MODEL_ID,
    PRODUCT_ID,
    MODEL_CODE,
    ODM_CODE,
    MODEL_DESC
    FROM SHLD_HIER_MDL
    shld_hier_mdl is source table from oracle 9i multi byte UTF8 database.
    WORK_HIER_MDL is target table on oracle 10g single byte western european databse
    Error : ORA-29275: partial multibyte character
    When I describe the source table SHLD_HIER_MDL ( on 9i oracle accesed thru a db link ) I get the following error
    ORA-01460: unimplemented or unreasonable conversion requested
    I think ORA-29275 and ORA-01460 are correleted . Can anyone suggest what could be the cause for this ? Thanks

    Error:     ORA-29275 (ORA-29275)
    Text:     partial multibyte character
    Cause:     The requested read operation could not complete because a partial
         multibyte character was found at the end of the input.
    Action:     Ensure that the complete multibyte character is sent from the
         remote server and retry the operation. Or read the partial
         multibyte character as RAW.
    you can export the table and import on 10g.Rename the table,create your test table and use IAS.

  • Non supported character set error

    Hello, I have a j2ee application that uses OLAP API to make queries against cubes created with cwm2 packages, in a database (db 1).
    I've replicated the schema in another db (db 2), importing the user (with a dmp file) and throwing the object creation scripts. This works right, and the objects in the catalog are all validated. But my j2ee application doesn't work against this new user; some errors appears.
    The two databases are the same version, the only difference is that db 2 was installed using WE8ISO8859P15 character set. Is there any problem with this set and the olap api ? The character set in db 1 is WE8ISO8859P1.
    The error is:
    "oracle.express.idl.util.OlapiException: Non supported character set: oracle-character-set-46".
    I'm using ojdbc14.zip and orai18n.zip in the WEB-INF/lib directory of my application. My database version is 10g r. 2 (10.2.0.1.0)
    Thanks by your reply.

    At what point does this error occur? Can you provide more of the stack trace?
    Geof

  • How to review implication of database character set change on PL/SQL code?

    Hi,
    We are converting WE8ISO8859P1 oracle db characterset to AL32UTF8. Before conversion, i want to check implication on PL/SQL code for byte based SQL functions.
    What all points to consider while checking implications on PL/SQL code?
    I could find 3 methods on google surfing, SUBSTRB, LENGTHB, INSTRB. What do I check if these methods are used in PL/SQL code?
    What do we check if SUBSTR and LENGTH functions are being used in PL/SQl code?
    What all other methods should I check?
    What do I check in PL/SQL if varchar and char type declarations exist in code?
    How do i check implication of database characterset change to AL32UTF8 for byte bases SQL function.
    Thanks in Advance.
    Regards,
    Rashmi

    There is no quick answer.  Generally, the problem with PL/SQL code is that once you migrate from a single-byte character set (like WE8ISO8859P1) to a multibyte character set (like AL32UTF8), you can no longer assume that one character is one byte. Traditionally, column and PL/SQL variable lengths are expressed in bytes. Therefore, the same string of Western European accented letters may no longer fit into a column or variable after migration, as it may now be longer than the old limit (2 bytes per accented letter compared to 1 byte previously). Depending on how you dealt with column lengths during the migration, for example, if you migrated them to character length semantics, and depending on how relevant columns were declared (%TYPE vs explicit size), you may need to adjust maximum lengths of variables to accommodate longer strings.
    The use of SUBSTR, INSTR, and LENGTH and their byte equivalents needs to be reviewed. You need to understand what the functions are used for. If the SUBSTR function is used to truncate a string to a maximum length of a variable, you may need to change it to SUBSTRB, if the variable's length constraint is still declared in bytes.  However, if the variable's maximum length is now expressed in characters, SUBSTR needs to be used.  However, if SUBSTR is used to extract a functional part of a string (e.g. during parsing), possibly based on result from INSTR, then you should use SUBSTR and INSTR independently of the database character set -- characters matter here, not bytes. On the other hand, if SUBSTR is used to extract a field in a SQL*Loader-like fixed-format input file (e.g. read with UTL_FILE), you may need to standardize on SUBSTRB to make sure that fields are extracted correctly based on defined byte boundaries.
    As you see, there is universal recipe on handling these functions. Their use needs to be reviewed and understood and it should be decided if they are fine as-is or if they need to be replaced with other forms.
    Thanks,
    Sergiusz

  • "Could not determine request character set " error while recording

    I am using the OATS 9.3 GA version. When I try to record a load testing script using Openscript, I am getting the following error and the recording gets stuck without moving to the next page.
    !ENTRY oracle.oats.scripting.modules.http.proxyRecorder.ProxyRecorderQueueRunnable 2 0 2011-08-11 14:50:26.328
    !MESSAGE Could not determine request character set for https://adcgek13.us.oracle.com:10616/sales/BIProxy?cid=BIPresentationServer&RedirectURL=res%2fsk_blafp%2fdvt%2fBIChart.swf, referer=https://adcgek13.us.oracle.com:10616/sales/faces/mooOpportunityHome?_afrLoop=83903503964000&webApp=HomePage&fndHomePageViewId=%2FAtkHomePage
    Should I check any of the script or record settings to fix this?

    Hello
    Where did you get the 9.30 GA version? is not yet available for download.
    Regards
    Alex

  • MySQL php and CHARACTER SET error

    Still very new to php and MySQL, in fact this is my first
    site using it.
    I have got an issue with displaying characters, namely the
    £ sing, all I get is an ? displayed.
    I have been told to use, utf8 in the database field but this
    has not helped cure the problem.
    I'm building the site in DW CS3 and it's all running off my
    Mac using OS X 10.5.1 and the built in php client.
    Could anyone show me the right way to go?

    Ok I think my IQ is falling me, it's been a long week.
    <?php header('Content-type: text/html;charset=utf-8');
    ?>
    Is the first line of code on the test page I have got
    running. I have no error but I also have no £ sings.
    Here is the live page:
    http://www.epos-acoustics.com/test.php
    The page code:
    <?php header('Content-type: text/html;charset=utf-8');
    ?>
    <?php require_once('Connections/epos.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    mysql_select_db($database_epos, $epos);
    $query_rs01 = "SELECT * FROM epos_shop ORDER BY my_shop_id
    ASC";
    $rs01 = mysql_query($query_rs01, $epos) or
    die(mysql_error());
    $row_rs01 = mysql_fetch_assoc($rs01);
    $totalRows_rs01 = mysql_num_rows($rs01);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    <title>shop text test</title>
    </head>
    <body>
    <?php do { ?>
    <table width="600" border="0" cellspacing="2"
    cellpadding="2">
    <tr>
    <td width="92">Product name: </td>
    <td width="494" colspan="2"><?php echo
    $row_rs01['my_shop_product']; ?></td>
    </tr>
    <tr>
    <td valign="top">Description:</td>
    <td colspan="2"><?php echo
    $row_rs01['my_shop_text']; ?></td>
    </tr>
    <tr>
    <td>Price:</td>
    <td colspan="2"><?php echo
    $row_rs01['my_shop_price']; ?></td>
    </tr>
    <tr>
    <td height="30" colspan="3"> </td>
    </tr>
    </table>
    <?php } while ($row_rs01 = mysql_fetch_assoc($rs01));
    ?></body>
    </html>
    <?php
    mysql_free_result($rs01);
    ?>
    Am I missing the point or do I have something wrong with the
    table or field?

  • NLS CHARACTER SET 변경 방법 (ORACLE 7)

    제품 : ORACLE SERVER
    작성날짜 : 2004-11-09
    NLS CHARACTER SET 변경 방법 (ORACLE 7)
    ======================================
    PURPOSE
    이 자료는 Oracle RDBMS SERVER에서 NLS CHARACTER SET 변경 방법에 대한
    내용을 소개한다.
    [ ORACLE 7 에서만 가능 ]
    데이타베이스의 CHARACTER SET은 데이타 딕셔너리 테이블인 sys.props$에
    들어 있다.
    SQL>desc sys.props$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    VALUE$ VARCHAR2(2000)
    COMMENT$ VARCHAR2(2000)
    SQL>column c1 format a30
    SQL>select name c1, value$ c1 from sys.props$;
    C1 C1
    DICT.BASE 2
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_DATE_FORMAT DD-MON-YY
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET US7ASCII
    NLS_SORT BINARY
    GLOBAL_DB_NAME NLSV7.WORLD
    여기서 NLS_CHARACTERSET에 현재 DB의 CHARACTER SET이 들어 있는데
    이 값을 변경하여 DB의 CHARACTER SET을 변경할 수 있다.
    여기서는 US7ASCII에서 KO16KSC5601로 옮기는 경우를 알아보자.
    우선 바꾸고자 하는 CHRACTER SET이 지원되는 지를 다음 명령으로
    확인한다.
    select convert('a','KO16KSC5601','US7ASCII') from dual;
    만약 이 Select 문에서 ORA-01482 에러가 발생하면 지정한 CHARACTER
    SET이 지원되지 않는 경우이며 에러가 발생하지 않으면 CHARACTER
    SET을 변경할 수 있다.
    작업을 하기 전에는 만약을 위해서 DB 전체를 백업 받아두도록 한다.
    CHARACTER SET 을 잘못 변경하면 DB 를 OPEN 할 수가 없기 때문이다.
    1. 다음의 Update문을 실행하여 CHARACTER SET을 변경한다.
    UPDATE sys.props$
    SET value$ = 'KO16KSC5601'
    WHERE name = 'NLS_CHARACTERSET';
    Update 시에 NLS_CHARACTERSET을 지원되지 않는 값으로 잘못 설정하거나
    실수로 콘트롤 문자 같은 것이 들어가게 되면 DB가 Shutdown 된 다음에는
    Startup 이 안되므로 Update 후에 다음 명령으로 확인을 한 다음에
    Commit을 하도록 한다.
    select name, value$
    from sys.props$
    where value$ = 'KO16KSC5601';
    Select가 제대로 출력되면 Commit 하고 Shutdown 했다가 Startup 하게
    되면 새로운 CHARACTER SET 값을 갖게 된다. SELECT가 안 되면 ROLLBACK
    하고 UPDATE부터 다시 하도록 한다.
    2. 환경 변수 NLS_LANG 을 변경한다.
    .profile 에서
    NLS_LANG=American_America.KO16KSC5601; export NLS_LANG
    또는 .cshrc 에서.
    setenv NLS_LANG American_America.KO16KSC5601
    *** win95 및 winnt의 client에서는 registry editor에서 NLS_LANG 값을
    맞추어준다.
    주의 !!!
    : 위의 작업을 하기 전에 발생할 가능성이 있는 문제점
    1) update 중 KO16KSC5601 이나 US7ASCII 등에서 철자를 잘못 입력하시면,
    db 재기동 후에, 다음과 같은 에러가 발생합니다.
    ora-12708
    12708, 00000, "error while loading create database NLS parameter %s"
    2) KO16KSC5601과 US7ASCII의 비교
    Character set : KO16KSC5601 인 경우
    ===================================
    : double byte encoding schema 이므로, 한글의 경우 2 bytes 를 크기 1로
    계산하는 함수들이 있습니다.
    그리고, table , column name에 한글을 double quote 없이 사용할 수 있습니다.
    예)
    SQL> create table 시험1
    2 (컬럼1 varchar(10));

    a
    홍길동
    SQL> select length(컬럼1) from 시험1;
    1
    1
    3
    SQL> select lengthb(컬럼1) from 시험1;
    2
    1
    6
    Character set : US7ASCII 인 경우
    =================================
    : single byte 7 bit encoding 을 사용합니다.
    한글로 된 table, column 이름 사용 시 double quote를 반드시 사용해야 한다.
    예)
    SQL> create table "사원"
    2 ("사원이름" varchar2(10));

    a
    홍길동
    SQL> select length("사원이름") from "사원";
    2
    1
    6
    SQL> select lengthb("사원이름") from "사원";
    2
    1
    6
    US7ASCII일 때에는 vsize, lengthb function의 결과가 length 함수와 모두
    동일합니다.
    cf) substr, substrb 함수도 위의 length, lengthb의 관계와 같음.

    제품 : ORACLE SERVER
    작성날짜 : 2004-11-09
    NLS CHARACTER SET 변경 방법 (ORACLE 7)
    ======================================
    PURPOSE
    이 자료는 Oracle RDBMS SERVER에서 NLS CHARACTER SET 변경 방법에 대한
    내용을 소개한다.
    [ ORACLE 7 에서만 가능 ]
    데이타베이스의 CHARACTER SET은 데이타 딕셔너리 테이블인 sys.props$에
    들어 있다.
    SQL>desc sys.props$
    Name Null? Type
    NAME NOT NULL VARCHAR2(30)
    VALUE$ VARCHAR2(2000)
    COMMENT$ VARCHAR2(2000)
    SQL>column c1 format a30
    SQL>select name c1, value$ c1 from sys.props$;
    C1 C1
    DICT.BASE 2
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_DATE_FORMAT DD-MON-YY
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET US7ASCII
    NLS_SORT BINARY
    GLOBAL_DB_NAME NLSV7.WORLD
    여기서 NLS_CHARACTERSET에 현재 DB의 CHARACTER SET이 들어 있는데
    이 값을 변경하여 DB의 CHARACTER SET을 변경할 수 있다.
    여기서는 US7ASCII에서 KO16KSC5601로 옮기는 경우를 알아보자.
    우선 바꾸고자 하는 CHRACTER SET이 지원되는 지를 다음 명령으로
    확인한다.
    select convert('a','KO16KSC5601','US7ASCII') from dual;
    만약 이 Select 문에서 ORA-01482 에러가 발생하면 지정한 CHARACTER
    SET이 지원되지 않는 경우이며 에러가 발생하지 않으면 CHARACTER
    SET을 변경할 수 있다.
    작업을 하기 전에는 만약을 위해서 DB 전체를 백업 받아두도록 한다.
    CHARACTER SET 을 잘못 변경하면 DB 를 OPEN 할 수가 없기 때문이다.
    1. 다음의 Update문을 실행하여 CHARACTER SET을 변경한다.
    UPDATE sys.props$
    SET value$ = 'KO16KSC5601'
    WHERE name = 'NLS_CHARACTERSET';
    Update 시에 NLS_CHARACTERSET을 지원되지 않는 값으로 잘못 설정하거나
    실수로 콘트롤 문자 같은 것이 들어가게 되면 DB가 Shutdown 된 다음에는
    Startup 이 안되므로 Update 후에 다음 명령으로 확인을 한 다음에
    Commit을 하도록 한다.
    select name, value$
    from sys.props$
    where value$ = 'KO16KSC5601';
    Select가 제대로 출력되면 Commit 하고 Shutdown 했다가 Startup 하게
    되면 새로운 CHARACTER SET 값을 갖게 된다. SELECT가 안 되면 ROLLBACK
    하고 UPDATE부터 다시 하도록 한다.
    2. 환경 변수 NLS_LANG 을 변경한다.
    .profile 에서
    NLS_LANG=American_America.KO16KSC5601; export NLS_LANG
    또는 .cshrc 에서.
    setenv NLS_LANG American_America.KO16KSC5601
    *** win95 및 winnt의 client에서는 registry editor에서 NLS_LANG 값을
    맞추어준다.
    주의 !!!
    : 위의 작업을 하기 전에 발생할 가능성이 있는 문제점
    1) update 중 KO16KSC5601 이나 US7ASCII 등에서 철자를 잘못 입력하시면,
    db 재기동 후에, 다음과 같은 에러가 발생합니다.
    ora-12708
    12708, 00000, "error while loading create database NLS parameter %s"
    2) KO16KSC5601과 US7ASCII의 비교
    Character set : KO16KSC5601 인 경우
    ===================================
    : double byte encoding schema 이므로, 한글의 경우 2 bytes 를 크기 1로
    계산하는 함수들이 있습니다.
    그리고, table , column name에 한글을 double quote 없이 사용할 수 있습니다.
    예)
    SQL> create table 시험1
    2 (컬럼1 varchar(10));

    a
    홍길동
    SQL> select length(컬럼1) from 시험1;
    1
    1
    3
    SQL> select lengthb(컬럼1) from 시험1;
    2
    1
    6
    Character set : US7ASCII 인 경우
    =================================
    : single byte 7 bit encoding 을 사용합니다.
    한글로 된 table, column 이름 사용 시 double quote를 반드시 사용해야 한다.
    예)
    SQL> create table "사원"
    2 ("사원이름" varchar2(10));

    a
    홍길동
    SQL> select length("사원이름") from "사원";
    2
    1
    6
    SQL> select lengthb("사원이름") from "사원";
    2
    1
    6
    US7ASCII일 때에는 vsize, lengthb function의 결과가 length 함수와 모두
    동일합니다.
    cf) substr, substrb 함수도 위의 length, lengthb의 관계와 같음.

  • [8i] ORA-12704: character set mismatch (and other issues)

    I've been trying to put together sample data on this problem since Friday, but I'm having issues. I'm thinking the problem is something specific to the old database I'm trying to work in:
    BANNER
    Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
    PL/SQL Release 8.1.7.2.0 - Production
    CORE    8.1.7.0.0       Production
    TNS for HPUX: Version 8.1.7.2.0 - Production
    NLSRTL Version 3.4.1.0.0 - ProductionI tried copying over all the data into my test database:
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionAnd, I can't duplicate the problem there. In fact, I ran my original query in my test database, using the db llink, the query ran just fine.
    But, I tried to create some sample data anyway to try to get some help here, so, I created 3 tables in my test database as SELECT from the old database (via a db link).
    One table was really the results of a query (with many sub-queries) that was working just fine in the old database. It was the 2nd highest level query that wasn't giving me any problems. (Below, in my query, subquery 'a' runs just fine in the test database also; it's only the top level query that gives me an error.)
    The other two tables I created were just simple sub-sets of the original tables in the old database.
    I ran my query in my test database against those tables, and again, it ran just fine. No character set mismatch error.
    So, based on the tables from the old database, I created the following test tables:
    TEST TABLE DEFINITIONS
    CREATE TABLE     test_inv_1
    (     cust_id          CHAR(10)
    ,     item_id          VARCHAR2(32) -- becomes 96 if I create as select
    ,     match_item_id     CHAR(10)
    ,     docdate          DATE
    ,     tot_amt          NUMBER(5)
    INSERT INTO     test_inv_1
    VALUES('C1000','I0001','I0001',TO_DATE('01/01/2011','mm/dd/yyyy'),1000);
    INSERT INTO     test_inv_1
    VALUES('C1000','I0002','I0002',TO_DATE('01/05/2011','mm/dd/yyyy'),1050);
    INSERT INTO     test_inv_1
    VALUES('C1000','MANUAL ADJUSTMENT','MANUAL ADJ',TO_DATE('01/01/2011','mm/dd/yyyy'),1000);
    INSERT INTO     test_inv_1
    VALUES('C1001','I0003','I0003',TO_DATE('01/01/2011','mm/dd/yyyy'),500);
    INSERT INTO     test_inv_1
    VALUES('C1001','OTHER ADJUSTMENT','OTHER ADJU',TO_DATE('01/01/2011','mm/dd/yyyy'),50);
    INSERT INTO     test_inv_1
    VALUES('C1001','M123','M123',TO_DATE('01/10/2011','mm/dd/yyyy'),150);
    CREATE TABLE     test_btab_1
    (     billing_id          CHAR(10)     NOT NULL -- becomes 30
    ,     payment_terms_cd     CHAR(3)                -- becomes 9
    INSERT INTO     test_btab_1
    VALUES ('I0001', '01');
    INSERT INTO     test_btab_1
    VALUES ('I0002', '01');
    INSERT INTO     test_btab_1
    VALUES ('I0003', '02');
    INSERT INTO     test_btab_1
    VALUES ('M123', 'COD');
    INSERT INTO     test_btab_1
    VALUES ('I0004', '01');
    CREATE TABLE     test_tabm_1
    (     record_type     CHAR(4)          NOT NULL     -- becomes 12
    ,     record_key     CHAR(10)     NOT NULL     -- becomes 30
    ,     numeric_1     NUMBER(15,5)
    ,     numeric_5     NUMBER(7)
    ,     numeric_6     NUMBER(7)
    INSERT INTO     test_tabm_1
    VALUES ('LOCA','A1234',NULL,NULL,NULL);
    INSERT INTO     test_tabm_1
    VALUES ('TERM','01',2,10,30);
    INSERT INTO     test_tabm_1
    VALUES ('TERM','02',0,0,45);
    INSERT INTO     test_tabm_1
    VALUES ('TERM','COD',0,0,30);Again, the first table, test_inv_1, is an example of the results of a query that was working just fine in the old database. (There are comments in the table definitions above--I'll explain those in a bit.)
    Here is the query I ran against this data:
    QUERY
    SELECT     a.*
    ,     1 - (t.numeric_1/100)          AS amt_pst_disc
    ,     a.docdate + t.numeric_5 - 1     AS disc_end_date
    ,     a.docdate + t.numeric_6 - 1     AS duedate
    FROM     (
         SELECT     ic.*
         ,     CASE
                   WHEN     b.payment_terms_cd     IS NULL
                   THEN     CAST('03' AS CHAR(10))
                   ELSE     CAST(b.payment_terms_cd AS CHAR(10))
              END                         AS pay_term
         ,     CASE
                   WHEN     b.payment_terms_cd     IS NULL
                   THEN     'Default Payment Terms'
              END                         AS pt_flag
         FROM     test_inv_1 ic
         ,     test_btab_1 b
         WHERE     ic.match_item_id     = b.billing_id (+)
         ) a
    ,     test_tabm_1 t
    WHERE     a.pay_term     = t.record_key
    AND     t.record_type     = 'TERM'
    ;In the old database, I get the error:
    WHERE   a.pay_term      = t.record_key
    ERROR at line 107:   --this is actually line 22 in the above query, since test_inv_1 represents the results of a sub-query
    ORA-12704: character set mismatchIn my test database, in every form, including with the sample data above, I don't have any problems.
    I unfortunately don't have a v8 test environment, and I suspect there aren't many people who actually do, anymore, so using my v10 test database is the best I can do to come up with test data...
    The other odd thing I noticed is that when I DESC the tables I created in my test database via SELECT statements, and compare them with the tables I created from CREATE statements (based on the table descriptions I got from the old database), some of the data lengths don't match up. That's what's in the comments in my table definitions. I noted where the tables I created via SELECT statements had different data lengths. I'm not sure if it's important or not, but in case it is, I thought I'd include it.
    Also, I'm creating this query to make a report for someone else, and the reporting system only has access to the v8 database, not my test database. So, I'm stuck making the query run against it.
    Any help on this would be greatly appreciated!

    I think it has something to do with my CASE statement. I found a kind of work-around solution. Instead of getting payment_term_cd associated with the item_id, the person I'm creating the report for wants the payment terms associated with the cust_id. Now, btab has the one associated with item_id, and not every item_id is in the btab table, so in my query, I was assuming a default value of '03' when it didn't find a payment_term_cd (i.e. it was NULL) for an item_id, which is what my first CASE statement is doing.
    However, every cust_id definitely has a payment_term_cd associated with it (in another table I did not provide sample data for, since I didn't know I'd need to use it). Here's the general idea of that table:
    CREATE TABLE     test_cust_1
    (     cust_id               CHAR(10)     NOT NULL
    ,     payment_terms_cd     CHAR(3)     --while it's not specified as NOT NULL, there are no NULLs for this column.  I think anything that would be NULL, the system initializes as '***'
    INSERT INTO     test_cust_1
    VALUES ('C1000','01');
    INSERT INTO     test_cust_1
    VALUES ('C1001','03');
    INSERT INTO     test_cust_1
    VALUES ('C1002','COD');So, there's no need for me to do a case statement. I can get away with something like:
    SELECT     ip.item_id
    ,     ip.docdate
    ,     ip.cust_id
    ,     ip.tot_amt
    ,     ip.pay_terms
    ,     t.record_key
    FROM     (
         SELECT     i.item_id
         ,     i.docdate
         ,     i.cust_id
         ,     i.tot_amt
         ,     CAST(c.payment_terms_cd AS CHAR(10))     AS pay_terms
         FROM     test_inv_1 i
         ,     test_cust_1 c
         WHERE     c.cust_id     = i.cust_id
         AND     i.tot_amt     <> 0
         ) ip
    ,     test_tabm_1 t
    WHERE     t.record_key     = ip.pay_terms
    AND     t.record_type     = 'TERM'-- edited out the incorrect results
    Anyway, when I used this new table with my original query in the 8i database, I didn't get a character set error, so that's why I think it has to do with the case statement.
    Edited by: user11033437 on Aug 22, 2011 1:43 PM -- fixed an error in my results

  • Imp fails with character set marker unknown

    Hi All,
    I'm trying to import a dump that was done in WE8ISO8859P1 with Oracle 9i 9.2.0.5.0 into the Western European XE version on Windows XP Professional SP2.
    I get an IMP-00037 Character set marker unknown error
    I've tried setting NLS_LANG to American_UNITED KINGDOM.WE8ISO8859P1 but the same result. Obviously I'm just a novice but you've to start somewhere right, any help appreciated

    Setting NLS_LANG to either character set should be fine. WE8MSWIN1252 is a superset of WE8ISO8859P1 ( http://aswan.gatech.edu/docs/oracle/10g/server.101/b10749/applocal.htm#636814 ) .
    From the docs:
    There are two character set conversions when you Import a dump file. The first one is performed by Import executable from the character set of the dump file (which is equal to NLS_LANG of Export session) to the character set of NLS_LANG of the Import session. The second conversion from the Import NLS_LANG to the database character set is performed by SQL*Net.
    Here is more information in the docs:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1021901
    ~Dietmar.

  • SQLException Character Set Not Supported

    I'm at wit's end.
    I have the following versions:
    Win2k
    JDeveloper 9i R2
    Oracle9iAS 9.0.3.0.0
    Oracle 9i client 9.0.1.1
    Sun J2SDK 1.3.1
    Oracle 9i Enterprize Edition 9.0.1.3.0
    I'm trying to get a JDBC connection from a DataSource in a servlet. The result is the following error: java.sql.SQLException: Character Set Not Supported !!: DBConversion.
    I get the same problem just trying a simple JDBC connection in JDeveloper. I can fix this problem by forcing JDeveloper to use classes12.jar from the Oracle client directory BEFORE oc4j.jar in the JDeveloper libraries.
    Unfortunately, I can't get the external 9iAS server to make this switch. It's (naturally) using its copy of oc4j.jar.
    Any ideas on:
    1) How to properly avoid the Character Set error.
    2) How to force 9i AS to use different libraries before it looks in oc4j.
    Any help is greatly appreciated

    I have tried the embedded server in JDeveloper with the same results. Currently, I am using the external one.
    I believe the data source is valid. I can duplicate this problem by just using a plain JDBC connection from DriverManager. Also, I switched to the 1.0.2 version of oc4j, replaced the Oracle stuff with 8i versions and was able to connect using the same data-sources.xml.
    This problem also goes away when using the thin driver but we're reluctant to use the thin driver for performance reasons.
    Thanks for the response,
    TG

  • XML data from BLOB to CLOB - character set conversion

    Hi All,
    I'm trying to solve a problem with a character set conversion in PL/SQL in the following scenario:
    1. source is an XML as a BLOB variable.
    2. target is an XML as a CLOB variable.
    3. the problem I have is the following:
    - database character set is set to UTF-8
    - XML character set could be anything (UTF-8, ISO 8859-1, ISO 8859-2, ASCII, ...)
    - I need to write a procedure which converts the source BLOB content into the target CLOB taking into account the XML encoding and converts it into the DB default character set (UTF8).
    I've been able to implement a simple conversion function. However, this function expects static XML encoding ISO-8859-1. The main part of the function looks as follows:
    buffer := UTL_RAW.cast_to_varchar2(
    UTL_RAW.convert(
    DBMS_LOB.SUBSTR(source_blob_variable, 16000, pos)
    , 'American_America.UTF8'
    , 'American_America.we8iso8859p1')
    Does anyone have an idea how to rewrite the code to handle "any" XML encoding in the source BLOB file? In other words, is there a function in Oracle which converts XML character set names into Oracle character set values (ISO-8859-1 to we8iso8859p1, UTF-8 to UTF8, ...)?
    Thanks a lot for any help.
    Julius

    I want to pass a BLOB to some "createXML" procedure and get a proper XMLType in UTF8 character set, properly converted from whatever character set is the input in.As per documentation the generated XML has always the encoding set at the client side depending on NLS_LANG (default UTF-8), regardless of the input encoding, so I don't see a need to parse the PI of the XML:
    C:\>echo %NLS_LANG%
    %NLS_LANG%
    C:\>sqlplus
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Apr 30 08:54:12 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> var cur refcursor
    SQL>
    SQL> declare
      2     b   blob := utl_raw.cast_to_raw ('<a>myxml</a>');
      3  begin
      4     open :cur for select xmlroot (xmltype (utl_raw.cast_to_varchar2 (b))) xml from dual;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print cur
    XML
    <?xml version="1.0" encoding="UTF-8"?><a>myxml</a>
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    C:\>set NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1
    C:\>sqlplus
    SQL*Plus: Release 11.1.0.6.0 - Production on Mi Apr 30 08:55:02 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    SQL> var cur refcursor
    SQL>
    SQL> declare
      2     b   blob := utl_raw.cast_to_raw ('<a>myxml</a>');
      3  begin
      4     open :cur for select xmlroot (xmltype (utl_raw.cast_to_varchar2 (b))) xml from dual;
      5  end;
      6  /
    PL/SQL-Prozedur erfolgreich abgeschlossen.
    SQL>
    SQL> print cur
    XML
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <a>myxml</a>

  • Oracle.sql.ARRAY error "Non supported character set: oracle-character-set-"

    Hi Folks,
    I am getting error :
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    in the following code :
    Object[] arrayToPassToDB=new Object[7];
    ArrayDescriptor arraydesc = ArrayDescriptor.createDescriptor(arrayDesc,con);
    ARRAY array = null;
    array = new ARRAY(arraydesc, con, arrayToPassToDB);
    i am using jdk1.6 and oracle 10g.
    I have copied the orai18n.jar and ojdbc6.jar in WEB-INF\lib directory of my project and also in the Tomcat\lib directory.
    can you please help me?
    Thanks in advance.

    java.sql.SQLException: Non supported character set:oracle-character-set-178

Maybe you are looking for

  • BPM Test suits

    I have created BPMN business process, that starts by Initiator task activity. I wrote test case for it in Jdev, but I can't to compile and run this test, because secton <initiate> requires attribute serviceName with the name of service, which start p

  • Check consistency error

    Hi, when i am doing global consistence check i am getting the below error. I check the complex join. its fine all the column are compatible.but still this error is coming. Can any one assists for this.. BUSINESS MODEL Basel: [nQSError: 15001] Could n

  • Can I continuous update a waveform in a 6713 Card? I need to inc and dec the frequency continuously without stoping the generation. Can I do so? how?

    Hi. I`m using labview 7 and a analog output board, the 6713. I`m building a system that generates sine wave forms and I need to change the frequency of the generated waveform without stoping the generation. Can I do so? And how? Thanks. Ismail.

  • Really need help!! I cannot start J2EE server

    Hi, I have installed: j2sdk-1_3_1_02-win.exe and j2sdkee-1_3_1-win.exe and I have set the environment variables like this: set PATH = C:\windows;C:\windows\command;c:\jdk1.3.1_02\bin; set JAVA_HOME = c:\jdk1.3.1_02; set J2EE_HOME = c:\j2sdkee1.3.1; H

  • Can i write a new VO and attach it to the existing AM

    Hi, am working on the OAF customizaitons. we already have a VO and AM but according to my logic in the customizations, can i create a new VO and attach to the existing AM? is it technically right? Thanks a lot in advance. kumar