当前位置:网站首页>Best practices for Oracle kingbasees migration of Jincang database (2. Overview)

Best practices for Oracle kingbasees migration of Jincang database (2. Overview)

2022-07-27 20:48:00 Thousands of sails passed by the side of the sunken boat_

2.  summary

This chapter contains the following :

2.1. Oracle Overview of compatible features

Usually , The workload of heterogeneous database migration is heavy . These workloads mainly come from : In data type 、SQL Language 、PL/SQL Language 、 Even the client application programming interface and many other aspects of the two databases 、 A lot of syntax or functional alignment processing .

alike , from Oracle towards KingbasES The same is true of transplantation . To reduce the workload of migration ,KingbaseES In its internal implementation of a large number of Oracle Compatibility features . These features Grammatically or functionally correct Oracle Provides native support . therefore , In the process of transplantation ,Oracle With little or no change, the program can be used in KingbaseES Running in the environment .

Besides , For those without native support Oracle function ,KingbaseES The corresponding transplantation suggestions are also given .

2.1.1.  data type

Data type is a common means to describe the underlying information resource pattern of database system . Usually , The compatibility of the data types of the two database systems directly affects the difficulty of transplantation . therefore ,KingbaseES Yes Oracle The unique data types of provide comprehensive native support . These types are as follows Oracle Of NUMBERVARCHAR2CHAR(n) and DATE etc. . More Than This ,KingbaseES Yes Oracle PL/SQL The complex data types used in also provide compatibility support , These types are as follows Oracle Of RECORD type 、%TYPE attribute 、%ROWTYPE attribute 、 Associative array 、 Variable arrays and nested tables .

About interval The data type is currently V8.6 and Oracle There are some differences , Mainly in terms of precision and grammatical format . Accuracy ,V8.6 interval The default precision is 6 position ,Oracle The default precision is 9 position ; Grammatical format ,Oracle Supported Syntax V8.6 Basically supported . Therefore, there are some differences in accuracy in transplantation , from Oracle Migration to V8.6 Data may be truncated .

2.1.2. SQL sentence

stay KingbasES in , For most commonly used Oracle specific SQL Statements provide native support . This measure makes Oracle The application is KingbaseES Usually, the system can run normally with few code changes .

KingbaseES The main compatibility is as follows Oracle Of SQL sentence :

  • TRUNCATE sentence

  • Hierarchical query

  • DUAL False watch

  • SELECT INTO  Of FOR UPDATE sentence

  • UPDATE[ Prefix ] Multi column update

  • INSERT INTO TABLE([ Prefix ] Column )

  • DELETE [FROM] sentence

  • Support WITH Clause

  • Support DBLINK

  • Support CREATE FORCE VIEW

  • Support SEQUENCE Access clause

These are SQL Statements are implemented from the syntax and semantics Oracle compatible .

2.1.3. PL/SQL grammar

KingbaseES Support the following Oracle PL/SQL Common syntax :

  • Assignment statement

  • IF-THEN-ELSE  sentence

  • CASE  sentence

  • Multiple loop statements , Such as LOOP  sentence 、WHILE-LOOP  Statement and FOR LOOP  sentence

  • GOTO  sentence

  • %TYPE  Properties and %ROWTYPE  attribute

  • REF CUSOR  The cursor

  • %NOTFOUND、%FOUND、%ISOPEN  and  %ROWCOUNT  Cursor properties

  • RETURNING INTO  sentence

  • EXECUTE IMMEDIATE  sentence

  • Support BULK COLLECT

  • PL/SQL Support collection types ( Associative array 、 Nested table 、 Variable array )

  • PL/SQL exception handling

  • FORALL  sentence

2.1.4. PL/SQL object

KingbaseES Support the following Oracle PL/SQL object :

  • Built in scalar functions

  • Row level BEFORE trigger

  • Row level AFTER trigger

  • INSTEAD OF trigger

  • Anonymous block

  • stored procedure

  • function

  • subtypes

  • object type

  • package

2.1.5.  client SQL Interactive tools

in application , Usually customers DDL Scripts and reports are through SQL Transplanted by interactive tools . In this case ,KingbaseES The following are provided SQL Interactive tools :

  • KSQL: Command line SQL Interactive tools , similar Oracle Of SQL* PLUS.

  • Database system management tools : Graphic SQL Interactive tools , similar Oracle Of SQL Developer Graphic tool .

Through the above tools , Users can connect to the database server , Run the database utility , send out SQL sentence , function SQL Script , Or run KingbaseES Database management commands implement database management, etc .

2.2.  Relevant technical resources

This guide focuses on statement compatibility features 、 Migration tools 、 The migration scenario and application migration are described Oracle The key technology and implementation of transplantation . In the description of each technology and implementation , This guide provides only a limited introduction , Comprehensive details are not provided . therefore , If you need to know the implementation details of some technologies, please also refer to the relevant technical materials .

原网站

版权声明
本文为[Thousands of sails passed by the side of the sunken boat_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207271807231255.html