This discussion is archived
1 2 Previous Next 26 Replies Latest reply: Dec 10, 2012 8:10 PM by Maahjoor Go to original post RSS
  • 15. Re: NLS_LANG setting for scott schema
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    Please post
     SQL> SELECT * from NLS_DATABASE_PARAMETERS WHERE parameter IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
  • 16. Re: NLS_LANG setting for scott schema
    Maahjoor Newbie
    Currently Being Moderated
    PARAMETER                      VALUE
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CHARACTERSET               WE8MSWIN1252
  • 17. Re: NLS_LANG setting for scott schema
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    WE8MSWIN1252
    is not supported for arabic please review
    Which Character Set Supports Which Language [ID 62421.1]

    Use
    AR8MSWIN1256 ,UTF8, AL32UTF8, AL16UTF16 Or AR8ISO8859P6
  • 18. Re: NLS_LANG setting for scott schema
    Maahjoor Newbie
    Currently Being Moderated
    thanks,

    i need AR8ISO8859P6.

    how to do that please?
  • 19. Re: NLS_LANG setting for scott schema
    sb92075 Guru
    Currently Being Moderated
    Maahjoor wrote:
    thanks,

    i need AR8ISO8859P6.

    how to do that please?
    It is established at DB creation time.
  • 20. Re: NLS_LANG setting for scott schema
    Maahjoor Newbie
    Currently Being Moderated
    no there should be possiblility to do it after the db creation.
  • 21. Re: NLS_LANG setting for scott schema
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    AR8ISO8859P6
    supported for arabic , to change character set Please Read MOS Notes :
    Changing the Database Character Set ( NLS_CHARACTERSET ) [ID 225912.1]
  • 22. Re: NLS_LANG setting for scott schema
    Maahjoor Newbie
    Currently Being Moderated
    and how could i reach to the link you give please?
  • 23. Re: NLS_LANG setting for scott schema
    sb92075 Guru
    Currently Being Moderated
    Maahjoor wrote:
    no there should be possiblility to do it after the db creation.
    please post proof above is true.
  • 24. Re: NLS_LANG setting for scott schema
    Girish Sharma Guru
    Currently Being Moderated
    See this demo : Oracle 11.2.0.1 on Windows 7
    I created a after logon on database trigger :
    create or replace trigger test after logon on database
    declare
    cmmd VARCHAR2(64);
    cmmd1 VARCHAR2(64);
    begin
    cmmd:='alter session set nls_language=' || chr(39) || 'AMERICAN' || chr(39);
    cmmd1:='alter session set nls_language=' || chr(39) || 'ITALIAN' || chr(39);
    if user='SCOTT' then
    execute immediate cmmd;
    end if;
    if user='HR' then
    execute immediate cmmd1;
    end if;
    end;
    /
    
    Trigger created.
    
    SQL> show user;
    USER is "SCOTT"
    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    10-DEC-12
    
    SQL> connect hr/hr
    Connected.
    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    10-DIC-12
    
    SQL> connect scott/tiger
    Connected.
    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    10-DEC-12
    
    SQL>
    So, if your database database's characterset is able to handle the different language then above way may work for you, but suppose if I says :
    SQL> alter session set nls_language='ARABIC';
    
    Session altered.
    
    SQL> select sysdate from dual;
    
    SYSDATE
    ------------
    10-??????-12
    
    SQL>
    And what are nls values at present :
    PARAMETER                      VALUE
    ------------------------------ -------------------
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CHARACTERSET               WE8MSWIN1252
    So, it means my database's characterset WE8MSWIN1252 do not support ARABIC language. Why ? Because WE8MSWIN1252 is a western windows character set. it does not support Arabic so you simple not able to store Arabic characters there. Ok, but what to do now? I just google with "arabic language in oracle" and found many good and working links, try to read them and test it on a test db, if all goes well then touch production db.

    Regards
    Girish Sharma
  • 25. Re: NLS_LANG setting for scott schema
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    Maahjoor wrote:
    and how could i reach to the link you give please?
    to change database characterset you have two option :
    1-Using CSALTER which is not always possible because change on stored data
    2-Using Export/Import :
    You simply export the current database, then create a new database with the new character set and import the data into that database
  • 26. Re: NLS_LANG setting for scott schema
    Maahjoor Newbie
    Currently Being Moderated
    and this is great sharma ji.
    somehow,
    i just change the nls_lang registry value to AMERICAN_AMERICA.AR8MSWIN1256,install arabic language to my pc, MY database character_set is AR8ISO8859P6.

    and it works.

    i am realy thankfull to all of you.you people just make our job extreamly easy. so much thanks to all the forum's users.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points