UTF8 - Urgent

Hi All,
My database character set is WE8ISO8859P1.
Language : American
Territory : America.
Now, I tried converting client NLS_LANG in the registry(we use
windows 95). I gave French_France.UTF8.
Then I issued the query
select userenv('language') from dual;
FRENCH_FRANCE.WE8ISO8859P1
I got the above output. How do I make my client characterset to
UTF8.
One of the report module needs to support multilingual.
So, I want to store and retrieve data of other languagues.
How do I achieve this?
Thanks in advance.
Vijay.

Hi Vijay,
To support Multilingual characters you need your data in UTF8
(it depends on the languages you wish to support, of course).
Check out the FAQ at
http://technet.oracle.com/products/oracle8i/htdocs/faq_combined.h
tm
Now, I tried converting client NLS_LANG in the registry(we use
windows 95). I gave French_France.UTF8.
Then I issued the query
select userenv('language') from dual;
FRENCH_FRANCE.WE8ISO8859P1This may be because the UTF8 characterset is not a a complete
superset of WE8ISO8859P1 characterset (not sure) or there are
more than one registry entries/environ vars to be modifed for
NLS_LANG.
Regards,
Shirish

Similar Messages

  • Character set migration error to UTF8 urgent

    Hi
    when we migrated from ar8iso889p6 to utf8 characterset we are facing one error when i try to compile one package through forms i am getting error program unit pu not found.
    When i running the source code of that procedure direct from database using sqlplus its running wihtout any problem.How can i migrate this forms from ar8iso889p6 to utf8 characterset. We migrated from databas with ar8iso889p6 oracle 81.7 database to oracle 9.2. database with character set UTF8 (windows 2000) export and import done without any error
    I am using oracle 11i inside the calling forms6i and reports 6i
    with regards
    ramya
    1) this is server side program yaa when connecting with forms i am getting error .When i am running this program using direct sql its working when i running compiling i am getting this error.
    3) yes i am using 11 i (11.5.10) inside its calling forms 6i and reports .Why this is giving problem using forms.Is there any setting changing in forms nls_lang
    with regards

    Hi Ramya
    what i understand from your question is that you are trying to compile a procedure from a forms interface at client side?
    if yes you should check the code in the forms that is calling the compilation package.
    does it contains strings that might be affected from the character set change???
    Tony G.

  • OO ABAP --urgent need

    hi all
    please send me material or pdf documents or links for learning ABAP objects
    starting from beginning to indeep of OO ABAP. It is very urgent....
    please send me information on all types of ALVs also..

    Hi,
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Regards,
    Priyanka.

  • URGENT help with BOOTCAMP

    hi guys
    Need urgent help before i throw my macbook pro retina 15'' 2013 out the window.
    Ive installed Windows 7 onto my macbook via bootcamp, everything ok, but it doesnt recognise anything i put in external disc drive, so i cant install and drivers or find my network or anything, im so sorry if its so simple but im such a novice, and installing windows 7 is an accomplishment in itself, can someone please help me?
    many thanks

    http://www.amazon.co.uk/Integral-32GB-Courier-Flash-Drive/dp/B007ZSLZ5E/ref=sr_1 _12?s=computers&ie=UTF8&qid=1363213300&sr=1-12#productDetails
    this work?

  • Very Urgent Help needed - Arabic support in  Forms6i& reports6i

    Hi,
    Its a very very very urgent requirement.
    How to Provide the arabic support in forms .
    I am working on Windows Xp operating system.
    1. How to Configure the Windows XP Operating system to provide arabic support?
    In Design time i want to use English and during runtime i should be able to toggle beteen English and Arabic for Entering the data.Arabic data should be captured in seperate fields.
    1. How to configure the oracle 8i/9i databases to provide both arabic(Saudi Arabia) and english? what characterset i need to
    choose for saudi arabic?
    2.How to install forms & Reports with arabic support?
    3.How to dispaly the data in both english and arabic in forms and reports during runtime?
    I will be really greatful if u are able to provide me that help and my advanced thanks to ur help.This very
    very urgent.
    Regds,
    B.Prasad
    [email protected]

    Badma,
    1. How to Configure the Windows XP Operating system to
    provide arabic support?Please go to "Regional and Language Options" from the Control Panel. In the "Standards and formats" group of the "Regional Opitons" tab, select "Arabic (Saudi Arabia)". In the "Language for non-Unicode programs" group of the "Advanced" tab, select "Arabic (Saudi Arabia)", then restart Windows. If "Arabic (Saudi Arabia)" is not listed, then please go to the "Langauges" tab and make sure the "Install files for complex script and right-to-left languages (including Thai)" in the "Supplemental language support" group is checked.
    1. How to configure the oracle 8i/9i databases to provide
    both arabic and english? what characterset i need to
    choose for saudi arabic?If you're not planning to support other languages than Arabic and English (7-bit), AR8MSWIN1256 should work for you. If you're planning to support other languages in the future, I would recommend you to create your database in UTF8 (Forms/Reports 6i doesn't work with AL32UTF8 database). Please note Arabic characters are represented in 2 bytes in UTF8 while they are 1 byte in AR8MSWIN1256.
    2.How to install forms & Reports with arabic support?If you need Arabic translation, then please select Arabic when you're asked the language(s) to install. Otherwise, notmal Forms/Reports installation should work for you.
    3.How to dispaly the data in both english and arabic in
    forms and reports?Set your NLS_LANG to ARABIC_SAUDI ARABIA.AR8MSWIN1256.
    Hope this helps.
    Regards,
    - Makoto

  • Urgent :SQL Loader Arabic Character Set Issue

    HI all,
    I am loading arabic characters into my database using SQL Loader using a fixed length data file. I had set my characterset and NLS_LANG set to UTF8.When I try to load the chararacter 'B' in arabic data i.e. ' لا ' , it gets loaded as junk in the table. All other characters are loaded correctly. Please help me in this issue and its very urgent.
    Thanks,
    Karthik

    Hi,
    Thanks for the responses.
    Even after setting the characterset to arabic and the problem continues to persist. This problem occurs only with the character "b".
    Please find my sample control file,input file and nls_parameters below:
    My control file
    LOAD DATA
    characterset UTF8
    LENGTH SEMANTICS CHAR
    BYTEORDER little endian
    INFILE 'C:\sample tape files\ARAB.txt'
    replace INTO TABLE user1
    TRAILING NULLCOLS
    name POSITION(1:2) CHAR(1),
    id POSITION (3:3) CHAR(1) ,
    salary POSITION (4:5) CHAR(2)
    My Input file - Fixed Format
    ?a01
    ??b02
    ?c03
    The ? indicates arabic characters.Arabic fonts must be installed to view them.
    NLS_PARAMETERS
    PARAMETER     VALUE
    NLS_LANGUAGE     ARABIC
    NLS_TERRITORY     UNITED ARAB EMIRATES
    NLS_CURRENCY     ?.?.
    NLS_ISO_CURRENCY     UNITED ARAB EMIRATES
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD/MM/RR
    NLS_DATE_LANGUAGE     ARABIC
    NLS_SORT     ARABIC
    NLS_TIME_FORMAT     HH12:MI:SSXFF PM
    NLS_TIMESTAMP_FORMAT     DD/MM/RR HH12:MI:SSXFF PM
    NLS_TIME_TZ_FORMAT     HH12:MI:SSXFF PM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD/MM/RR HH12:MI:SSXFF PM TZR
    NLS_DUAL_CURRENCY     ?.?.
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     CHAR
    NLS_NCHAR_CONV_EXCP     FALSE

  • Urgent : Oracle Reports Server 9.0.4.0.0 Japanese fonts

    Hi,
    I have one problem in displaying Japanese fonts in Reports Server.
    I have installed Oracle Reports Server (9.0.4.0.0) by selecting radio button -
    ' Use Unicode (UTF8) as the Character Set'
    while installing Infrastructure. But I didn't choose any Prodcut Language at the time of Middle Tier Installation.
    I changed the value of NLS_LANG to JAPANESE_JAPAN.JA16JIS in registry for both Infra as well as Middle tier homes. Both are on same machine.But no able to display the report in Japanese Fonts. It gives me following error -
    REP-501: Unable to connect to the specified database.
    Could anybody help me resolve this issue ? Its urgent.
    Thanks in anticipation

    I would advice you to install a new mid tier with Japanese language.
    Regards
    Pavna

  • Error in inserting Japanese charcters into XMLDB -[b]Urgent[/b]

    Hi,
    I have set database charcterset as 'UTF-8' and I saved the xml file in server with 'UTF-8' encoding, the inerstion works for english, but if I inlucde japanese charcters I get the following error (please find below), we use Oracle 9i for developement.Since this is very urgent and critical,kindly help us, we are thankful for the earlier responses got for our diferent queries.
    This is XML Schema we registered.
    XML SCHEMA:
    ==========
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema id="Dp_Pref_mst" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="PrefMaster">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element name="StateDetails">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Pref_code" type="xs:string" minOccurs="0" />
    <xs:element name="Pref_desc" type="xs:string" minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    Schema registration:
    ===================
    begin
    dbms_xmlschema.registerSchema( 'sample.xsd', getFileContent('sample.xsd','DP','UTF8'));
    end;
    Table creation :
    ===============
    Create table states of XMLType XMLSCHEMA "sample.xsd" ELEMENT "PrefMaster";
    This is XML we try to insert
    XML :
    ====
    <?xml version="1.0" encoding="UTF-8"?>
    <PrefMaster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sample.xsd">
    <StateDetails>
    <Pref_code>1</Pref_code>
    <Pref_desc>小川鐵工所</Pref_desc>
    </StateDetails>
    <StateDetails>
    <Pref_code>2</Pref_code>
    <Pref_desc>Honshu</Pref_desc>
    </StateDetails>
    <StateDetails>
    <Pref_code>3</Pref_code>
    <Pref_desc>Nagasaki</Pref_desc>
    </StateDetails>
    <StateDetails>
    <Pref_code>4</Pref_code>
    <Pref_desc>Osaka</Pref_desc>
    </StateDetails>
    </PrefMaster>
    CREATE OR REPLACE FUNCTION getFileContent(filename varchar2,directoryName varchar2 default USER,
    charset varchar2 default 'AL32UTF8')
    return CLOB
    is
    fileContent CLOB := NULL;
    file bfile := bfilename(directoryName,filename);
    dest_offset number := 1;
    src_offset number := 1;
    lang_context number := 0;
    conv_warning number := 0;
    begin
    DBMS_LOB.createTemporary(fileContent,true,DBMS_LOB.SESSION);
    DBMS_LOB.fileopen(file, DBMS_LOB.file_readonly);
    DBMS_LOB.loadClobfromFile
    fileContent,
    file,
    DBMS_LOB.getLength(file),
    dest_offset,
    src_offset,
    nls_charset_id(charset),
    lang_context,
    conv_warning
    DBMS_LOB.fileclose(file);
    return fileContent;
    end;
    our insert statement
    ====================
    Insert into states values (XMLType(getFileContent('sample.xml','DP','UTF8')));
    The error we are getting
    =======================
    Error
    =====
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '<' instead of '¿'
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    Any help in resolving this would be highly appriciated.
    Thank you
    Kathiresan.

    COMMIT is an SQL command and I don't think it will have any effect on you dataset. I think this should work:
    FORM f_write_aufk.
      CLEAR: gv_error, gv_reccnt, gv_t_amt, gv_t_qty,
      gv_t_docs, gv_previous_rec_id, gv_passcnt.
    *--------Open in compress mode ----------------------------------------*
      DATA: gc_commit dafault '1000'.
      OPEN DATASET lv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT FILTER
              'compress'.
      IF sy-subrc = 0.
        SELECT aufnr auart autyp ernam aenam aedat ktext
        FROM aufk INTO gs_aufk
        WHERE aufnr IN s_aufnr.
          PERFORM f_transfer_dataset
            USING p_f_aufk gs_aufk CHANGING gv_error.
        ENDSELECT.
        PERFORM f_closedataset USING p_f_aufk CHANGING gv_error.
      ENDIF.
    ENDFORM.                    "F_WRITE_AUFK
    Rob

  • Urgent converting to UTF-8

    I want to convert from AL16UTF16 character set to UTF8 character set
    I tried to use the convert function but i couldnt ,
    for example if i have the text ali and iwant to convert this text from
    AL16UTF16 character set to UTF8 character set then what i have to write please help it is urgent
    regrads &thanks in advance

    Create new db instance with appropriate character set
    afterwards use exp imp utility for character set migration.
    Regards
    Singh

  • Using unicode in sms sending :)plz. urgent reply is needed.

    when i want to send a sms of string of unicode. is it necessary to encode it in UTF8 or UTF16 ???
    when i encode it then the length of the string comes larger.
    can i send sms as a string of unicode without changing its length????
    like this:
    String str="\u270F";
    // now str's length is 1
    str = new String(str.getBytes("UTF16"));
    //now str's length is 4!!!!!!!!
    plz. urgent reply is needed.
    best regards
    tanvir

    By default SMS has it's own text encoding and therefore you cannot use UTF8 nor UTF16. There is a special UCS2 encoding, alowing for 70 unicode characters to be send (per sms). See: http://www.dreamfabric.com/sms/

  • UTF8 handling in OC4J

    Dear all, I got some problems in CMP ejb dealing with UTF-8 charset.
    My OS platform is traditional chinese win2000, installing OC4J 9.0.2
    and 9iJdevleoper. My 9iDB Server with UTF8 characterset is on an AIX server.
    Through my 9iJdeveloper and OC4J, I created a CMP and got it deployed. But no matter what I tried, the CMP sample client inserted record in Big5 encoding into the DB rather than in UTF-8.
    I set the CMP project complier characterset to UTF-8
    What else do I need to set(e.g. *.xml OC4J config files) ?
    rgds,
    gabriel

    Dear All,
    I want to display japanese characters in the browser from servlet, so i set the following things in my program,
    res.setContentType( "text/html; charset=UTF-8");
         PrintWriter out = res.getWriter();
         out.println("<html>");
         out.println("<h1>Hello World111</h1>");
    out.println("HIpoOIIlpt/gj=");
         out.println("</body></html>");
    But I'm not able to see the japanese chars instead some junk chars are displayed.
    Please help me, this is very urgent.
    Thanks in Advance,
    Dayalan

  • Javax.crypto.BadPaddingException: unknown block type - URGENT

    I am trying to encryp-decrypt a file (serialized xml file ) using BC provider with RSA algorithm and PKCS1Padding padding..
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC")
    Sequence of action is encrypt - base64encode -
    base64decode - decrypt.
    Encryption seems to be working fine but while decrypting it gives the error mentioned below:
    javax.crypto.BadPaddingException: unknown block type
    I tried using OAEPPadding - In that scenario I get this error
    javax.crypto.BadPaddingException: data hash wrong
    I tried searching the cause and resolution of the problems on various resources on net but in vain. Need it urgently. PLS HELP. THANKS
    I am pasting my code below :
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.security.Key;
    import java.security.KeyFactory;
    import java.security.KeyPair;
    import java.security.KeyPairGenerator;
    import java.security.NoSuchAlgorithmException;
    import java.security.NoSuchProviderException;
    import java.security.PrivateKey;
    import java.security.PublicKey;
    import java.security.Security;
    import java.security.spec.EncodedKeySpec;
    import java.security.spec.PKCS8EncodedKeySpec;
    import java.security.spec.X509EncodedKeySpec;
    import javax.crypto.Cipher;
    import org.apache.log4j.Logger;
    import org.bouncycastle.jce.provider.*;
    import sun.misc.BASE64Decoder;
    import sun.misc.BASE64Encoder;
    public class EncryptBase64File
    protected static final String ALGORITHM = "RSA";
         private static Logger logger = Logger.getLogger(EncryptFiles.class.getClass());
    private EncryptBase64File()
    * Init java security to add BouncyCastle as an RSA provider
    public static void init()
    Security.addProvider(new BouncyCastleProvider());
    * Generate key which contains a pair of privae and public key using 1024 bytes
    * @return key pair
    * @throws NoSuchAlgorithmException
    public static KeyPair generateKey() throws NoSuchProviderException,NoSuchAlgorithmException
    //KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);
              KeyPairGenerator keyGen =
                                  KeyPairGenerator.getInstance("RSA", "BC");
    keyGen.initialize(1024);
    KeyPair key = keyGen.generateKeyPair();
    return key;
    * Encrypt a text using public key.
    * @param text The original unencrypted text
    * @param key The public key
    * @return Encrypted text
    * @throws java.lang.Exception
    public static byte[] encrypt(byte[] text, PublicKey key) throws Exception
    byte[] cipherText = null;
    try
    // get an RSA cipher object and print the provider
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
                   //Cipher cipher = Cipher.getInstance("RSA");
                   System.out.println("\nProvider is: " + cipher.getProvider().getInfo());
                   System.out.println("\nStart encryption with public key");
    if (logger.isDebugEnabled())
                        logger.debug("\nProvider is: " + cipher.getProvider().getInfo());
                        logger.debug("\nStart encryption with public key");
    // encrypt the plaintext using the public key
    cipher.init(Cipher.ENCRYPT_MODE, key);
    cipherText = cipher.doFinal(text);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return cipherText;
    * Encrypt a text using public key. The result is enctypted BASE64 encoded text
    * @param text The original unencrypted text
    * @param key The public key
    * @return Encrypted text encoded as BASE64
    * @throws java.lang.Exception
    public static String encrypt(String text, PublicKey key) throws Exception
    String encryptedText;
    try
    byte[] cipherText = encrypt(text.getBytes("UTF8"),key);
    encryptedText = encodeBASE64(cipherText);
                   System.out.println("Enctypted text is: " + encryptedText);
                   logger.debug("Enctypted text is: " + encryptedText);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return encryptedText;
    * Decrypt text using private key
    * @param text The encrypted text
    * @param key The private key
    * @return The unencrypted text
    * @throws java.lang.Exception
    public static byte[] decrypt(byte[] text, PrivateKey key) throws Exception
    byte[] dectyptedText = null;
    try
    // decrypt the text using the private key
    //Cipher cipher = Cipher.getInstance("RSA/CBC/PKCS1Padding","BC");
                   Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
                   //Cipher cipher = Cipher.getInstance("RSA");
                   logger.debug("Start decryption");
                   System.out.println("Start decryption");
    cipher.init(Cipher.DECRYPT_MODE, key);
    dectyptedText = cipher.doFinal(text);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return dectyptedText;
    * Decrypt BASE64 encoded text using private key
    * @param text The encrypted text, encoded as BASE64
    * @param key The private key
    * @return The unencrypted text encoded as UTF8
    * @throws java.lang.Exception
    public static String decrypt(String text, PrivateKey key) throws Exception
    String result;
    try
    // decrypt the text using the private key
    byte[] dectyptedText = decrypt(decodeBASE64(text),key);
    result = new String(dectyptedText, "UTF8");
                   logger.debug("Decrypted text is: " + result);
    catch (Exception e)
                   logger.error(e, e);
    throw e;
    return result;
    * Encode bytes array to BASE64 string
    * @param bytes
    * @return Encoded string
    private static String encodeBASE64(byte[] bytes)
    BASE64Encoder b64 = new BASE64Encoder();
    return b64.encode(bytes);
    * Decode BASE64 encoded string to bytes array
    * @param text The string
    * @return Bytes array
    * @throws IOException
    private static byte[] decodeBASE64(String text) throws IOException
    BASE64Decoder b64 = new BASE64Decoder();
    return b64.decodeBuffer(text);
    * Encrypt file using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void encryptFile(String srcFileName, String destFileName, PublicKey key) throws Exception
    encryptDecryptFile(srcFileName,destFileName, key, Cipher.ENCRYPT_MODE);
    * Decrypt file using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void decryptFile(String srcFileName, String destFileName, PrivateKey key) throws Exception
    encryptDecryptFile(srcFileName,destFileName, key, Cipher.DECRYPT_MODE);
    * Encrypt and Decrypt files using 1024 RSA encryption
    * @param srcFileName Source file name
    * @param destFileName Destination file name
    * @param key The key. For encryption this is the Private Key and for decryption this is the public key
    * @param cipherMode Cipher Mode
    * @throws Exception
    public static void encryptDecryptFile(String srcFileName, String destFileName, Key key, int cipherMode) throws Exception
    OutputStream outputWriter = null;
    InputStream inputReader = null;
    try
              Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
    String textLine = null;
    byte[] buf = cipherMode == Cipher.ENCRYPT_MODE? new byte[100] : new byte[128];
    int newBuffer;
    // init the Cipher object for Encryption...
    cipher.init(cipherMode, key);
    // start FileIO
    outputWriter = new FileOutputStream(destFileName);
    inputReader = new FileInputStream(srcFileName);
    while ( (bufl = inputReader.read(buf)) != -1)
    String encText = null;
    String base64EncText = null ;
    if (cipherMode == Cipher.ENCRYPT_MODE)
    encText = encrypt(getBytes(buf,newBuffer).toString(),(PublicKey)key);
    else
    encText = decrypt(getBytes(buf,newBuffer).toString(),(PrivateKey)key);
                   outputWriter.write(encText.getBytes());
    outputWriter.flush();
    catch (Exception e)
                   logger.error(e,e);
    throw e;
    finally
    try
    if (outputWriter != null)
    outputWriter.close();
    if (inputReader != null)
    inputReader.close();
    catch (Exception e)
    public static byte[] getBytes(byte[] arr, int length)
    byte[] newArr = null;
    if (arr.length == length)
    newArr = arr;
    else
    newArr = new byte[length];
    for (int i = 0; i < length; i++)
    newArr[i] = (byte) arr;
    return newArr;
         public static void main(String args[])
              throws Exception
              init();
              KeyPair keyPair = generateKey();
              PublicKey pubKey = keyPair.getPublic();
              PrivateKey privKey = keyPair.getPrivate();
              encryptFile("C:\\Temp\\TestFile.xml","C:\\Temp\\RSAEncryptedText.xml",pubKey);
              decryptFile("C:\\Temp\\RSAEncryptedText.xml","C:\\Temp\\RSADecryptedText.xml",privKey);

    I think you are the same poster as 'contebral'. Why the multiple identities?
    First off, the code you posted doesn't even compile. The getBytes() method has an error. Also, in method encryptDecryptFile() the variable bufl is not declared.
    The rest of the code is a mess. The toString() method does not do what you think it does; you're just going to get the object reference id. There is no reason to keep converting to/from byte arrays and Strings. Most of the time your data should be kept as a byte array, only possibly converting for I/O operations.
    The size of the base64 encoded output is not 128 bytes, it is 172 bytes. At this point I ran out of patience and stopped looking.
    There is no shame in being a beginner in Java, but you must walk before you can run. Stop running.

  • Urgent information for my Graphics card

    I have a GeForce4 MX 4000
    Motherboard ID   04/18/2003-KM266-8235-6A6LVM4DC-00
    Motherboard Name   MSI KM2M Combo (MS-6738)
    This has a AGP slot that takes a 4x card.  I am having problems sourcing the right card as the few that look as if they will fit are 8x cards
    http://www.amazon.co.uk/Sweex-NVIDIA-GeForce-5500-256/dp/B001C9VCXW/ref=sr_1_1?ie=UTF8&s=electronics&qid=1236441783&sr=1-1
    The one above is the one I am thinking of buying.   I can't see any other descent one around or one with the same connections.
    The card has gone it needs replacing and I need an answer ASAP as I need to do some work and without the graphics card I am stuck.  So urgent help please if possible
    Many thanks
    Tony

    I have restarted my computer this morning and guess what!! ??  I had changed the to the onboard video and it also has a code 10.  I cancelled the order with Amazon now phew, glad that didn't come!!  So I still have the same problem.  Also I think because the card isn;t working certain software isn't working.  Software is crashing.  So I think it could be the Motherboard??  What do you think?
    Looking forward to your replies
    Tony
    PS Just done a macrium back up of my system.  Just in case.

  • Convert characterset WE8MSWIN1252 to UTF8

    Hi all
    I am using Oracle 10g Database. Now the Characterset as WE8MSWIN1252. I want to change my CharacterSet to UTF8. It is possible.
    Can anyone please post me the steps involved.
    Very Urgent !!!!!!!
    Regds
    Nirmal

    Subject: Changing WE8ISO8859P1/ WE8ISO8859P15 or WE8MSWIN1252 to (AL32)UTF8
    Doc ID: Note:260192.1 Type: BULLETIN
    Last Revision Date: 24-JUL-2007 Status: PUBLISHED
    Changing the database character set to (AL32)UTF8
    =================================================
    When changing a Oracle Applications Database:
    Please see the following note for Oracle Applications database
    Note 124721.1 Migrating an Applications Installation to a New Character Set
    If you have any doubt log an Oracle Applications TAR for assistance.
    It might be usefull to read this note, even when using Oracle Applications
    seen it explains what to do with "lossy" and "truncation" in the csscan output.
    Scope:
    You can't simply use "ALTER DATABASE CHARACTER SET" to go from WE8ISO8859P1 or
    WE8ISO8859P15 or WE8MSWIN1252 to (AL32)UTF8 because (AL32)UTF8 is not a
    binary superset of any of these character sets.
    You will run into ORA-12712 or ORA-12710 because the code points for the
    "extended ASCII" characters are different between these 3 character sets
    and (AL32)UTF8.
    This note will describe a method of still using a
    "ALTER DATABASE CHARACTER SET" in a limited way.
    Note that we strongly recommend to use the SAME flow when doing a full
    export / import.
    The choise between using FULL exp/imp and a PARTIAL exp/imp is made in point
    7)
    DO NOT USE THIS NOTE WITH ANY OTHER CHARACTERSETS
    WITHOUT CHECKING THIS WITH ORACLE SUPPORT
    THIS NOTE IS SPECIFIC TO CHANGING:
    FROM: WE8ISO8859P1, WE8ISO8859P15 or WE8MSWIN1252
    TO: AL32UTF8 or UTF8
    AL32UTF8 and UTF8 are both Unicode character sets in the oracle database.
    UTF8 encodes Unicode version 3.0 and will remain like that.
    AL32UTF8 is kept up to date with the Unicode standard and encodes the Unicode
    standards 3.0 (in database 9.0), 3.1 (database 9.2) or 3.2 (database 10g).
    For the purposes of this note we shall only use AL32UTF8 from here on forward,
    you can substitute that for UTF8 without any modifications.
    If you use 8i or lower clients please have a look at
    Note 237593.1 Problems connecting to AL32UTF8 databases from older versions (8i and lower)
    WE8ISO8859P1, WE8ISO8859P15 or WE8MSWIN1252 are the 3 main character sets that
    are used to store Western European or English/American data in.
    All standard ASCII characters that are used for English/American do not have to
    be converted into AL32UTF8 - they are the same in AL32UTF8. However, all other
    characters, like accented characters, the Euro sign, MS "smart quotes", etc.
    etc., have a different code point in AL32UTF8.
    That means that if you make extensive use of these types of characters the
    preferred way of changing to AL32UTF8 would be to export the entire database and
    import the data into a new AL32UTF8 database.
    However, if you mainly use standard ASCII characters and not a lot else (for
    example if you only store English text, maybe with some Euro signs or smart
    quotes here and there), then it could be a lot quicker to proceed with this
    method.
    Please DO read in any case before going to UTF8 this note:
    Note 119119.1 AL32UTF8 / UTF8 (unicode) Database Character Set Implications
    and consider to use CHAR semantics if on 9i or higher:
    Note 144808.1 Examples and limits of BYTE and CHAR semantics usage
    It's best to change the tables and so to CHAR semantics before the change
    to UTF8.
    This procedure is valid for Oracle 8i, 9i and 10g.
    Note:
    * If you are on 9i please make sure you are at least on Patch 9204, see
    Note 250802.1 Changing character set takes a very long time and uses lots of rollback space
    * if you have any function-based indexes on columns using CHAR length semantics
    then these have to be removed and re-created after the character set has
    been changed. Failure to do so will result in ORA-604 / ORA-2262 /ORA-904
    when the "alter database character set" statement is used in step 4.
    Actions to take:
    1) install the csscan tool.
    1A)For 10g use the csscan 2.x found in /bin, no need to install a newer version
    Goto 1C)
    1B)For 9.2 and lower:
    Please DO install the version 1.2 or higher from TechNet for you version.
    http://technet.oracle.com/software/tech/globalization/content.html
    and install this.
    copy all scripts and executables found in the zip file you downloaded
    to your oracle_home overwriting the old versions.
    goto 1C).
    Note: do NOT use the CSSCAN of a 10g installation for 9i/8i!
    1C)Run csminst.sql using these commands and SQL statements:
    cd $ORACLE_HOME/rdbms/admin
    set oracle_sid=<your SID>
    sqlplus "sys as sysdba"
    SQL>set TERMOUT ON
    SQL>set ECHO ON
    SQL>spool csminst.log
    SQL> START csminst.sql
    Check the csminst.log for errors.
    If you get when running CSSCAN the error
    "Character set migrate utility schema not compatible."
    then
    1ca) or you are starting the old executable, please do overwrite all old files with the files
    from the newer version from technet (1.2 has more files than some older versions, that's normal).
    1cb) or check your PATH , you are not starting csscan from this ORACLE_HOME
    1cc) or you have not runned the csminst.sql from the newer version from technet
    More info is in Note 123670.1 Use Scanner Utility before Altering the Database Character Set
    Please, make sure you use/install csscan version 1.2 .
    2) Check if you have no invalid code points in the current character set:
    Run csscan with the following syntax:
    csscan FULL=Y FROMCHAR=<existing database character set> TOCHAR=<existing database character set> LOG=WE8check CAPTURE=Y ARRAY=1000000 PROCESS=2
    Always run CSSCAN with 'sys as sysdba'
    This will create 3 files :
    WE8check.out a log of the output of csscan
    WE8check.txt a Database Scan Summary Report
    WE8check.err contains the rowid's of the rows reported in WE8check.txt
    At this moment we are just checking that all data is stored correctly in the
    current character set. Because you've entered the TO and FROM character sets as
    the same you will not have any "Convertible" or "Truncation" data.
    If all the data in the database is stored correctly at the moment then there
    should only be "Changeless" data.
    If there is any "Lossy" data then those rows contain code points that are not
    currently stored correctly and they should be cleared up before you can continue
    with the steps in this note. Please see the following note for clearing up any
    "Lossy" data:
    Note 225938.1 Database Character Set Healthcheck
    Only if ALL data in WE8check.txt is reported as "Changeless" it is safe to
    proceed to point 3)
    NOTE:
    if you have a WE8ISO8859P1 database and lossy then changing your WE8ISO8859P1 to
    WE8MSWIN1252 will most likly solve you lossy.
    Why ? this is explained in
    Note 252352.1 Euro Symbol Turns up as Upside-Down Questionmark
    Do first a
    csscan FULL=Y FROMCHAR=WE8MSWIN1252 TOCHAR=WE8MSWIN1252 LOG=1252check CAPTURE=Y ARRAY=1000000 PROCESS=2
    Always run CSSCAN with 'sys as sysdba'
    For 9i, 8i:
    Only if ALL data in 1252check.txt is reported as "Changeless" it is safe to
    proceed to the next point. If not, log a tar and provide the 3 generated files.
    Shutdown the listener and any application that connects locally to the database.
    There should be only ONE connection the database during the WHOLE time and that's
    the sqlplus session where you do the change.
    2.1. Make sure the parallel_server parameter in INIT.ORA is set to false or it is not set at all.
    If you are using RAC see
    Note 221646.1 Changing the Character Set for a RAC Database Fails with an ORA-12720 Error
    2.2. Execute the following commands in sqlplus connected as "/ AS SYSDBA":
    SPOOL Nswitch.log
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    ALTER DATABASE CHARACTER SET WE8MSWIN1252;
    SHUTDOWN IMMEDIATE;
    STARTUP RESTRICT;
    SHUTDOWN;
    The extra restart/shutdown is necessary in Oracle8(i) because of a SGA
    initialization bug which is fixed in Oracle9i.
    -- a alter database takes typically only a few minutes or less,
    -- it depends on the number of columns in the database, not the amount of data
    2.3. Restore the parallel_server parameter in INIT.ORA, if necessary.
    2.4. STARTUP;
    now go to point 3) of this note of course your database is then WE8MSWIN1252, so
    you need to replace <existing database character set> with WE8MSWIN1252 from now on.
    For 10g and up:
    When using CSSCAN 2.x (10g database) you should see in 1252check.txt this:
    All character type data in the data dictionary remain the same in the new character set
    All character type application data remain the same in the new character set
    and
    The data dictionary can be safely migrated using the CSALTER script
    IF you see this then you need first to go to WE8MSWIN1252
    If not, log a tar and provide all 3 generated files.
    Shutdown the listener and any application that connects locally to the database.
    There should be only ONE connection the database during the WHOLE time and that's
    the sqlplus session where you do the change.
    Then you do in sqlplus connected as "/ AS SYSDBA":
    -- check if you are using spfile
    sho parameter pfile
    -- if this "spfile" then you are using spfile
    -- in that case note the
    sho parameter job_queue_processes
    sho parameter aq_tm_processes
    -- (this is Bug 6005344 fixed in 11g )
    -- then do
    shutdown immediate
    startup restrict
    SPOOL Nswitch.log
    @@?\rdbms\admin\csalter.plb
    -- Csalter will aks confirmation - do not copy paste the whole actions on one time
    -- sample Csalter output:
    -- 3 rows created.
    -- This script will update the content of the Oracle Data Dictionary.
    -- Please ensure you have a full backup before initiating this procedure.
    -- Would you like to proceed (Y/N)?y
    -- old 6: if (UPPER('&conf') <> 'Y') then
    -- New 6: if (UPPER('y') <> 'Y') then
    -- Checking data validility...
    -- begin converting system objects
    -- PL/SQL procedure successfully completed.
    -- Alter the database character set...
    -- CSALTER operation completed, please restart database
    -- PL/SQL procedure successfully completed.
    -- Procedure dropped.
    -- if you are using spfile then you need to also
    -- ALTER SYSTEM SET job_queue_processes=<original value> SCOPE=BOTH;
    -- ALTER SYSTEM SET aq_tm_processes=<original value> SCOPE=BOTH;
    shutdown
    startup
    and the 10g database will be WE8MSWIN1252
    now go to point 3) of this note of course your database is then WE8MSWIN1252, so
    you need to replace <existing database character set> with WE8MSWIN1252 from now on.
    3) Check which rows contain data for which the code point will change
    Run csscan with the following syntax:
    csscan FULL=Y FROMCHAR=<your database character set> TOCHAR=AL32UTF8 LOG=WE8TOUTF8 CAPTURE=Y ARRAY=1000000 PROCESS=2
    Always run CSSCAN with 'sys as sysdba'
    This will create 3 files :
    WE8TOUTF8.out a log of the output of csscan
    WE8TOUTF8.txt a Database Scan Summary Report
    WE8TOUTF8.err a contains the rowid's of the rows reported in WE8check.txt
    + You should have NO entries under Lossy, because they should have been filtered
    out in step 2), if you have data under Lossy then please redo step 2).
    + If you have any entries under Truncation then go to step 4)
    + If you only have entries for Convertible (and Changeless) then solve those in
    step 5).
    + If you have NO entry's under the Convertible, Truncation or Lossy,
    and all data is reported as "Changeless" then proceed to step 6).
    4) If you have Truncation entries.
    Whichever way you migrate from WE8(...) to AL32UTF8, you will always have to
    solve the entries under Truncation.
    Standard ASCII characters require 1 byte of storage space under in WE8(...) and
    in AL32UTF8, however, other characters (like accented characters and the Euro
    sign) require only 1 byte of storage space in WE8(...), but they require 2 or
    more bytes of space in AL32UTF8.
    That means that the total amount of space needed to store a string can exceed
    the defined column size.
    For more information about this see:
    Note 119119.1 AL32UTF8 / UTF8 (unicode) Database Character Set Implications
    and
    "Truncation" data is always also "Convertible" data, which means that whatever
    else you do, these rows have to be exported before the character set is changed
    and re-imported after the character set has changed. If you proceed with that
    without dealing with the truncation issue then the import will fail on these
    columns because the size of the data exceeds the maximum size of the column.
    So these truncation issues will always require some work, there are a number of
    ways to deal with them:
    A) Update these rows in the source database so that they contain less data
    B) Update the table definition in the source database so that it can contain
    longer data. You can do this by either making the column larger, or by using
    CHAR length semantics instead of BYTE length semantics (only possible in
    Oracle9i).
    C) Pre-create the table before the import so that it can contain 'longer' data.
    Again you have a choice between simply making it larger, or switching from BYTE
    to CHAR length semantics.
    If you've chosen option A or B then please rerun csscan to make sure there is no
    Truncation data left. If that also means there is no Convertible data left then
    proceed to step 6), otherwise proceed to step 5).
    To know how much the data expands simply check the csscan output.
    you can find that in the .err file as "Max Post Conversion Data Size"
    For example, check in the .txt file wich table has "Truncation",
    let's assume you have there a row that say's
    -- snip from WE8TOUTF8.txt
    [Distribution of Convertible, Truncated and Lossy Data by Table]
    USER.TABLE Convertible Truncation Lossy
    SCOTT.TESTUTF8 69 6 0
    -- snip from WE8TOUTF8.txt
    then look in the .err file for "TESTUTF8" until the
    "Max Post Conversion Data Size" is bigger then the column size for that table.
    User : SCOTT
    Table : TESTUTF8
    Column: ITEM_NAME
    Type : VARCHAR2(80)
    Number of Exceptions : 6
    Max Post Conversion Data Size: 81
    -> the max size after going to UT8 will be 81 bytes for this column.
    5) If you have Convertible entries.
    This is where you have to make a choice whether or not you want to continue
    on this path or if it's simpler to do a complete export/import in the
    traditional way of changing character sets.
    All the data that is marked as Convertible needs to be exported and then
    re-imported after the character set has changed.
    6) check if you have functional indexes on CHAR based columns and purge the RECYCLEBIN.
    select OWNER, INDEX_NAME , INDEX_TYPE, TABLE_OWNER, TABLE_NAME, STATUS,
    FUNCIDX_STATUS from ALL_INDEXES where INDEX_TYPE not in
    ('NORMAL', 'BITMAP','IOT - TOP') and TABLE_NAME in (select unique
    (table_name) from dba_tab_columns where char_used ='C');
    if this gives rows back then the change will fail with
    ORA-30556: functional index is defined on the column to be modified
    if you have functional indexes on CHAR based columns you need to drop the
    index and recreate after the change , note that a disable will not be enough.
    On 10g check ,while connected as sysdba, if there are objects in the recyclebin
    SQL> show recyclebin
    If so do also a PURGE DBA_RECYCLEBIN; other wise you will recieve a ORA-38301 during CSALTER.
    7) Choose on how to do the actual change
    you have 2 choices now:
    Option 1 - exp/imp the entire database and stop using the rest of this note.
    a. Export the current entire database (with NLS_LANG set to <your old
    database character set>)
    b. Create a new database in the AL32UTF8 character set
    c. Import all data into the new database (with NLS_LANG set to <your old database character set>)
    d. The conversion is complete, do not continue with this note.
    note that you do need to deal with truncation issues described in step 4), even
    if you use the export/import method.
    Option 2 - export only the convertible data and continue using this note.
    For 9i and lower:
    a. If you have "convertible" data for the sys objects SYS.METASTYLESHEET,
    SYS.RULE$ or SYS.JOB$ then follow the following note for those objects:
    Note 258904.1 Convertible data in data dictionary: Workarounds when changing character set
    make sure to combine the next steps in the example script given in that note.
    b. Export all the tables that csscan shows have convertible data
    (make sure that the character set part of the NLS_LANG is set to the current
    database character set during the export session)
    c. Truncate those tables
    d. Run csscan again to verify you only have "changeless" application data left
    e. If this now reports only Changeless data then proceed to step 8), otherwise
    do the same again for the rows you've missed out.
    For 10g and up:
    a. Export all the USER tables that csscan shows have convertible data
    (make sure that the character set part of the NLS_LANG is set to the current
    database character set during the export session)
    b. Fix any "convertible" in the SYS schema, note that the 10g way to change
    the characterset (= the CSALTER script) will deal with any CLOB data in the
    sys schema. All "no 9i only" fixes in
    Note 258904.1 Convertible data in data dictionary: Workarounds when changing character set
    should NOT be done in 10g
    c. Truncate the exported user tables.
    d. Run csscan again to verify you only have "changeless" application data left
    e. If this now reports only Changeless data then proceed to step 8), otherwise
    do the same again for the rows you've missed out.
    When using CSSCAN 2.x (10g database) you should see in WE8TOUTF8.txt this:
    The data dictionary can be safely migrated using the CSALTER script
    If you do NOT have this when working on a 10g system CSALTER will NOT work and this
    means you have missed something or not followed all steps in this note.
    8) Perform the character set change:
    Perform a backup of the database.
    Check the backup.
    Double-check the backup.
    For 9i and below:
    Then use the "alter database" command, this changes the current database
    character set definition WITHOUT changing the actual stored data.
    Shutdown the listener and any application that connects locally to the database.
    There should be only ONE connection the database during the WHOLE time and that's
    the sqlplus session where you do the change.
    1. Make sure the parallel_server parameter in INIT.ORA is set to false or it is not set at all.
    If you are using RAC see
    Note 221646.1 Changing the Character Set for a RAC Database Fails with an ORA-12720 Error
    2. Execute the following commands in sqlplus connected as "/ AS SYSDBA":
    SPOOL Nswitch.log
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
    SHUTDOWN IMMEDIATE;
    -- a alter database takes typically only a few minutes or less,
    -- it depends on the number of columns in the database, not the amount of data
    3. Restore the parallel_server parameter in INIT.ORA, if necessary.
    4. STARTUP;
    Without the INTERNAL_USE you get a ORA-12712: new character set must be a superset of old character set
    WARNING WARNING WARNING
    Do NEVER use "INTERNAL_USE" unless you did follow the guidelines STEP BY STEP
    here in this note and you have a good idea what you are doing.
    Do NEVER use "INTERNAL_USE" to "fix" display problems, but follow Note 225938.1
    If you use the INTERNAL_USE clause on a database where there is data listed
    as convertible without exporting that data then the data will be corrupted by
    changing the database character set !
    For 10g and up:
    Shutdown the listener and any application that connects locally to the database.
    There should be only ONE connection the database during the WHOLE time and that's
    the sqlplus session where you do the change.
    Then you do in sqlplus connected as "/ AS SYSDBA":
    -- check if you are using spfile
    sho parameter pfile
    -- if this "spfile" then you are using spfile
    -- in that case note the
    sho parameter job_queue_processes
    sho parameter aq_tm_processes
    -- (this is Bug 6005344 fixed in 11g )
    -- then do
    shutdown
    startup restrict
    SPOOL Nswitch.log
    @@?\rdbms\admin\csalter.plb
    -- Csalter will aks confirmation - do not copy paste the whole actions on one time
    -- sample Csalter output:
    -- 3 rows created.
    -- This script will update the content of the Oracle Data Dictionary.
    -- Please ensure you have a full backup before initiating this procedure.
    -- Would you like to proceed (Y/N)?y
    -- old 6: if (UPPER('&conf') <> 'Y') then
    -- New 6: if (UPPER('y') <> 'Y') then
    -- Checking data validility...
    -- begin converting system objects
    -- PL/SQL procedure successfully completed.
    -- Alter the database character set...
    -- CSALTER operation completed, please restart database
    -- PL/SQL procedure successfully completed.
    -- Procedure dropped.
    -- if you are using spfile then you need to also
    -- ALTER SYSTEM SET job_queue_processes=<original value> SCOPE=BOTH;
    -- ALTER SYSTEM SET aq_tm_processes=<original value> SCOPE=BOTH;
    shutdown
    startup
    and the 10g database will be AL32UTF8
    9) Reload the data pump packages after a change to AL32UTF8 / UTF8 in Oracle10
    If you use Oracle10 then the datapump packages need to be reloaded after
    a conversion to UTF8/AL32UTF8. In order to do this run the following 3
    scripts from $ORACLE_HOME/rdbms/admin in sqlplus connected as "/ AS SYSDBA":
    For 10.2.X:
    catnodp.sql
    catdph.sql
    catdpb.sql
    For 10.1.X:
    catnodp.sql
    catdp.sql
    10) Reimporting the exported data:
    If you exported any data in step 5) then you now need to reimport that data.
    Make sure that the character set part of the NLS_LANG is still set to the
    original database character set during the import session (just as it was during
    the export session).
    11) Verify the clients NLS_LANG:
    Make sure your clients are using the correct NLS_LANG setting:
    Regards,
    Chotu,
    Bangalore

  • WriteToFile(doc DOMDocument,File varchar2) error-Urgent reply needed

    The problem description in our environment:-
    A xmldom package in the oracle 8.1.7 is trying to create an xml file from a DOMdocument. We are creating this DOMdocument by using an xmlparser. The input to the xmlparser is a file on the unix space.We are able to read the values ,display them. The error happens when the writeToFile method is used to update the xml file after changing the node values in the dom document. The environment seems to be okay or is there any problem with it.
    To check our logic, a sample code from the web page http://www.akadia.com/services/ora_gen_xml.html was run.It gave the same error description(ORA-20000).It had also used the same function and the error occured at the same line number.The code from the web page reads as:-
    DECLARE
    doc sys.xmldom.DOMDocument;
    main_node sys.xmldom.DOMNode;
    root_node sys.xmldom.DOMNode;
    user_node sys.xmldom.DOMNode;
    item_node sys.xmldom.DOMNode;
    root_elmt sys.xmldom.DOMElement;
    item_elmt sys.xmldom.DOMElement;
    item_text sys.xmldom.DOMText;
    CURSOR get_users(p_deptno NUMBER) IS
    SELECT empno
    , ename
    , deptno
    , rownum
    FROM emp
    WHERE deptno = p_deptno;
    BEGIN
    doc := sys.xmldom.newDOMDocument;
    main_node := sys.xmldom.makeNode(doc);
    root_elmt := sys.xmldom.createElement(
    doc
    , 'EMPSET'
    root_node := sys.xmldom.appendChild(
    main_node
    , sys.xmldom.makeNode(root_elmt)
    FOR get_users_rec IN get_users(10) LOOP
    item_elmt := sys.xmldom.createElement(
    doc
    , 'EMP'
    sys.xmldom.setAttribute(
    item_elmt
    , 'num'
    , get_users_rec.rownum
    user_node := sys.xmldom.appendChild(
    root_node
    , sys.xmldom.makeNode(item_elmt)
    item_elmt := sys.xmldom.createElement(
    doc
    , 'EMP_NO'
    item_node := sys.xmldom.appendChild(
    user_node
    , sys.xmldom.makeNode(item_elmt)
    item_text := sys.xmldom.createTextNode(
    doc
    , get_users_rec.empno
    item_node := sys.xmldom.appendChild(
    item_node
    , sys.xmldom.makeNode(item_text)
    END LOOP;
    sys.xmldom.writeToFile(doc , '/user/sb8066\docSample.xml');
    sys.xmldom.freeDocument(doc);
    END;
    The table emp was created with values in it.
    Oracle error code:-
    ORA-20000: An internal error has occurred: Permission denied
    ORA-06512: at "SYS.XMLDOM", line 37
    ORA-06512: at "SYS.XMLDOM", line 1784
    ORA-06512: at line 61
    The priveleges that were required for the above code were:-
    GRANT javauserpriv to scott;
    GRANT javasyspriv to scott;
    GRANT EXECUTE ON xmldom TO scott;
    These were also existing for our code and database user.NO clue is there about any possible environmental setting errors.
    This code was trying to do the same job that we did but created a document object and not used an existing document object(from a parsing operation).Please advice about possible solutions.It is urgent.
    with Regards
    gopal

    Hai kevin
    I tried both of what you have said .I had also some suggestions from an oracle dba.Can you please help me any idea you have about it.It's regarding the encoding of the xml file.The suggestion was:-I have enclosed the my try for the first solution he suggested.
    "ora-2000 is a very generic error ( mostly with intermedia/text/context/apps)
    but may occur in regular stuff tooo..
    in MOST OF CASES, it does not have any INDIVIDUAL IMPORTANCE at all.
    its is resultant of ANOTHER ERROR.
    in your case it is
    ORA-06512 which is numeric or value error.
    somedata is not GOOOD or unwanted character in unwanted place.
    so these would be my LOOKOUTS (though, it may not relevent, as my knowledge on XML is very less.
    I DONT DO ANY DEVELOPMENT at all. But just support lots n lots n lotsa developers).
    1. as per your posting,
    > > > sys.xmldom.writeToFile(doc ,
    --->-- > > > '/user/temp\docSample.xml');
    > > > sys.xmldom.freeDocument(doc);
    in general terms, this would be wierd naming(line 2).
    for unix '/user/temp/docsample' should do
    (beware of file system permissions and case sensitivity in UNIX)
    for windows '\usr\temp\docsample' should be used.
    except IF U ARE USING UNC / MAPPED DRIVES ( THERE IS A SPECIAL CONSIDERATION
    TO USE directory/direcotry\filname..THAT IS DIFFERENT CASE).
    check this ( this may lead to error PERMISSION DENIED ( the clasical words from UNIX)
    2. to deal with ora-6512, this may posssibly be th reason.
    The default character set for XML is UTF8 - special characters indicated would
    have an ASCII value > 127. Any character with an ASCII value > 128 is
    interpreted as being the leading byte of a multi-byte character in UTF8.
    To get around this you need to explicitly specify the character set you are
    using. For example:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    This tells the XML parser to read the file as ISO-8859-1. If you are using
    another character set, substitute the ISO name of the character set in this
    line."
    Kamal , i tried giving the '/' slash instead of '\' .The oracle reported a error,description as follows.
    63 sys.xmldom.writeToFile(doc , '/user/temp/docSample.xml',sys.xmldom.getCharset(doc));
    64 sys.xmldom.freeDocument(doc);
    65 END;
    66 /
    UTF8
    DECLARE
    ERROR at line 1:
    ORA-20000: An internal error has occurred: No such file or directory
    ORA-06512: at "SYS.XMLDOM", line 37
    ORA-06512: at "SYS.XMLDOM", line 1826
    ORA-06512: at line 63
    It reported error and when i revert back to the previously used slash,it had the old error.You must have read the dba's suggestions.Do you know about how to go about this.Anyway thaks for the help.Will be waiting for your advice.
    The UTF8 ouput you must be seeing is the document's charset after me setting it,previously i tried to get the default value after parsing ,it had the same report.
    regards
    gopal

Maybe you are looking for