Chapter 2. tbMigrator 2.0

Table of Contents

2.1. Overview
2.2. Screen Layout
2.2.1. Main Screen
2.2.2. Option Screen
2.2.3. Progress Screen
2.2.4. Report Screen
2.3. Target Object
2.4. Access User Permission
2.5. Operation Example

This chapter describes the tbMigrator 2.0 utility and its usage.

2.1. Overview

tbMigrator 2.0 is a migration utility provided by Tibero.

This utility helps to migrate all or part of other databases to Tibero

The following shows the functions which tbMigrator 2.0 utility supports.

  • Migrates data and application programs to Tibero.

  • Migrates schema objects (tables, indexes, views, synonyms, etc.) and the constraints defined in a table.

  • Migrates user privileges and roles.

  • Provides the information about the migration target database.

  • An option button is provided to allow users to migrate a database in a variety of ways.

  • Allows users to view the migration process in the progress check dialog.

Note

tbMigrator 2.0 is written in Java, and available for Java 6 and above. In the script, add the path of the JDBC driver file of the DB to the classpath configuration before executing the script.

2.2. Screen Layout

The tbMigrator 2.0 screen consists of four layout components; the Main screen, Option screen, Progress screen, and Report screen.

2.2.1. Main Screen

The Main screen is explained in this section.

[Figure 2.1] Main Screen

Main Screen


  • Source

    • Source Access Information

      The following table includes the items that can be specified in the Source Access Information section.

      ItemDescription
      AddressIP address of the source database.
      PortPort number of the source database.
      SIDSID of the source database.
      User IDUser ID of the source database.
      PasswordPassword of the source database.
      DB TypeType of the source database.
      PropertiesAdditional access information about the source database.
    • Source Database View

      Source Database View allows users to select data and the character set of the database. Users can select data in the following three ways.

      • Full Mode

        When a database name is selected, its subordinate schemas are all selected. When any of the schemas are unselected, the selection view is changed from Full Mode into Schema Mode.

        [Figure 2.2] Full Mode

        Full Mode

      • Schema Mode

        When a schema name is selected, its subordinate tables are all selected. When any of the tables are unselected, the selection view is changed from Schema Mode into Table Mode.

        [Figure 2.3] Schema Mode

        Schema Mode

      • Table Mode

        A table can be selected. This is the minimum unit of migrating data available in tbMigrator.

        [Figure 2.4] Table Mode

        Table Mode

      The following characters are representable in Tibero database character sets.

      • Char Set

      • NChar Set

  • Tibero

    • Tibero Access Information

      The following information is set to access the Tibero database.

      ItemDescription
      AddressIP address of Tibero database.
      PortPort number of Tibero database.
      SIDSID of Tibero database.
      User IDUser ID of Tibero database.
      PasswordPassword of Tibero database.
      DB VersionVersion of Tibero database.
    • Tibero Database View

      Shows the data search function and character sets available in Tibero

  • Button

    The buttons that can be selected on the Main screen are shown in the table below:

    ButtonDescription
    [Connect]Access to the target database.
    [Option]Brings up the Option Dialog.
    [Run]Starts a migration.
    [Close]Closes tbMigrator.

Selecting a Source Database

A source database can be specified in the Source Access Information section of the Main screen. The items that can be specified for each database are shown below:

  • Oracle

    • Source Access Information in the Main screen

      Connect As must be specified. Click the [Properties] button to bring up a dialog that shows three options: NORMAL, SYSDBA, and SYSOPER. The default value is NORMAL.

      Note

      If SYSDBA or SYSOPER is selected, the Oracle configuration may prevent remote logins. In this situation, add the REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE configuration. For more information about the configuration, refer to relevant Oracle documentation.

    • Data Conversion Option in the Option screen

      In the Option screen, the Type Conversion Table can be used to set the column type conversion options.

      LONG and LONG RAW column are not recommended in Oracle 8.x (and later), but they are supported only for the compatibility with Oracle 7.x (and earlier). This option allows a user to select whether to change the column type into CLOB or BLOB (from LONG and LONG RWA), or maintain the original data type.

  • Tibero

    When data migration is performed between Tibero databases, users can use the same JDBC drivers for source and target database connection. The JDBC driver included in tbMigrator must be compatible with both source and target database, and it is recommended that the latest version of JDBC is used.

  • Sybase Adaptive Server Enterprise

    The following is a feature comparison between Sybase Adaptive Server Enterprise (ASE) 15 and Tibero.

    Sybase ASETiberoMigrationRemarks
    UserSchemaTibero database schema contains DB schema and DB user.
    SegmentSegmentASE does not have tablespaces so each object is directly stored in a segment. To migrate tablespaces, users should create tablespaces corresponding to each segment and assign objects to each tablespace.
    Tablespace
    RoleRole 
    TableTableUSER TABLEs are migrated.
    ViewView● (partly)Views are migrated using DDLs that are created with sp_helptext. Provided in ASE. However, the syntax is not fully compatible.
    IndexIndex● (partly)Table indexes are migrated except for the Function based Index.
    RuleConstraintPrimary Key, Unique, Not Null, Check, and Referential constraints can be migrated.
    System ProtectSystem Privilege● (partly)System Protect and Privilege can be migrated only when they use the same name on a single item.
    Object Privilege
    Transaction SQLPSM● (partly)Data is migrated using DDLs that are created with sp_helptext. Provided in ASE. However, the syntax is not fully compatible.
    SQL Procedure
    Scalar Function
  • Informix

    • Properties of Source Access Information in the Main screen

      Enter the name of the Informix server. Clicking the [Properties] button will bring up the dialog box which allows user to enter the name of the Informix server.

