9 Replies Latest reply: Jul 8, 2012 1:29 AM by user7244870 RSS

    How can i Change  the Character Set

    user7244870
      Dear all,
      How can i Change the Character Set of an Oracle Database?
        • 1. Re: How can i Change  the Character Set
          sb92075
          user7244870 wrote:
          Dear all,
          How can i Change the Character Set of an Oracle Database?
          CREATE DATABASE with correct character set

          Handle:     user7244870
          Email:     slnngk@163.com
          Status Level:     Newbie (5)
          Registered:     Sep 28, 2010
          Total Posts:     364
          Total Questions:     122 (63 unresolved)
          REALLY?
          why do you waste your time here when you rarely get answer?
          • 2. Re: How can i Change  the Character Set
            user7244870
            sb92075 wrote:
            user7244870 wrote:
            Dear all,
            How can i Change the Character Set of an Oracle Database?
            CREATE DATABASE with correct character set

            Handle:     user7244870
            Email:     slnngk@163.com
            Status Level:     Newbie (5)
            Registered:     Sep 28, 2010
            Total Posts:     364
            Total Questions:     122 (63 unresolved)
            REALLY?
            why do you waste your time here when you rarely get answer?
            Thanks,
            How about this?
            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 new_character; 
            SHUTDOWN IMMEDIATE;
            STARTUP;
            • 3. Re: How can i Change  the Character Set
              JustinCave
              What version of Oracle?
              What character set are you going from?
              What character set are you going to?
              Is there existing data in the database? What character set is that data?
              Have you run the character set scanner?

              Justin
              • 4. Re: How can i Change  the Character Set
                user7244870
                Justin Cave wrote:
                What version of Oracle?
                What character set are you going from?
                What character set are you going to?
                Is there existing data in the database? What character set is that data?
                Have you run the character set scanner?
                What version of Oracle?
                *10.2.0.1*

                What character set are you going from?
                WE8ISO8859P1

                What character set are you going to?
                ZHS16GBK

                Is there existing data in the database? What character set is that data?
                there are some data in my database.

                Have you run the character set scanner?
                how can i do?
                • 5. Re: How can i Change  the Character Set
                  Osama_Mustafa
                  I suggest to create new database with right character set as sb said


                  Osama ...
                  • 6. Re: How can i Change  the Character Set
                    Srini Chavali-Oracle
                    The process to do so is documented - http://docs.oracle.com/cd/B19306_01/server.102/b14225/ch11charsetmig.htm#sthref1441

                    Using the ALTER DATABASE CHARACTER SET command you described above is unsupported and will leave your database corrupted beyond repair.

                    If the database does not contain any data, it is best to recreate the database using the correct characterset.

                    If data is present and needs to be migrated (and assumption is that it is stored correctly), then one option is to perform a full export, drop the database, recreate the database with the correct characterset, and perform a full import. The CSALTER script mentioned in the link is no longer supported - you need to use the database migration assistant

                    https://forums.oracle.com/forums/ann.jspa?annID=1794
                    http://www.oracle.com/technetwork/products/globalization/dmu/overview/index.html

                    HTH
                    Srini
                    • 7. Re: How can i Change  the Character Set
                      Sergiusz Wolicki-Oracle
                      CSALTER script is supported for all current database releases. Database Migration Assistant for Unicode (DMU) supports only a few version/platform combinations for these releases. The DMU does not support conversion to ZHS16GBK.
                      CSALTER will not be supported in the coming major release. You will be able to use the DMU for discovering invalid binary representation of character data (aka lossy data), but there will be no tool for checking length issues in migration to ZHS16GBK.

                      Otherwise, follow the Database Globalization Support Guide and the relevant MOS notes. For WE8ISO8859P1 to ZHS16GBK migration you will need to use export/import for any non-ASCII data (which may possibly not survive the migration if the accented characters are not supported by ZHS16GBK) and for all CLOB columns (except those in data dictionary).

                      By the way, why bother migrating to ZHS16GBK. Migrate to Unicode AL32UTF8, the universal character set.

                      -- Sergiusz
                      • 8. Re: How can i Change  the Character Set
                        Srini Chavali-Oracle
                        Thanks for the clarification, Sergiusz !

                        Srini