Migrating Oracle procedure to MariaDB

Swadhin Ray
Swadhin Ray used Ask the Experts™
on
Migrating Oracle procedures which has JSON data as input and business validation to insert/ update/delete tables to MariaDB.

Can we use SQL_MODE to ORACLE and use the same procedure ? Or we need to rewrite it again.

Like few differences where we use JSON_PARSER.PARSER(<<my input JSON>>) or JSON_EXT.GET_NUMBER / JSON_EXT.GET_STRING in Oracle to get the values for specific keys. So can we directly use the same procedure to work on Mariadb by setting the mode or we need to rewrite the entire procedure.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
I'm not a MariaDB Expert but I'm not aware of any other database product that runs 100% compatible PL/SQL code.

From what I've read about SQL_MODE, it allows some Oracle syntax to be used but I'm betting an existing Oracle procedure will run as-is.

Should be simple enough to just try it?
The issue I see is on JSON part for conversion.  To utilize JSON on 11gr2 version we are using PLJSON utility and my worry is how to convert or translate it to MariaDB .
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
>> we are using PLJSON utility and my worry is how to convert or translate it to MariaDB .

I saw that on Git when I looked up the calls you posted.  The options as I see them are you will need to ask the creator to port it for you, port it yourself or pay someone to port it for you.
We need to rewrite it on MariaDB as addons like josn_table cannot be migrated.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial