Exp/imp, convertion from byte to char.

Hi,
I have a dump file exported from a database with nls_lenght_sematics=BYTES. When i import it into a database with nls_lenght_sematics=CHAR, it is retaining the BYTE charecteristics. Is there any way to change it into CHAR while importing. This for globalization support.
Thanks
Muneer

Hi Muneer,
No, import always preserve the LENGTH semantics of the original columns.
The workaround is to create your schema objects in the traget database first, with the desired semantics, prior to the importing the data.
Nat

Similar Messages

  • Convert from jchar to char

    Does any one know how to convert from jchar to char?
    Thank you,

    does it have to be a jchar or can you get a jstring? is it possible to convert your jchar into a jstring before you pick it up in jni? if you can get a jstring you can use the function
    const char* GetStringUTFChars(jstring str, jboolean *isCopy)
    you would get back a character pointer that points to a single char plus the null terminator

  • NLS_LENGTH_SEMENTICS from BYTE TO CHAR

    Hi,
    For supporting multibyte character, we need to change NLS_LENGTH_SEMENTICS parameter from BYTE to CHAR. But this parameter setting will effect for new database tables created thereafter. To change the storage characteristics for existing database tables we explicitly executed Alter statements for database tables for columns having datatype as “Varchar2” and “Char”.
    Problem:
    ======
    Since the number of database tables in PRODUCTION are very high and contains approx. 600 million of records spread over 400 database tables, we are not in a position to afford the time which will be spent in altering these database tables in PRODUCTION.
    We ran the test by alter script in System Test environment and alteration of database tables covering 150 tables and 200 million of records was carried out in almost 16-20 hrs.
    APPROACHES WE HAVE IN MIND
    ==========================
    1. Alter all the table columns (We tried the same and taking too much time)
    2. Export /Import with NLS_LENGTH_SEMENTICS set as CHAR(We discuss with our DBA about this approach and found that it will also take too much time and there is RISK of data inconsistency)
    3. Drop the index of the table, run alter script for changing storage type BYTE to CHAR , and rebuild the index (this is also taking too much time).
    All above approaches are very costly in terms of time, that we cannot afford.
    If any one having better solution then please suggest.
    thanks in advance
    Syed

    Hi
    We are also facing a similar problem
    We ran alter table scripts and now compiling the objects
    and that is taking lot of time.
    we have around 4000 invalids that by parallel recomp came down to 2000 but still these 2000 which are mostly packages .. are giving a hard time.
    if anyone has faced/found a similar issue/solution pls post. or maildirectly to me.
    Sunil Choudhary

  • Convert from int to char

    Hi,
    How can I convert from an int to char?

    The challange is to convert from int to String without using any API or automatic conversionWoah, what a challenge ! Why ?
    Anyway, what about a recursive call and switch statement. Something likepublic String intToString(int n) {
        if(n<0) {
            return "-"+intToString(-n);
        if(n<10) {
            return getStringDigit(n);
        else {
            return intToString(n/10) + getStringDigit(n%10);
    private String getStringDigit(int n) {
        switch(n) {
            case 0:
                return "0";
            // etc.
    }

  • Change NLS_LENGTH_SEMANTICS from BYTE to CHAR on Oracle 9i2 problem!

    Hi,
    I have created a new database on Oracle 9i 2, I did not find the correct pfile parameter for the NLS_LENGTH_SEMANTICS setting.
    So have created a standart UTF8 database and now I am trying to change the standard NLS_LENGTH_SEMANTICS=BYTE to CHAR. When I execute the following command in SQL PLUS "ALTER SYSTEM SET NLS_LENGTH_SEMANTICS=CHAR SCOPE=BOTH"
    The system is tells me that command is successfully executed.
    But when I look at the NLS_DATABASE_PARAMETERS table I do not see any change for the NLS_LENGTH_SEMANTICS parameter.
    I have also restarted the instance but still everything is the same as it was before.
    Do you know what I am doing wrong?
    Regards
    RobH

    Hi,
    Yeah you are right, the nls_session_parameters "NLS_LENGTH_SEMANTICS" for the app user is set to CHAR.
    This means that NLS_DATABASE_PARAMETERS is from the SYS or SYSTEM user view?
    Thanks a lot
    Regards
    RobH

  • Step by Step EXP / IMP database from Oracle 9i to Oracle 11g

    Please help on the captioned where I did the below
    1. Use EXP to export the database from a Oracle9i database (O9_DB) OLD_Windows2003_SERVER
    2. Install the Oracle 11g (default service name is ORCL) to a new Windows 2003 server and use the IMP to import the O9_DB, however, I need to create the same physical path as the OLD_Windows2003_SERVER (e.g E:\Oralce_9i\Ordata\) in order to complete the IMP
    3. I can launch the SQL Developer and obtain the records count of evey tables being imported
    However, is there any best / proper way to do the EXP/IMP, the ideal outcome would be
    1. Create a new namespace say (OLDDB) which same as the Oracle9i database name so maybe I don't need to modify much on the application side to point to the new database ?
    2. IMP the OLDDB to the new namespace OLDDB
    Thanks in advance

    Hello,
    If you create the new Database on a new Server, you could keep the same name for the Database.
    To switch from the old Database to the new one, you'll have to change the hostname on the "tnsnames.ora" or in any configuration file which define the database connexion.
    About the best way to do the Export/Import, you may have some details on the link below:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10819/expimp.htm#i262317
    Else, why do you intend to stay on a Windows 2003 Server, why not moving to Windows 2008 ?
    NB: Oracle *11.1* is certified on Windows 2008 and Oracle *11.2* is certified on Windows 2008 R2.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Exp imp issue from higher version to lower version

    Hi,
    I have an export dump file which was taken from 11g database(11.2.0.2.0) and trying to import into lower version of the database 9i(9.2.0.6.0), unable to complete the process.
    Two ways i have found and tested in my test db
    1)TNS entry of 9i database has been put into 11g database
    a)Export dump was successfuly taken from 11g db
    b)Getting below error,while import into 9i database
    IMP-00058: ORACLE error 6550 encountered
    ORA-06550: line 1, column 33:
    PLS-00302: component 'SET_NO_OUTLINES' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredIMP-00000: Import terminated unsuccessfully
    2)TNS entry of 11g database put into 9i database version.
    a)During export (trying to take exp dump from 11g db in 9i exp utility),getting below error
    EXP-00008: ORACLE error 1455 encountered
    ORA-01455: converting column overflows integer datatype
    EXP-00000: Export terminated unsuccessfully
    Kindly advice me to overcome from this issue.
    Regards,
    Faiz

    lkm_thedba wrote:
    you can use VERSION parameter in datapump and make this workable.
    Cheers,
    lkmYou cannot, since 9.x does not use datapump. The VERSION parameter can only be used if the target is 10.x or above
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#autoId57
    http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_overview.htm#CEGFCFFI
    HTH
    Srini

  • Byte to Chars converter

    Hi,
    I'm looking for a converter from byte array to char for different encodings (ANSI, UTF-8 and UTF-16BE, UTF-16LE encodings).
    I strongly believe there is a library/class that can do this.
    Thanks in advance.
    Lubos

    Well the problem is that I have to count the number of bytes and look for a special characters (like Form Feed).
    The only possibility I've found is to write my own parser..
    I've tried the InputStreamReader and implement my own implementation of InputStream for counting the bytes, but it seems the method read(byte[]) is not called every time..

  • Coversion from byte stream to character & character to byte stream.

    This is a test program.
    import java.io.*;
    class Test
         public static void main(String[] args)
              System.out.println("Hello World!");
              try
                   BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("C:/javafiles/testing/Picture.jpg"))));
                   PrintWriter bw = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File("C:/javafiles/testing/Copy.jpg"))));
                   String in = br.readLine();
                   while (in != null)
                        bw.println(in);
                        in = br.readLine();
                   br.close();
                   bw.close();
              catch (Exception e)
                   System.out.println("\n\n**********Exception Occured**************\n" + e);
    **First of all I read jpg file convert it into character stream from byte stream.
    **and copy it back and convert it back into byte steam from character stream.
    **The file copied back is corrupted.(getting open but display has fully scattered.)
    **That means data has been lost in conversion.
    **is it due to the encoding, I havn't specified while writing, or it always happens when we convert from byte stream to character and vice versa.
    **What encoding should I use while writing jpg files.
    please comment.

    **First of all I read jpg file convert it into
    character stream from byte stream.
    **and copy it back and convert it back into byte
    steam from character stream.First of all this operation is meaningless. A JPEG file doesn't contain anything that can be converted to characters. Delete the 'conversions' and all will be well.
    **What encoding should I use while writing jpg files.None. Don't use an encoding. Don't use Readers and Writers. Use InputStreams and OutputStreams only.

  • Converting a byte[] into a char[]

    Hi All,
    what's the best way to convert a byte[] into a char[]?
    Any advice appreciated. Thanks in advance.

    you will need a encoding schema...
    byte is binary data, char is interpret from byte by the system...
    easiest way without extra coding...
    new String(byte[], encoding).toCharArray()
    if you don't specify encoding... system default is used.

  • Database upgrade from 8i to 10g using exp/imp

    Dear Friends,
    Please provide the steps to upgrade from 8i to 10g using exp/imp.
    Thanks,
    Rathinavel

    Hi;
    Please also see cold backup option
    How to migrate from 8i to 10g to new server using cold backup [ID 742108.1]
    Also see:
    Upgrading from 8i to 10g with import utility
    http://searchoracle.techtarget.com/answer/Upgrading-from-8i-to-10g-with-import-utility
    Regard
    Helios

  • FM to convert double byte chars

    Hi All,
    Is there anyone know what are the function module to convert double-byte chars? Thanks.

    Seems like Blue Sky is not clear
    You want to convert what into what?
    Whats the purpose of this requirement, kindly give more details.
    Regards
    Karthik D

  • Convert from char* to unsigned char*

    Hi, I try compile example from: http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14294/relational.htm#i1000940
    in Visual C++ and I have problem with:
    const string userName = "SCOTT";
    because string is defined as unsigned char* and "SCOTT" is char*, is any function to convert from type char* to type unsigned char* ?

    I'm apologize for this stupid question, answer is very easy:
    const string userName = (const unsigned char*) "SCOTT";

  • Converting from unsigned int / short to byte[]

    Can anybody help me, I am trying to convert from:
    - unsigned int to byte[]
    - unsigned short to byte[]
    I will appreciate your help lots. thanks.

    @Op.
    This code converts an integer to a byte[], but you have to consider the byte order:
            int value = 0x12345678;
            byte[] result = new byte[4];
            for (int i=3; i>=0; i--) {
                result[i] = (byte)(value & 0xff);
                value = value >> 8;
            }This is another option:
            int dummy = 7;
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            os.write(dummy);
            byte[] bytes = os.toByteArray();Kaj

  • Using exp/imp to clone a database from Solaris to NT

    Hi All,
    We have an 8.1.6 Oracle database in production under Sun Solaris.
    We actually use this database to run Siebel CRM system.
    We have a Windows NT server which we used as a QA system
    for this application.
    We have a daily full export of our production database on the
    Sun machine. Now my manager wants to import this production
    dmp file into this Win NT database on a weekly basis.
    The goal here is to maintain the state of this NT database
    as much functional and close to the production one as possible.
    I would appreciate your help on this.
    I have some other general question:
    in which case can the Oracle imp utility be run in the
    full=y mode ?
    does this make any sense at all ?
    since the Oracle import utility does not delete
    any existing objects before it imports, these objects
    should be deleted manually and that's what I do
    with all Siebel users schemas; of course I do not
    do this with SYS, SYSTEM and other special Oracle
    users; question: are there any objects in these
    special Oracle schemas that have to be carried over from
    the source database to the target database to
    make the rest of the schemas functional ?
    Somehow I failed to find Oracle documentation on how
    to use exp/imp to create a complete clone of an Oracle
    database.
    Can direct path be used with full=y export/import mode ?
    Thank you in advance,
    Yuriy.

    As an alternative to using daily/weekly exports and imports, what would probably be more effective here would be replication. The databases could synch on a nightly basis and updated tables and rows will be transferred from your OLTP system to your read-only system. More information can be found on replication from "Oracle8i DBA Handbook" by Kevin Loney and Marlene Therialt.
    LM
    PS. IGNORE=Y

Maybe you are looking for

  • Legend rendering

    A few days ago I posted the message about too long text of legend item. Perhaps I found the way to solve the problem of proper rendering legend if width of legend items is wider then parent container. I want to clip legend item text, and show tooltip

  • How to align object in the report layout

    Hello, I find it very difficult to aligin objects in the report editor or in the template editor. I know there are some alignment options, like aligning to the grid or aligning a group of objects, but they seem to work on the bounding rectangle for t

  • How to clean from dust Hp Pavilion 23-f200eg

    Hi all i have a HP Pavilion TouchSmart 23-f200eg All-in-One Desktop Pc , I got it one year ago am very happy with it  But since above a month ago it's making a noise , i check and it have dust inside because i never clean it before inside (just the d

  • GR Posting before Schdeule date

    Hi Gurus Is it possible to post the GR for a scheduling agreement sch lines well before the date of schedule lines ? Edited by: Raja Krishna on Aug 28, 2008 7:11 AM

  • Mac Client Log on Window Takes Long Time

    Mac 10.6.x client is successfully joined the Windows Server 2008 based domain. But it's taking too much time (approx. 5 to 10 minutes) to shows the "Others" option (using that log on by AD user) in login window on Mac client. Has anyone idea why it's