Migration
This section explains the procedures and methods for migrating from other DBMS to Tibero.
Pre-Migration Considerations
This section explains the checklist items to review before migrating from Oracle to Tibero DB.
The pre-migration check is an important step for understanding the features of other DBMS and verifying the values that need to be applied to Tibero.
Note that the SQL statements explained in this section (queries executable in 10g and 11g) may vary slightly depending on the Oracle version.
1) General
Log in as a user with DBA privileges, such as Oracle's sys or system, to verify the information below.
Version Information
For Oracle versions 9i, 10g, and 11g, there are many migration cases, but versions outside of these require further review.
Migration Character Set
Select the Tibero character set that corresponds to the character set currently used in Oracle.
Migration Users
Exclude default users that are automatically created when Oracle is installed. Client confirmation is required for the migration users.
Migration Size
Factors that have the greatest impact on conversion time.
In addition, the client's conversion time may vary greatly depending on DISK I/O, NETWORK I/O, etc.
Migration Validation
Information used for comparison after the migration is completed.
Version Information
Check the version of Oracle migrated.
Migration Character Set
Use the corresponding character set between Oracle and Tibero
Select Migration User (Schemas)
Log in with a user account that has DBA access to Oracle's 'sys' or 'system,' and perform the query.
Retrieve users
The following is the list of all users.
Retrieve open users
The following is a query to retrieve the currently open users.
Oracle Default Users
The following usernames are automatically created when Oracle is installed and should be excluded during migration. (Usernames may vary slightly depending on the Oracle version.)
ANONYMOUS
Enables HTTP access to Oracle XML DB.
APEX_050100
The account that owns the Oracle Application Express schema and metadata.
APEX_PUBLIC_USER
The minimally privileged account used for Oracle Application Express configuration with Oracle Application Express Listener or Oracle HTTP Server and mod_plsql.
APPQOSSYS
Used for storing and managing all data and metadata required by Oracle Quality of Service Management.
AUDSYS
The account where the unified audit data trail resides.
AURORA$ORB$UNAUTHENTICATED
Used for users who do not authenticate in Aurora/ORB
AWR_STAGE
Used to load data into the AWR from a dump file
CSMIG
User for Database Character Set Migration Utility
CTXSYS
The Oracle Text account.
DBSFWUSER
The account used to run the DBMS_SFW_ACL_ADMIN package.
DBSNMP
The account used by the Management Agent component of Oracle Enterprise Manager to monitor and manage the database.
DEMO
User for Oracle Data Browser Demonstration (last version 9.2)
DIP
The account used by the Directory Integration Platform (DIP) to synchronize the changes in Oracle Internet Directory with the applications in the database.
DMSYS
Data Mining user
DSSYS
Oracle Dynamic Services and Syndication Server
DVF
The account owned by Database Vault that contains public functions to retrieve the Database Vault Factor values.
DVSYS
There are two roles associated with this account. The Database Vault owner role manages the Database Vault roles and configurations. The Database Vault Account Manager is used to manage database user accounts. Note: Part of Oracle Database Vault user interface text is stored in database tables in the DVSYS schema. By default, only the English language is loaded into these tables. You can use the DVSYS. DBMS_MACADM.ADD_NLS_DATA procedure to add other languages to Oracle Database Vault.
EXFSYS
User to hold the dictionary, APIs for the Expression Filter
FLOWS_FILES
The account owns the Oracle Application Express uploaded files.
GGSYS
The internal account used by Oracle GoldenGate. It should not be unlocked or used for a database login.
GSMADMIN_INTERNAL
The internal account that owns the Global Data Services schema. It should not be unlocked or used for a database login.
GSMCATUSER
The account used by Global Service Manager to connect to the Global Data Services catalog.
GSMUSER
The account used by Global Service Manager to connect to the database.
HR (Human Resources)
OE (Order Entry)
SH (Sales History)
Training/ demonstration users containing the popular EMPLOYEES and DEPARTMENTS tables
LBACSYS
The Oracle Label Security administrator account. Starting with Oracle Database 18c, the LBACSYS user account is created as a schema-only account.
MDDATA
The schema used by Oracle Spatial and Graph for storing geocoder and router data.
MDSYS
The Oracle Spatial and Graph administrator account.
ORACLE_OCM
This account contains the instrumentation for configuration collection used by the Oracle Configuration Manager.
ORDPLUGINS
Object Relational Data (ORD) User used by Time Series, etc.
ORDSYS
Object Relational Data (ORD) User used by Time Series, etc.
OUTLN
The account that supports plan stability. Plan stability enables you to maintain the same execution plans for the same SQL statements. OUTLN acts as a role to centrally manage metadata associated with stored outlines.
PERFSTAT
Oracle Statistics Package (STATSPACK) that supersedes UTLBSTAT/UTLESTAT
REMOTE_SCHEDULER_AGENT
The account to disable remote jobs on a database. This account is created during the remote scheduler agent configuration. You can disable the capability of a database to run remote jobs by dropping this user.
SCOTT
ADAMS
JONES
CLARK
BLAKE
Training/ demonstration users containing the popular EMP and DEPT tables
SYS
The account used to perform database administration tasks.
SYS$UMF
The account used to administer Remote Management Framework, including the remote Automatic Workload Repository (AWR).
SYSBACKUP
The account used to perform backup and recovery tasks.
SYSDG
The account used to administer and monitor Oracle Data Guard.
SYSKM
The account used to perform encryption key management.
SYSRAC
The account used to administer Oracle Real Application Clusters (RAC).
SYSTEM
Another account used to perform database administration tasks.
TRACESVR
Oracle Trace server
TSMSYS
User for Transparent Session Migration (TSM) a Grid feature
WMSYS
The account used to store the metadata information for Oracle Workspace Manager.
XDB
The account used for storing Oracle XML DB data and metadata.
XS$NULL
The internal account that represents the absence of a database schema user in a session, and indicates an application user session is in use. XS$NULL cannot be authenticated to a database, nor can it own any database schema objects, or possess any database privileges.
Source: Database Installation Guide
Migration size
Only check the tablespaces where the tables and indexes of the users targeted for migration are stored. The example below shows how to check the entire tablespace.
Check Total Tablespace Size and Usage
Total
Migration Validation Items
Only check the information related to the users targeted for migration.
Check Object count by status
The dba_objects view includes even deleted objects (in $BIN~ format), so for an accurate count, it is recommended to check views like dba_tables and dba_indexes.
Requesting the client’s DB administrator to clean up any INVALID objects can reduce migration time.
Check Object count
Used for Comparing the object count between Oracle and Tibero after the migration is used for validation.
Check Constraint count
2) DB Creation-Related Items
Log in as a user with DBA privileges, such as Oracle's sys or system, to check the information below. When executing CREATE DATABASE command during Tibero installation, refer to the information below to create the database.
The following is an explanation of the items related to database creation.
Character Set
Select the character set that corresponds to Oracle.
Initial Parameters
Check the session count, memory settings, etc.
Redo Configuration
Check the number or size of groups and members.
Undo and Temp Configuration
Check the size of the Undo and Temp tablespaces.
Log Mode
As this is not supported in Tibero, consider changing to a general index.
Character Set
Check the character set information.
Oracle
Tibero
The following provides an explanation of the items verified.
NLS_CHARACTERSET
DB Character Set
NLS_NCHAR_CHARACTERSET
National Character Set
The following is the character set mapping information between Oracle and Tibero.
US7ASCII
ASCII
KO16KSC5601
EUCKR or MSWIN949
KO16MSWIN949
MSWIN949
UTF8, AL32UTF8
UTF8
JA16SJIS[TILDE]
JA16SJIS[TILDE]
JA16EUC[TILDE]
JA16EUC[TILDE]
ZHS16GBK
GBK
VN8VN3
VN8VN3
If the US7ASCII character set contains Korean characters, you may choose to use MSWIN949, depending on the purpose. However, adjustments may be needed for encoding and decoding on the application.
When changing from KO16KSC5601, KO16MSWIN949, and JA16SJIS to UTF8 or AL32UTF8, the column size of the relevant tables should be increased by 1.5 to 2 times before performing data migration.
National Character set
UTF8
UTF8
AL16UTF16(Default value)
UTF16(Default value)
If Oracle's national character set is UTF8 and Tibero's is UTF16, characters of the related type may become corrupted during migration, so matching settings are necessary.
Initial Parameters
Check the initial parameter information
The following are initial parameters that need to be verified when migrating from Oracle.
SESSIONS
Set the number of sessions
OPEN_CURSORS
The number of cursors that can be opened per session.
UNDO_RETENTION
Set the undo retention time.
SGA_MAX_SIZE
Check the total available SGA size.
SGA_TARGET
Set the target size of the SGA
PGA_AGGREGATE_TARGET
Check the total available PGA size
MEMORY_TARGET
Set the total available memory size (for Oracle 11g)
To check the size of memory-related SGA subcomponents, query "V$SGA."
Redo Log Configuration
When creating redo logs in Tibero, refer to this information and create files of the same or larger size.
The following is an example of checking redo logs.
Undo and Temp Configuration
When creating Undo and Temp in Tibero, refer to this information and create files of the same or larger size.
The following is an example of checking the Undo tablespace.
The following is an example of checking the Temp tablespace.
Log mode
The following is an example of checking the log mode.
If it is in ARCHIVE LOG mode, change the mode after the migration is complete to reduce migration time.
3) Check additional Objects
The following is an explanation of additional objects that need to be checked.
DB Link
Check the DB Link information for the migration user and identify the type of DB containing the data.
tnsnames.ora
Check the host information used for the DB Link.
Job
Check if there are any jobs for the migration user or the entire system, and if migrating, ensure that they do not change the data during execution.
Cluster Object
Consider converting to a regular table format, as Tibero does not support cluster objects.
XML Type
Change sys.xmltype in the column definitions of table creation statements to xmltype.
BitMap Index
Consider converting to a regular index, as this is not supported in Tibero.
Check DB Link
Check tnsnames.ora file
Check Job
Check Cluster Object
Check XML Type
Check BitMap Index
2. Migration
This section explains the methods for executing the actual migration. The following is the migration process.
1) Pre-Migration Preparation
2) Extraction of migration DDL Scripts
3) Adjustment of migration DDL Scripts
4) Migration
5) Migration validation
Refer to the content of each section for detailed explanations of each process.
1) Pre-Migration Preparation
The following is the standard order for creating objects during migration.
Steps 4 through 8 may need to be adjusted based on the dependencies of the client’s objects to suit their specific requirements.
1
Tablespace
-
2
User
-
3
Table
-
4
Synonym
It’s not an issue if the source object doesn’t exist at the time of creation, but it’s recommended to create it first, as it will automatically become VALID when queried later.
5
View
Errors may occur due to dependencies.
6
Sequence
-
7
Data Migration
8
psm(=pl/sql)
Use tools such as T-UP or Table Migrator to migrate the data.
9
Index
This applies to packages, procedures, and functions, where errors may also occur due to dependencies.
10
Constraint
-
11
Trigger
-
12
Grant
-
13
Other (C, Java external procedure, Job , etc.)
-
2) Extract Migration DDL Scripts
Use the T-UP DDL export feature to extract Oracle DDL statements.
Other tools that can extract scripts may also be used.
Extract DDL Scripts for Key Objects of the Database
Extract the DDL statements for tablespace, user, and table.
(1) T-UP > Migrator
Select “Migrator”
[Figure 9] Migrator of T-up
(2) Source Database > Type Conversion
Select Data Types Corresponding to ORACLE
[Figure 10] Type Conversion
(3) Schema Object
Select “Independent Objects” Tablespace and User.
Select “Dependent Objects” Table.
Select “Schema” Table.
[Figure 11] Schema Objection
(4) Migration Option
Deactivate “Data Transfer” and “DDL Execution”.
Select “Export DDL Script”, Specify “Filename” and “Path”.
If you want to separate files by schema, select “Create Individual DDL Script” Files.
[Figure 12] Migration Option
(5) Target Database > Summary
Check the export target.
[Figure 13] Summary
(6) Data Migration
Execute “Migrate“.
[Figure 14] Data Migration
(7) Result > “close”
“In the "Result" stage, execution information is displayed, and DDL export information is not shown.
[Figure 15] Result
(8) Check file
Check that the DDL statements were generated correctly.
[Figure 16] Check file
Extract DDL Scripts for Other Database Objects
Extract the remaining objects (DDL) except for Tablespace, User, and Table.
(1) T-UP > Migrator
Select “Migrator”.
[Figure 17] Select Migrator
(2) Source Database > Type Conversion
Select data types corresponding to ORACLE . The table is not included and is therefore not relevant to your selection.
[Figure 18] Type Conversion
(3) Schema Object
Select “Dependent Objects” for extraction objects.
Select “Schema” Table to include tables for selection and dependency.
[Figure 19] Schema Objection
(4) Migration Option
Deactivate “Data Transfer and “DDL Execution”.
Select “Export DDL Script”, Specify “Filename” and “Path”.
If you want to separate files by schema and object, select “Create Individual DDL Script” Files.
[Figure 20] Migration Option
(5) Target Database > Summary
Check the extraction target.
[Figure 21] Summary
(6) Data Migration
Execute “Migrate“.
[Figure 22] Data Migration
(7) Result > “close”
In the “Result” stage, execution information is displayed, and DDL export information is not shown.
[Figure 23] Result
(8) Check file
Check that the DDL statements were generated correctly.
[Figure 24] Check file
3) Adjust Migration DDL Scripts
Organize and modify the extracted script so that it can be executed in Tibero.
DDL Scripts for Key Objects in the Database
Adjust Tablespace, User, Table DDL Scripts The filename for the tablespace, user, and table script is export_ddl.sql.
Tablespace DDL When Tibero DB is created, system, undo, and default temp tablespaces already exist, so don’t need to be created. But, temp tablespaces other than the default temp tablespaces must be migrated. (e.g., TEMP1) Exclude Oracle-specific tablespaces (e.g., SYSAUX) Modify the path, filename, or size of the data file as needed. Comment out items that are not supported in Tibero.
The following explains the items to be commented out in the tablespace script.
Item
Description
BLOCKSIZE 4K
Since Tibero does not specify a block size for each tablespace, it should be commented out. This is fixed when the database is created through initialization parameters, and it is generally set to 8KB.
SEGMENT SPACE MANAGEMENT MANUAL
Since Tibero only supports the AUTO setting, the MANUAL setting should be changed to AUTO.
FLASHBACK ON
Since Tibero supports flashback feature in full mode through parameters, this should be commented out.
TABLESPACE GROUP
Since TABLESPACE GROUP is not supported, it should be commented out. Consider splitting multiple data files within a single tablespace.
User DDL Check the passwords for each user. (Contact the Oracle DB administrator.) User passwords are set to the default "tibero." This applies only to users targeted for migration. Users that are automatically created during Oracle installation do not need to be migrated. Comment out any items that are unsupported in Tibero.
Item
Description
GRANT UNLIMITED TABLESPACE TO USER_NAME
Tibero uses UNLIMITED by default, and this syntax is not supported, so it should be commented out.
ALTER USER USERNAME QUOTA UNLIMITED ON USERNAME
Since the per-user QUOTA feature is not supported, it should be commented out.
Table DDL Due to the character set migration from Oracle, an Active Value error may occur.
If an error occurs in the column type, refer to "Oracle" on Data Types.
DDL Scripts for Other Database Objects
Adjust DDL Scripts for Objects other than Tablespace, User, and Table The extracted filename is export_other_ddl.sql.
List of Other Objects
Index View
Constraint
Sequence Synonym
Materialized View
Library
Function
Procedure Package
Type
Trigger
Object Privilege
Job
DBMS_SCHEDULER
External Procedure
Since it is not included in the DDL for other objects, refer to Oracle to create it
4) Migration
DDL Scripts for Major Database Objects
(1) Upload the export_ddl.sql file to the Tibero database server.
If an error occurs in the column type, refer to "Oracle" on Data Types.
(2) Execute export_ddl.sql.
Data magration
During the data migration process, various tools are used to perform the migration.
T-UP
Execute migration from the client PC using T-UP.
Oracle → T-UP(Client PC) → Tibero
Table Migrator
Execute migration in Tibero using Table Migrator.
Oracle → Tibero
DB Link
Execute migration from Tibero to Oracle using Oracle DB Link.
Oracle → Tibero
For more information about using each tool, refer to the manual for each tool.
DDL Scripts for Other Database Objects
1) Upload the export_other_ddl.sql file to the Tibero database server.
If there are many users or if the migration needs to be performed repeatedly, it is recommended to create a shell (or batch) script for the process.
When performing repeated migrations, clearly organize dependencies and exceptions during the first migration to ensure that errors do not occur during the second or third migrations by including preparatory steps in the script.
Use a shell program to automatically create objects, and verify the process as follows.
After all users have been created, compare the object count with Oracle to ensure nothing is missing.
If any objects were not created successfully, identify and resolve the issue, then manually create the objects and proceed to the next step.
2) Execute export_other_ddl.sql.
Synoym It is not a problem to creat it even though the original object referenced by a synonym does not exist. After the original object is created, it will automatically be VALID when used.
View When creating views, errors may occur due to dependencies or object permissions. Even if compilation errors occur during the initial creation, proceed to create all objects first, then refer to "Object Status Change" to validate the objects.
The following is an example of checking dependencies.
Sequence To prevent any changes to Oracle’s current values during the final migration, quit the application before proceeding.
PSM(=PL/SQL) Consider the following points when creating PSM: - Errors may occur due to dependencies or object permissions. Even if compilation errors occur initially, complete the creation of all objects first, then refer to "Object Status Change" to validate the objects. - The error "TBR-8053: Not authorized" may occur if there is no permission for the relevant object. In this case, grant the necessary permissions and recreate the object. - Errors might occur within queries in PSM. For details, refer to "Application Query Modifications" to make the required changes. - Since Tibero does not support object types, bypass this by declaring the type within a package.
The following is to create object type by bypassing it with the type in the package.
Oracle
Tibero
Index
The following explains the comparison of index counts between Oracle and Tibero after index creation.
Situation
Description
Fewer Indexes in Tibero
Consider that indexes may be automatically created when constraints are generated. Compare after all constraints are created.
More Indexes in Tibero
Check whether the additional indexes were automatically created for LOB columns within tables. (This automatic creation also occurs in Oracle 11g r2, but may not happen in earlier versions of Oracle.)
Constraint Compare with the items checked in "Constraint Count Check" from "Migration Validation".
Trigger When migrating a disabled trigger from Oracle, a syntax error may occur, so process it as follows: - Comment out the disable syntax. - Apply the disable setting in Tibero
Grant The following are unsupported Grant items in Tibero, which should be excluded when calculating the Grant count.
Item
Description
COMMIT REFRESH
When creating an Mview, it is supported as a creation syntax and not as a privilege.
QUERY REWRITE
When creating an Mview, it is supported as a creation syntax and not as a privilege.
DEBUG
It is a PL/SQL DEBUGGING privilege currently, but not supported in Tibero.
FLASHBACK
This is supported in the form of parameters, but not as a privilege.
If the above privileges are granted along with regular privileges,, not all permissions will be granted, so it is necessary to find and delete unsupported privileges and then re-execute.
Others Refer to Oracle to create other items such as external procedures and jobs.
Object Status Change
Due to dependencies and object permissions, an object's status may be INVALID at the time of creation. Process this as follows:
(1) Check Object
Check the count by status
Check INVALID Object
(2) Execute recompile
Log in with the 'sys' account and recompile the invalid objects in a specific schema as shown below.
(3) Recompile and Check for Errors by Object Log in as the relevant user, recompile each object, and check for any errors.
Recompile View
Recompile PSM(=PL/SQL)
Check PSM(=PL/SQL) error
Recompile Index
5) Migration validation
After the migration is complete, the main items to check in the database side are the number of objects and data validation.
Object count
Table
View
Synonym
Sequence
Package
Package Body
Function
Procedure
Index
Constraint
Grant
Trigger
Data Validation
Oracle DB Link
Count Comparison
Comparison of Minus Results
T-UP Data Transfer Verification
(1) T-UP > Migrator
Select “Migrator”
[Figure 25] Migrator of T-up
(2) Source Database > Type Conversion
Select Data Types Corresponding to Oracle.
[Figure 26] Type Conversion
(3) Schema Object
Select “Dependent Objects” Table.
Select Schemas and Tables to migrate in "Schemas".
[Figure 27] Schema Objection
(4) Migration Option
Activate “Data Transfer”
Select “Verification”
[Figure 28] Migration Option
(5) Target Database > Summary
Check corresponding schemas and tables between Source and Target.
[Figure 29] Summary
(6) Data Migration
Execute “Migrate“.
[Figure 30] Data Migration
(7) Result
Type: Check success rate for designated tables in data.
[Figure 31.1] Result
Type: Click on "Data" to view verification results.
[Figure 31.2] Result
3. Application Migration
After completing the database migration, proceed with the application migration. This may require significant modifications to interfaces and application queries.
1) Interface Modification
JDBC Copy tibero6-jdbc.jar driver to the Application's driver management folder in $TB_HOME/client/lib/jar folder.
Oracle
Tibero
ODBC
Install Tibero ODBC.
Oracle
Tibero
OLE DB
Install Tibero OLE DB.
Oracle
Tibero
2) Application Query Modifications
Application query modification is done when necessary, typically in the following situations:
Case 1. When a Syntax Error occurs
1
When writing an SQL statement, if you execute a join or similar operation without assigning an alias to the table or subquery clause in the from clause, a syntax error will occur if duplicate columns exist.
Assign alias to avoid duplication.
2
When using a query like UNION ALL to view results, a syntax error will occur if the main query has a specific column as a number type and a subquery as a varchar type.
Use the same data type in the same column clause.
3
A syntax error will occur in PSM (PL/SQL) if variables with the same name are declared within the same scope.
Use the variable name from the final declaration and delete earlier declarations of variables with the same name.
Case 2. When the results are not displayed in a sorted order
1
In Oracle, results may be displayed in sorted form even without an ORDER BY clause, whereas in Tibero, the results may not. However, in the case of queries to check only some values by forcibly applying indexes, etc. to a large table, Tibero will sort and output them without using order by clause.
If you need sorted results, be sure to apply ORDER BY.
Case 3. When an error occurs when compiling after writing PSM (PL/SQL)
1
When compiling after writing PSM (PL/SQL), Tibero checks whether the columns, etc., for objects in the internal SQL statements actually exist. If they are not valid, Tibero will throw an error. In contrast, Oracle may still successfully compile in such situations, but a runtime error may occur later.
Use actual existing objects and correct column names.
Last updated