2.2.2. Option Screen

This section describes the items that can be specified in the Options screen.

[Figure 2.5] Option Screen

Option Screen


  • DDL

    In the first migration step, DDL is used to create Tibero database objects. This step configures DDL related options such as the type of schema objects to have their DDL extracted and whether to execute the generated DDL statements.

    • Type Selection

      Selects the schema object type to be migrated.

      ItemDescription
      Migrates All ObjectsExtracts DDL statements in all supported types.
      Migrates Objects by TypeExtracts DDL statements in only the selected object types.

      Click the [...] button to open the object selection dialog.

      [Figure 2.6] Object Type Selection

      Object Type Selection


    • Execute DDLs

      Determines whether to execute the extracted DDL statements on the target database. If the objects of tables to be migrated are already created, uncheck this option to skip the step of executing generated SQL statements.

  • Data Transfer

    The data transfer methods that can be specified in the DDL Option dialog are shown in the table below.

    OptionDescription
    Transfer Table DataSelect if table data is migrated.
    Use Direct Path Load

    Data in the table is migrated using Direct Path Loading method.

    If a DPL handle fails to be created, the data is migrated in CPL mode.

    Use Batch InsertData in the table is migrated using Batch Insert method.
    Concurrent ThreadSpecifies the number of threads used to migrate data in multiple tables at the same time.
  • Conversion

    The data conversion options that can be specified in the DDL Option dialog are as shown in the table below.

    OptionDescription
    Read as BytesIf the value entered in a column is not of CHAR, VARCHAR (the data type specified for this column), the character string may appear broken in the target database. To avoid this, data is migrated to Tibero database in binary format.
    Real Characterset

    This option allows a user to correct the characters sets improperly specified for any object, other than tables. To prevent these character sets from appearing broken in the target database after migration.

    This option is valid only when Read as Bytes is enabled. The application objects are PSM DDL, comments on tables, and comments on columns.

    Double Character Column Size

    If the character sets of the source database and the Tibero database are different, the length of the converted data string becomes different from that of the source data. If the length of the migrated data exceeds the limit on text size in the column, migration may fail. To avoid this, the option allows a user to change the data in the source database to twice the size.

    Type Conversion TableColumn types of the source database and the Tibero database may not match completely. This option ensures compatibility between the databases. The options vary depending on the source database type.
  • Verification

    The data verification options that can be specified in the DDL Option dialog are as shown in the table below.

    OptionDescription
    Verify Table Data

    Allows user to check if the tables are successfully migrated.

    All data of the source database and Tibero database are read, and a one-to-one comparison is performed. High volumes of data may take a longer time to process.

2.2.3. Progress Screen

A Progress screen shows the progress of the migration.

[Figure 2.7] Progress Screen

Progress Screen


  • Search Information

    ItemDescription
    Current Schema

    The information of the schema currently being migrated.

    Displays the amount of the schema that has been migrated, out of the total to migrate.

    Current Stage

    The current stage of the schema currently being migrated.

    Shows the data type of the schema to migrate.

    Stage Progress

    The information about the data currently being migrated.

    Displays the amount of data that has been migrated, out of the total to migrate.

    Created ObjectsThe number of created objects.
    ErrorsThe number of generated errors.
    Data Migrator #Information about the threads processing the table data. The name of the table being migrated and the progress rate of the table migration are shown. The thread count is determined by the value specified in Concurrent Threads option in the Option Screen.
  • Button

    ItemDescription
    [Show Report]Shows the migration results. For more information, refer to “2.2.4. Report Screen”.
    [OK]This button is inactive while data is being migrated. When the migration has finished, the button will become activated. The entire migration process is completed when this button is clicked.
    [Cancel]Cancels the migration. When the migration has finished, the button will become inactivated.

