The Database Migration Assistant for Unicode (DMU) is listed as a 12c new feature, but it is actually a separate tool that supports a number of different database versions.
Version 1.2 of the DMU is shipped with the 12c database. You can see it by running the following commands.
$ cd $ORACLE_HOME/dmu
$ sh dmu.sh
Oracle recommend you always download the latest release before starting a migration. At the time of writing, version 2.0 is available at OTN.
◉ Oracle Database Migration Assistant for Unicode: Downloads
Once you've downloaded it, it can be unzipped and run from anywhere, but I prefer to unzip it under a new directory in the ORACLE_HOME.
$ mkdir $ORACLE_HOME/dmu-2.0
$ cd $ORACLE_HOME/dmu-2.0
$ unzip /tmp/dmu-2.0.zip
Make sure the SYS.DBMS_DUMA_INTERNAL package is installed.
$ sqlplus / as sysdba
SQL> @?/rdbms/admin/prvtdumi.plb
Library created.
Package created.
No errors.
Package body created.
No errors.
SQL>
It's a good idea to create a separate tablespace for the repository, rather than using the SYSAUX tablespace.
SQL> CREATE TABLESPACE unicode_repo DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M;
If you are running against a database version prior to 11.2.0.3, you will probably need to patch your database. You can see the compatibility matrix here and the patch here.
During the migration process the Migration Status tab normally tells you the next step to take, and provides links to jump to the next step so you don't have to use the menu. In this article I chose to use the menus directly, but if you don't like that, always click back on the Migration Status tab between steps to see what you should do next.
We are now ready to start the migration.
$ export JAVA_HOME=$ORACLE_HOME/jdk
$ cd $ORACLE_HOME/dmu-2.0/dmu
$ sh dmu.sh
Right-click on the "Databases" node in the Navigator pane and select the "New Database Connection" option from the popup menu.
Download
Version 1.2 of the DMU is shipped with the 12c database. You can see it by running the following commands.
$ cd $ORACLE_HOME/dmu
$ sh dmu.sh
Oracle recommend you always download the latest release before starting a migration. At the time of writing, version 2.0 is available at OTN.
◉ Oracle Database Migration Assistant for Unicode: Downloads
Once you've downloaded it, it can be unzipped and run from anywhere, but I prefer to unzip it under a new directory in the ORACLE_HOME.
$ mkdir $ORACLE_HOME/dmu-2.0
$ cd $ORACLE_HOME/dmu-2.0
$ unzip /tmp/dmu-2.0.zip
Prepare
Make sure the SYS.DBMS_DUMA_INTERNAL package is installed.
$ sqlplus / as sysdba
SQL> @?/rdbms/admin/prvtdumi.plb
Library created.
Package created.
No errors.
Package body created.
No errors.
SQL>
It's a good idea to create a separate tablespace for the repository, rather than using the SYSAUX tablespace.
SQL> CREATE TABLESPACE unicode_repo DATAFILE SIZE 100M AUTOEXTEND ON NEXT 10M;
If you are running against a database version prior to 11.2.0.3, you will probably need to patch your database. You can see the compatibility matrix here and the patch here.
Migrate
During the migration process the Migration Status tab normally tells you the next step to take, and provides links to jump to the next step so you don't have to use the menu. In this article I chose to use the menus directly, but if you don't like that, always click back on the Migration Status tab between steps to see what you should do next.
We are now ready to start the migration.
$ export JAVA_HOME=$ORACLE_HOME/jdk
$ cd $ORACLE_HOME/dmu-2.0/dmu
$ sh dmu.sh
Right-click on the "Databases" node in the Navigator pane and select the "New Database Connection" option from the popup menu.
Enter the connection details and click the "Test Connection" button. Once you get a successful test, click the "Save" button to return to the previous screen.
When you return to the previous screen, expand the new connection node in the tree to start the Repository Configuration Wizard. Accept the "Install the repository in migration mode" option by clicking the "Next" button.
Accept the "ALT32UTF8" option by clicking the "Next" button.
Select the tablespace to hold the repository, then click the "Finish" button. Wait for the repository to be created, then click the "OK" button on the subsequent message box.
Right-click on the database connection and select the "Scan Database" option from the popup menu.
Click the "Next" button.
Alter any parameters as required, then click the "Next" button.
Select the objects to scan, then click the "Next" button.
Check the scan details, then click the "Finish" button.
Wait while the scan takes place. Once complete, click the "OK" button on the message box.
Right-click on the database connection and select the "Database Scan Report" option from the popup menu.
Check the report for possible problems.
Right-click on the database connection and select the "Bulk Cleansing" option from the popup menu.
Click the "Next" button.
Accept the "Migrate to character length semantics" option by clicking the "Next" button.
Decide if you want column changes to happen immediately, or during the conversion. Click the "Next" button.
Select the objects to be converted, then click the "Next" button.
Click the "Finish" button. Wait for the bulk cleansing to complete, then click the "OK" button on the resulting message box.
Check the results of the bulk cleansing.
Right-click on the database connection and select the "Convert Database" option from the popup menu.
Click the "Convert" button.
Click the "Yes" button to start the conversion.
The conversion will initiate the Scan Wizard again. Accept all the defaults by clicking the "Next" and "Finish" buttons where appropriate. Once the "Finish" button is clicked, the conversion will start. Wait for it to complete, then click the "OK" button on the final message box. You are presented with a screen showing you the outcome of the conversion.
The Migration Status tab also shows the conversion is complete.
Right-click on the database connection and select the "Configure DMU Repository" option from the popup menu
Select the "uninstall the repository" option and click the "Next" button.
Click the "Finish" button. Once complete, click on the "OK" button on the message box
Exit the Database Migration Assistant for Unicode (DMU) using the "File > Exit" menu option.
The conversion is complete.
Tidy Up
If you created a new tablespace for the migration, you can drop it now.
sqlplus / as sysdba
SQL> DROP TABLESPACE unicode_repo INCLUDING CONTENTS AND DATAFILES;
0 comments:
Post a Comment