GBase News
GBase 8s: One Engine, Oracle & MySQL Compatibility
Migrating from Oracle: NUMBER types unrecognized, PL/SQL packages erroring out?
Migrating from MySQL: SHOW commands failing, AUTO_INCREMENT unsupported?
The hardest part of database migration has never been moving data — it is rewriting SQL.
GBase 8s's answer is direct: don't rewrite it, just switch the mode.
What Is "One Database, Three Modes"?
On top of a single database engine, GBase 8s ships with three built-in SQL compatibility modes:

The three modes are not three separate databases — they are three SQL dialects of the same instance. Different applications connect through different modes and keep using the SQL they already know.
How Deep Does the Compatibility Go?
Oracle compatibility
Basic features: common data types (NUMBER, VARCHAR2, CLOB, DATE, BFILE, and more), common functions, and core database objects (heap tables, partitioned tables, temporary tables, views, materialized views, indexes, triggers, sequences, synonyms, scheduled jobs, system views, and more).
Advanced features: PL/SQL support covering variable types (%TYPE, %ROWTYPE, records, arrays, nested tables), condition and control statements, cursors, packages, dynamic SQL, autonomous transactions, and exception handling; advanced system packages including DBMS_JOB, UTL_ENCODE, UTL_RAW, DBMS_SCHEDULER, and DBMS_RANDOM; DBLINK for heterogeneous database access; FLASHBACK query; and the shared-storage cluster SSC, comparable to RAC/ADG.
Interfaces and tools: compatible with standard interfaces such as JDBC, ODBC, .NET, Python, and Go; compatible with Oracle OCI and OCCI; full migration and real-time incremental synchronization tools provided.
MySQL compatibility
Basic features: common data types (TINYINT, VARBINARY, UNSIGNED, BIT, DATE, DECIMAL, and more), common functions, AUTO_INCREMENT auto-increment primary keys, DELIMITER for stored procedures, backquote quoting, views, and more.
Advanced features: ROUTINE support covering variable declaration and assignment, REPEAT, LEAVE, WHILE and other control statements, LABEL, cursors, triggers, PREPARE dynamic statements, HANDLER, CONDITION, and SIGNAL exception handling; distinctive syntax including the LIMIT clause, REPLACE INTO, INSERT IGNORE, INSERT ... ON DUPLICATE KEY UPDATE, INSERT INTO ... SET, and SHOW TABLES/DATABASES lookup commands; user-defined variables.
Interfaces and tools: compatible with standard interfaces such as JDBC, ODBC, .NET, Python, and Go; the GCI interface is fully compatible with MySQL C API headers, so C/C++ developers change no code; full migration and real-time incremental synchronization tools provided.
How Clients Switch Modes?
dbaccess command-line client
Method 1: switch via SQL statement (session level). After entering dbaccess, run the SQL below to switch the current session's compatibility mode. It affects only the current session, suited to quick verification and SQL compatibility testing.

Method 2: switch via environment variable (global). Before starting dbaccess, set the default mode through an environment variable; the client enters that compatibility mode at startup, with no need to run set environment every time.
Application connections (JDBC example)
At the application layer, specify the compatibility mode through the sqlmode parameter in the JDBC connection string for a "painless migration."

Three Common Misconceptions
Misconception 1: mode switching takes effect globally
set environment sqlmode applies only to the current session. For a global effect, it must be specified uniformly in application connection strings.
Misconception 2: the three modes can be mixed
One application should stay on one fixed mode. A stored procedure created in gbase mode may error when executed in oracle mode. Different applications may connect in different modes, but a single application should not switch back and forth.
Misconception 3: switching the mode means zero changes
The compatibility modes cover the vast majority of everyday development scenarios, but they do not guarantee that every feature, every system package, and every special syntax of the source database transfers unchanged. Before a formal migration, run a compatibility validation pass on your core business flows.
FAQ
1.What is "One Database, Three Modes"?
A: GBase 8s ships with three built-in SQL compatibility modes on a single engine. They are not three separate databases — they are three SQL dialects of the same instance, so different applications connect in the mode that matches the SQL they already know.
2.How deep is the Oracle compatibility?
A: It covers common types such as NUMBER and VARCHAR2 and core database objects, PL/SQL including cursors, packages, dynamic SQL and autonomous transactions, advanced system packages such as DBMS_JOB and DBMS_SCHEDULER, DBLINK for heterogeneous access, FLASHBACK query, an SSC shared-storage cluster comparable to RAC/ADG, and OCI/OCCI interfaces.
3.Which MySQL features are supported?
A: AUTO_INCREMENT, DELIMITER, backquotes, the LIMIT clause, REPLACE INTO, INSERT IGNORE, INSERT ... ON DUPLICATE KEY UPDATE, SHOW lookup commands, user-defined variables, and more — with GCI fully compatible with MySQL C API headers, so C/C++ code needs no changes.
4.How do clients switch compatibility modes?
A: In dbaccess, run set environment sqlmode for the current session, or set an environment variable before startup for a global default. Applications specify the mode through the sqlmode parameter in the JDBC connection string.
5.Does switching the mode mean zero code changes?
A: No. The modes cover most everyday scenarios, but not every feature, system package, or special syntax of the source database transfers unchanged — run a compatibility validation on core business flows before formal migration.
