            DBMAKER 4.0 DATABASE MIGRATION TOOL READ ME


This file contains important information and operation guide about 
database migration tool. Please read this file before installing and 
running the software.

This file contains the following sections:

1. Introduction
2. System Requirements
3. Installation Instructions
4. DBMaker migration tool operation flow
5. Notice before migration


=======================================================================
1. Introduction
=======================================================================

Database migration tool provides the function to convert DBMaker 3.X 
database to DBMaker 4.0 database.


=======================================================================
2. System Requirements
=======================================================================

Before running database migration tool, you must install DBMaker 4.0 
system and DBMaker 3.74 or later 3.7x version. Installing database 
migration tool will set up a new 3.7x system on your machine.

Database transfer tool requires double disk space to convert database,
one for new database and another for temporary convert script.


=======================================================================
3. Installation Instructions
=======================================================================

The DBMaker setup program allows you to choose whether to install 
database migration tool.

Windows

    1. Start your computer and insert the DBMaker compact disc in your
       CD-ROM drive. Choose install database migration tool.

    2. Click Install Database migration tool and follow the setup 
       instructions on the screen.
       
Unix

    1. Start your computer and insert the DBMaker compact disc in your 
       CD-ROM drive.

    2. Login in dbmaker account.

    3. Change your working directory to the Unix version directory on 
       your CD-ROM drive. For example, /mnt/cdrom/Unix/Linux2.x86
       directory.

    4. Execute the database migration tool setup program nand follow 
       the setup instructions on the screen.


=======================================================================
4. Operation Flow
=======================================================================

Please follow the instructions below.

1. Prepare for database migration
 
   You must follow the notice items such as shut down database, back 
   up your database, and reserve enough disk space. The detail notice 
   items are described in section 5 of this document.

2. Provide the following migration information

  a. DBMaker 3.x database source name

  b. password of SYSADM

  c. Unload script file directory
     This is used to put all the temporary script and log file 
     from unload 3.x database.

  d. Option to check whether to remove unload script files
     When this option is set, the script files will be removed after 
     finishing migration.

  e. Whether schema and user names are case insensitive
     In DBMaker 4.0, the default setting for schema and user name is 
     case insensitive. Suggest to keep this option if no schema or 
     user name is case sensitive. Nevertheless, if there are two 
     tables have conflict case-insensitive names such 'DEPT' and 
     'Dept', you should uncheck this option. Note that the case
     sensitive option can not be changed after creating database. 

3. Unload DBMaker 3.x database to temporary script files

   Migration tool uses DBMaker 3.74 (or later 3.7x version) to start 
   database, and unload all database schema and data into the 
   temporary script files. If any error happens while unloading 
   database, migration tool will stop migration and store error 
   messages into the log file named {DBNAME}_unldscr_unload.log. 
   You can click "View Log" button to viewd the log file if migration 
   tool runs on Microsoft windows. Note that the database files will 
   be removed after successfully unload the database.

4. Load database to DBMaker 4.0 

   Migration tool uses DBMaker 4.0 system to create a new database,
   and load data from temporary script. The new database files locate
   at the same position of 3.x database. While migration tool hits 
   serious errors during loading data, it will stop loading and store 
   failure message. But the normal errors will just be recorded in 
   log file but without stoping migration tool. The log file is named
   {DBNAME}_unldscr_load. You can click "View Log" button to read 
   the log file if the migration tool runs on Microsoft windows.



=======================================================================
5. Notice items
=======================================================================

Before migrating your database, you must verify the following issues.

1. You should make sure there are enough extra free space before doing 
   migration. Since the temporary unload script files require disk 
   space near by 3.x database size, the suggested disk space
   is double database size. The database size including the storage
   file objects.

2. Since the files of 3.x database will be overwritten by 4.0 database,
   please backup the whole database and all the file objects in 
   DB_FODIR by JServer manager before doing migration. If any failure
   happen in migration, you can use the backup to restore your
   3.x database.

3. DBMaker 4.0 has made a new reserved word list for identifier name.
   To avoid any problem occur during migration, the migration tool 
   will add 'DB_RESWD=0' in dmconfig.ini. You can check SQL manual 
   to check the reserved word list. If your database does not 
   have any schema object named in the reserved word list, please 
   remove the 'DB_RESWD=0' in dmconfig.ini after migration.

4. DBMaker 4.0 may take a bit more storage than DBMaker 3.x database.
   If your database uses fixed size tablespace, please check whether 
   tablespace still have a few free pages for extension. Otherwise,
   you may get "not enough space to insert object" error during 
   migration. To avoid this problem, please set tablespace to 
   autoextend by 'alter tablespace' command.

5. If migration tool gets table, view or other schema object already 
   exists error in loading data phase, it should be caused by 
   identifier name case sensitive setting. Please turn on the case 
   sensitive option in migration tool. 

6. If migration tool gets error "cannot create/open a file: 
   {file name}" during unload database, it could be caused by the 
   problem of user's file object does not exist. Please remove the
   incorrect file object links before migration. You can set the file
   object column to null such as the following exampe.

     update my_table set file_col = null 
                     where fileexist(file_col) = 0;

7. If your database has more than hundreds of tables, and uses default 
   DB_SCASZ (system control area memory size), then migration may get 
   "out of DCCA memory" error while unloading database. Please enlarge 
   DB_SCASZ if you get this error.

8. In DBMaker 4.0, some DBMaker 3.x add-on functions and stored 
   procedures are changed to built-in. If your database contains these 
   add-on functions and procedures, migration tool will get "unique 
   violation" error in the log file. You can ignore this error message. 

9. If you have used database replication in this database, please
   change the primary database start mode to normal 'DB_SMODE=2',
   and migrate the master database to 4.0. And then, rebuild the
   database replication based on DBMaker 4.0 system.

10. In stored procedure source file, if one comment contains procedure 
   name but placed before the statement "exec sql create procedure", 
   this stored procedure can be unloaded but maybe fail in migration 
   the stored procedure's owner is not SYSADM.

   For example:

     one SP file : test.ec
     =======================================================
     /***************************
      *  module : test.ec
      ***************************/
     exec sql create procedure test returns status;
     {
     ...
     }
     =======================================================

  If you found this error, please drop and recreate these stored 
  procedures in DBMaker 4.0 database.


