Updated on 2024-05-28 GMT+08:00

Converting Syntax from Oracle to GaussDB

GaussDB supports only common synonyms and does not support public synonyms. UGO will convert public synonyms in Oracle to common synonyms of the public schema in GaussDB to implement equivalent functions. For details, see Table 1.

If different users in your database have public synonyms with the same name, there are synonym conflicts. You need to reconstruct the synonyms with the same name before migrating them. For details, see Table 2.

Table 1 Syntax conversion 1

Source SQL in Oracle

Converted SQL in GaussDB

CREATE PUBLIC SYNONYM u1.syn FOR u1.object1;

CREATE SYNONYM public.syn FOR u1.object;

Table 2 Syntax conversion 2

Source SQL in Oracle

Converted SQL in GaussDB

Whether Synonyms Conflict

CREATE PUBLIC SYNONYM u1.syn FOR u1.object1;

CREATE SYNONYM public.syn FOR u1.object1;

No

CREATE PUBLIC SYNONYM u2.syn FOR u1.object2;

CREATE SYNONYM public.syn FOR u2.object2;

Yes