Difference: APPX500ToOracleOnLinux (39 vs. 40)

Revision 402016-01-08 - JeanNeron

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="APPX500ToOracle"
 

APPX 5 connectivity to Oracle on Linux

How to configure APPX 5 to store data inside Oracle on Linux.

Line: 12 to 13
  This document assumes you already have Oracle installed on your network and configured to accept connections. For performance reasons, it is recommended that your RDBMS and APPX be on the same server. APPX should also already be installed with the AppxLoginMgr configured to accept logins.
Deleted:
<
<
 Unix/Linux will ignore environment variables such as LD_LIBRARY_PATH, SHLIB_PATH and LIBPATH required for Oracle's Instant Client when called from a SUID binary (which APPX typically is). To accomodate this, you'll want to remove the SUID on appx and configure APPX Login Manager to impersonate the appx user (typically appx) and appx group (typically appxgrp). This is accomplished via the service .ini parameters:
Deleted:
<
<
 
ImpersonateGroup            = NamedGroup(appxgrp)               #[LogonUser, NamedGroup(groupname), ServiceOwner] 
Changed:
<
<
ImpersonateUser = NamedUser(appx) #[LogonUser, NamedUser(username), ServiceOwner]
>
>
ImpersonateUser = NamedUser(appx) #[LogonUser, NamedUser(username), ServiceOwner]
  Connections via the APPX Login Manager will then be able to make use of the Oracle Instant Client connection. From the command line, you can connect to the APPX Login Manager via the -c argument to appx like so:
Deleted:
<
<
 
Changed:
<
<
appx -c
>
>
appx -c
 

Oracle Instant Client

Downloading

Changed:
<
<
APPX requires a 32 bit Oracle interface for all Oracle connections. Even if your OS is 64 bit, even if your Oracle is 64 bit, APPX requires you to connect to Oracle via the 32 bit version of the Oracle Instant Client. You can download the 32 bit version of Oracle Instant Client here. On my test server here I have APPX installed on Red Hat Enterprise 5 64 bit OS. Oracle is installed on a secondary server - Red Hat Enterprise 4 32 bit. The connection from APPX to Oracle should work fine to Oracle 10.2.0.4 and above (including 11). I downloaded the 32 bit version of Oracle's Instant Client 10.2.0.4, selecting two file bundles, Instant Client Package - Basic and Instant Client Package - SQL*Plus. I chose the rpm, but the zip packages work just as well. The rpms deposited the Oracle Instant client files as shown below:
>
>
If you are running APPX 5.4.3 or earlier, you will need the 32 bit Oracle interface. Even if your OS is 64 bit, even if your Oracle is 64 bit, APPX requires you to connect to Oracle via the 32 bit version of the Oracle Instant Client. You can download the 32 bit version of Oracle Instant Client here. If you are running APPX 6.0 or greater, you need to know if you are running 32 or 64 bit APPX engine and download the appropriate Instant Client.

On my test server here I have APPX installed on Red Hat Enterprise 5 64 bit OS. Oracle is installed on a secondary server - Red Hat Enterprise 4 32 bit. The connection from APPX to Oracle should work fine to Oracle 10.2.0.4 and above (including 11). I downloaded the 32 bit version of Oracle's Instant Client 10.2.0.4, selecting two file bundles, Instant Client Package - Basic and Instant Client Package - SQL*Plus. I chose the rpm, but the zip packages work just as well. The rpms deposited the Oracle Instant client files as shown below:

 

Installing

[root@appx502 10.2.0.4-32bit]# rpm -ivh oracle-instantclient-basic-10.2.0.4-1.i386.rpm oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm 
Preparing...                ########################################### [100%]
Line: 64 to 62
 
[root@appx502 ~]#
[root@appx502 ~]# /usr/lib/oracle/10.2.0.4/client/bin/sqlplus larry/yacht@10.50.0.6:1521/customer
/usr/lib/oracle/10.2.0.4/client/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
Changed:
<
<
[root@appx502 ~]#
>
>
[root@appx502 ~]#
  Notice the failure to find libsqlplus.so in the text above. You can resolve this on Linux with LD_LIBRARY_PATH. An example is below.

Success with LD_LIBRARY_PATH

Line: 85 to 82
 SQL> quit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
Changed:
<
<
[root@appx502 ~]#
>
>
[root@appx502 ~]#
 

APPX

We can configure APPX now that we know that we can connect to Oracle using the Instant Client library files via the special Instant Client version of SQL*Plus (you did perform that test right?). In order for APPX to successfully connect to Oracle via the Oracle Instant Client, it must have visibility of certain environment variables prior to the start of APPX. Setting these environment variables in the commonly used appx.env file will not work. Setting them in the shell would work for command line APPX sessions. You should consider setting them inside the service environment variable file so that all connections to APPX via TCP (even the text based ones via appx -c) will be able to connect to Oracle via the Oracle Instant Client.

Line: 120 to 117
 # APPX_DBG_CODE=0xFFFFFFF # APPX_OCI_DIR=/usr/lib/oracle/10.2.0.4/client/lib/ APPX_OCI_LIB=libclntsh.so.10.1
Changed:
<
<
[appx@appx502 services]$
>
>
[appx@appx502 services]$
  The two environment varialbes needed for for the Oracle connection are LD_LIBRARY_PATH and APPX_OCI_LIB.

FMS settings

Line: 137 to 133
  After creating the FMS group, we will define an APPX DMO PROSPECT to make use of this FMS group, finally performing a CREATE FILE from within APPX to create the file in Oracle. These steps are documented in screen shots below.
Changed:
<
<
001.png
>
>
001.png
  Fig. 1
Changed:
<
<
First we need to go to our FMS seetings inside APPX.
>
>
First we need to go to our FMS settings inside APPX.
 
Changed:
<
<
002.png
>
>
002.png
  Fig. 2

Go into APPX ADD mode and create an FMS group with a meaningful name of a type 5 for your Oracle data.

Changed:
<
<
003.png
>
>
003.png
  Fig. 3
Changed:
<
<
Now you need to fill out at least Server Name and Table Naming Scheme. You can select the HINTS button to see other suggested formats for the Table Naming Scheme if you wish.
>
>
Now you need to fill out at least Server Name and Table Naming Scheme. You can select the HINTS button to see other suggested formats for the Table Naming Scheme if you wish. Note: The server name must be in the format <servername or ip>:port/Oracle SID
 
Changed:
<
<
004.png
>
>
004.png
  Fig. 4

I'm going to create a default identity that all my APPX connections to Oracle will use that don't have a specific matching identity.

Changed:
<
<
005.png
>
>
005.png
  Fig. 5

My default identity is Oracle user ID larry. Any APPX user without a specified Oracle Identity will connect to Oracle with this user ID.

Changed:
<
<
006.png
>
>
006.png
  Fig. 6
Line: 177 to 173
  We're now finished with the creation of the FMS group. In the six screen shots above, you can see the creation of the FMS type 5 group named oracle10. We now are going to define APPX DMO PROSPECT to make use of this FMS group so that the data can be stored in Oracle. This will be documented in the following seven screen shots.
Changed:
<
<
007.png
>
>
007.png
  Fig. 7

Let's go to Database Definitions for DMO.

Changed:
<
<
008.png
>
>
008.png
  Fig. 8

Select DMO

Changed:
<
<
009.png
>
>
009.png
  Fig. 9

Select Database Management

Changed:
<
<
010.png
>
>
010.png
  Fig. 10

Go to File Selection

Changed:
<
<
011.png
>
>
011.png
  Fig. 11

Select PROSPECT

Changed:
<
<
012.png
>
>
012.png
  Fig. 12

In File Specifications change the FMS type to 5, and the FMS GROUP name to be whatever you used as your Oracle FMS group name. I used a name of oracle10.

Changed:
<
<
013.png
>
>
013.png
  Fig. 13
Line: 221 to 217
 

Troubleshooting APPX to Oracle connection

Changed:
<
<
If you try to make a connection to Oracle from APPX and receive a message "*Can't load Oracle Call Interface (libclntsh)" then you might be missing the environment variables required, or you might have them set to incorrect paths. Make sure you downloaded the correct Oracle Instant Client files for your platform and that the bitness is 32 and not 64.
>
>
If you try to make a connection to Oracle from APPX and receive a message "*Can't load Oracle Call Interface (libclntsh)" then you might be missing the environment variables required, or you might have them set to incorrect paths. Make sure you downloaded the correct Oracle Instant Client files for your platform and that it maches the bitness of your APPX engine.
  Verify environment variable values via the following path: System Administration > System Setup > Release Information > Environment Variables. Did you set the environment variables inside appx.env? Setting these Oracle connectivity environment variables inside appx.env will not work. These environment variables must be present prior to the appx session starting. Try setting them in the appxLoginMgr environment variable file and then make sure you restart the daemon and reconnect to try the Oracle connection again.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback