Salesforce

Database Gateway (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Database Gateway (Magic xpi 3.x)

The $MAGIC_XPI_HOME/etc/mgenv file lists the server gateway information. Gateways with a number sign (#) at the beginning of the line are not activated. The gateway for the database that you selected when you installed Magic xpi is always active. To activate database gateways, remove the # from the line.

Information about the user and connection is available in the etc/MAGICXPI.INI file in the following fields: DB_CONNECT, DB_USER and DB_PASSWORD. These fields are updated during the installation process with the information that is relevant for the gateway. The values can be modified.

Oracle and DB2

When you use the Oracle gateway, make sure that:

  • The $ORACLE_HOME and $ORACLE_SID parameters are defined in the $MAGIC_XPI_HOME/etc/mgenv file. This file is updated during the installation process.

  • The $LD_LIBRARY_PATH environment variable includes the $ORACLE_HOME/lib32 directory.

For Oracle and DB2 databases you must enter the connection string and then the home directory.

To work with Oracle 11, you need to manually update the mgenv file by changing MGORACLE10 to MGORACLE11.

MySQL and ODBC

  1. Install MySQL.

  2. Run the scripts in the $MAGIC_XPI_HOME/db/mysql folder after reading the readme.txt file. Make sure to use the correct database name.

  3. Update the following paths in the HOME/lib directory:

libcurl.so.3 -> /usr/lib/libcurl.so.4

libexpat.so.0 -> /usr/lib/libexpat.so.1

libnss3.so -> /usr/lib/libnss3.so

libssl3.so -> /usr/lib/libssl3.so

libodbcinst.so.1 -> /usr/lib/libodbcinst.so.2

libodbc.so.1 -> /usr/lib/libodbc.so.2.0.0

  1. Install the MyODBC connector (one of the RPMs available by the distribution).

  2. Add the path to the shared libraries of the MyODBC connector to LD_LIBRARY_PATH.

  3. When activating MySQL, it uses a communication socket /var/lib/mysql/mysql.sock, which the MyODBC connector tries to find in /tmp. Therefore, create a link to it there.

Note:

If ODBC is not installed on your machine, you need to instal the following to work with MySQL databases:

For MySQL databases, you must enter the unixODBC installation directory.

To work with ODBC, the file $MAGIC_XPI_HOME/.odbc.ini has to match the information in the MAGIC.INI file and contain the following information:

$MAGIC_XPI_HOME/etc/MAGIC.INI

DB_TABLE = MAGICXPI

DB_CONNECT =

DB_USER = MAGICXPI

DB_PASSWORD = MagicPass#3

$MAGIC_XPI_HOME/.odbc.ini

[MAGICXPI]

Description = Magic xpi Database

Driver = /home/magicxpi/lib/myodbc/libmyodbc5.so where libmyodbc5.so is the ODBC driver

Database = MAGICXPI where MAGICXPI is the name of the internal database

user = MAGICXPI where MAGICXPI is the name of the Magic xpi database user

Reference
Attachment 
Attachment