![]() You must rewrite the statements that are not valid for Oracle Database. The liboramysql driver does not translate SQL statements. Additional information may also be found in Oracle SQL Developer User's See API Reference for Oracle MySQL Client Library Driver for details on data type mapping and API compatibility. Simultaneous connections to both MySQL Database and Oracle Database in the same application are not possible. Note that the liboramysql driver supports connections only to Oracle Database. MySQL Driver for Oracle Database, liboramysql, translates MySQL API calls to Oracle Call Interface (OCI) calls, and between Oracle and MySQL data types.Įxisting MySQL-based applications may be relinked to use the liboramysql driver, making Oracle Database the new data source. The liboramysql API is compatible with MySQL Commercial Connector/C 6.0. For Instant Client RPM installations, the library is in the /usr/lib/oracle/12.1/client/lib or /usr/lib/oracle/12.1/client64/lib directory on 32-bit and 64-bit Linux platforms, respectively. ![]() For Instant Client ZIP files, the library is in the instantclient_12_1 directory. Typically, you must set the operating system environment variable ( LD_LIBRARY_PATH on Linux or PATH on Windows) to include this installation directory.įor ORACLE_HOME installations, the driver library is installed in the $ORACLE_HOME/lib directory for Linux and the %ORACLE_HOME%\bin directory for Windows. The driver must be installed in the same directory as the Oracle Client Shared Library, that is, libclntsh.so for Linux and oci.dll for Windows. The driver is also packaged as part of the Oracle Instant Client Basic and Basic Lite packages for download from OTN. The MySQL Client Library Driver for Oracle is provided as a file in the liboramysql.so shared library for Linux and as the oramysql.dll dynamic link library (DLL) for Windows. Although native Oracle adapters already exist for many programming languages implemented in C, migrating an application to a native Oracle adapter often requires extensive application code changes. ![]() These languages include PHP, Perl, Python, and Ruby. After updating the connection credentials, this code can run unchanged against Oracle Database when the executable is linked using the liboramysql library, instead of the libmysqlclient library.Īlthough the database schema and data must be migrated to Oracle separately, and although the liboramysql library does not translate SQL statements, considerable amount of effort is conserved when migrating to Oracle Database because no changes have to be made to the application code.Ĭustom C applications can use the liboramysql library to easily migrate to Oracle Database.Īdditionally, you can migrate applications using programming languages that abstract the use of the libmysqlclient library and provide MySQL extensions or adapters. The C code snippet in Example 6-1 demonstrates how to connect to MySQL and how to insert a row into a table. Figure 6-1 MySQL Application Code Using liboramysql Driver to Connect to Oracleĭescription of "Figure 6-1 MySQL Application Code Using liboramysql Driver to Connect to Oracle"
0 Comments
Leave a Reply. |