Putenv approach – HP R4.2 User Manual
Page 282

5
Database Administration
Voice System Database Administration
UCS 1000 R4.2 Administration 585-313-507
Issue 3 April 2000 243
8
Place the /home/gar/irapi/get_pin_uac entry along with all the other
executable files in the /etc/inittab file as before using the same tools as
before.
putenv Approach
The following describes the putenv approach. The putenv function call
permits the developer to directly place the ORACLE_SID and the
ORACLE_HOME environmental shell variables into a Pro*C program.
Perform the following:
1
Using an editor, open the Pro*C source file for editing.
2
Add the following line at the top of the source file:
#include <stdlib.h>
3
Near the beginning of main, add the following two lines of code:
putenv ( "ORACLE_SID=<ORACLE_SID_name>" );
putenv ( "ORACLE_HOME=<ORACLE_HOME_name>” );
where
ORACLE_SID_name
is the name of the database instance on the
server and
ORACLE_HOME_name
is the ORACLE_HOME directory on
the server.