top of page

Database Migration Assistant for Unicode (DMU)

Database Migration Assistant for Unicode, or more generally called dmu, is a new feature of Oracle 12c it allows you convert the database character set of your database from any non-unicode format to Unicode format using a simple graphical interface.

Like sql developer, DMU also comes as an independent tool of Oracle however for this demonstration I will be using the default tool being provided along with 12c R 12.1.0.2

Over here the name of my database is testdb and the default characterset for it is 'WE8MSWIN1252'.

In order to determine the characterset of your database you can use the following command:

SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

VALUE$

--------------------------------------------------------------------------------

WE8MSWIN1252

Next we need to ensure that the necessary package, SYS.DBMS_DUMA_INTERNAL , for running the dmu are present in the database .To do so we will need to run the ' prvtdumi.plb ' script as follows:

SQL> @?/rdbms/admin/prvtdumi.plb

Library created.

Package created.

No errors.

Package body created.

No errors

SQL> exit

Now to start the dmu wizard, set the Java home and then execute the dmu.sh shell script as follows:

[oracle@host01 ~]$ export JAVA_HOME=$ORACLE_HOME/jdk

[oracle@host01 ~]$ cd $ORACLE_HOME/dmu

[oracle@host01 dmu]$ sh dmu.sh

This will bring up the dmu wizard in which we will first have to establish a connection with our database. Here the name of my database is testdb and I have created a connection name test_conn as the sys user.

Once the connection is established we will have to create the repository to store all the conversion process that will be generated at the time of performing the conversion. As soon as you click on the connection pull down menu it will prompt you with this wizard. Perform the following steps to complete the repository creation:

In the next screen select the unicode format in which you want to convert your database into. In my case it is AL32UTF8:

Next select the tablespace where you want the conversion repository to be created. Here I have selected the SYSAUX tablespace:

Once completed it will prompt you with a confirmation box

Next the wizard will need to scan the database for incompatible object for this select the option 'Scan all character data in the database to check for conversion issue'.

In the next screen define the number of processes and amount of memory to allocate for the conversion process to be performed:

Next define the objects that are to be scanned to check compatibility issues. Here I have gone for both data dictionary as well as Application Schema.

In the next window you can specify which table objects to scan and which one to skip. Here I will suggest to select the option of "All to Convert" for all the objects. It is time taking but ensures that all objects have been scanned and there are no discrepancy at the time of performing the conversion:

Next the scan process will start and complete after a short time:

Next you will have to decide what you want to with the incompatible objects. You have three options of either making the necessary changes to make them compatible or attempt to convert them or completely remove their occurrence.

I went to perform the necessary conversion for the incompatible objects:

Once the process has completed it will give a confirmation message as follows:

Next start the conversion process by right clicking on the database name and selecting the option of "Convert Database" as follows:

Click on the "Convert" to start the process:

You will be prompted with a confirmation message that the database characterset conversion can proceed as the database is fulfilling all the pre-requisites:

In the next window define the number of processes and the amount of memory to want to allocate to perform the conversion:

Next the process will begin:

On the conversion is completed you will prompted the same:

Now disconnect from the dmu and close it:

In order to complete the conversion we will need to restart the database:

[oracle@host01 ~]$ . oraenv

ORACLE_SID = [testdb] ?

[oracle@host01 ~]$ sqlplus / as sysdba

SQL> shutdown immediate

SQL> startup

Once the database has restarted you can check the character set to confirm whether the conversion was successful:

SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;

VALUE$

--------------------------------------------------------------------------------

AL32UTF8

This shows the conversion happened successfully. Hope this article helped.

Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page