2.2.4. Report Screen

The Report screen shows the result of the migration.

[Figure 2.8] Report Screen

Report Screen


2.3. Target Object

The migration methods that tbMigrator 2.0 utility supports are Full Mode, Schema Mode, and Table Mode. Each mode supports different ranges to migrate objects.

  • Full Mode

    When Full Mode is selected, all the objects within the database are migrated.

  • Schema Mode

    When migrating only schemas, select Schema Mode. Selected schemas, objects of a schema, and related objects are migrated.

  • Table Mode

    When Table Mode is selected, not only the table but also the objects associated with the table's related schema are also migrated.

The objects to be migrated in each mode are as shown in the table below.

ItemFull ModeSchema ModeTable Mode
TABLESPACE
ROLE
SCHEMA
SYSTEM PRIVILEGE
PUBLIC SYNONYM
SEQUENCE
TABLE
INDEX
CONSTRAINT
SYNONYM
MATERIALIZED VIEW
VIEW
REFERENTIAL CONSTRAINT
PSM
OBJECT PRIVILEGE

The passwords of new users created in the target database are initialized, the default value is 'tibero'.

When index Organized Tables (IOT) exist in the source database, they are separately migrated as general tables and indexes. The grantor of the object privilege will be converted to the login user or the owner of the object.

# Login as a DBA 
create user owuser identified by tibero;
grant resource, connect to owuser;
create user gtuser1 identified by tibero;
grant resource, connect to gtuser1;
create user gtuser2 identified by tibero;

# Login as owuser 
create table grantest1 ( c1 varchar2(20) );
grant select on grantest1 to gtuser1  with grant option;

# Login as gtuser1 
grant select on owuser.grantest1 to gtuser2;

2.4. Access User Permission

When accessing the source and target databases, the user must have the permissions required for migration. It is recommended to login as a user with DBA permissions. Required permissions can differ depending on the database type and the object types selected from the Option screen.

For example, if migrating from Oracle in Full Mode, the user who accesses the source database must have the following permissions.

  • CONNECT

  • SELECT ANY TABLE

  • SELECT ANY DICTIONARY

  • ALTER SESSION

If the target database is Tiberothe user must have the following permissions.

  • CONNECT

  • SELECT ANY TABLE

  • RESOURCE

  • ALTER SESSION

2.5. Operation Example

This section describes the usage of tbMigrator 2.0.

  1. When you run the tbMigrator 2.0 utility, the main screen will appear as shown below.

    [Figure 2.9] Main Screen

    Main Screen

  2. Enter the user ID and user password of the source database and click the [Connect] button.

    [Figure 2.10] Migration - Source Database Access Information

    Migration - Source Database Access Information

  3. Enter the user ID and user password of the Tibero database and click the [Connect] button.

    [Figure 2.11] Migration - Target Database Access Information

    Migration - Target Database Access Information

  4. Click the [OPTION] button. When the Option Information settings have been entered, click the [OK] button.

    [Figure 2.12] Migration -The Setting of Migration Options

    Migration -The Setting of Migration Options

  5. If no object is selected in the Source Data View of the Main Screen, when the [Run] button is clicked, a waring message will appear.

    [Figure 2.13] Migration-Warning Message

    Migration-Warning Message

  6. Once a target object is selected, click the [Run] button. The migration will be performed.

    [Figure 2.14] Migration - Selecting Targets and Performing Migration

    Migration - Selecting Targets and Performing Migration

  7. A Progress dialog will appear to show the progress of the migration. Users can check the progress logs in the progress log area at the bottom of the dialog.

    [Figure 2.15] Migration- Checking Migration Progress

    Migration- Checking Migration Progress

  8. If the [Show Report] button is clicked during the migration or when the migration is completed, the Migration Report dialog will appear and show the migration details.

    [Figure 2.16] Migration - Migration Report Screen

    Migration - Migration Report Screen

  9. When the entire migration process is completed, the user will able to see the 'COMPLETE' message in the progress bar and can then click the [OK] button.

    [Figure 2.17] Migration - Migration Complete

    Migration - Migration Complete

  10. Once the migration has finished and the [OK] button is clicked, the Migration Complete dialog will appear. Click the [OK] button to continue.

    [Figure 2.18] Migration - Migration Complete Dialog

    Migration - Migration Complete Dialog