Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Pro*C problem on HP-UX11i with new Oracle 9.2.0 environment

Girija
Occasional Contributor

Pro*C problem on HP-UX11i with new Oracle 9.2.0 environment

y application has daemons pro*c programs on HP-UX 11i, that calls Oracle packages.We have migrated from Oracle 8i to 9.2.0 recently and i had to compile those pro*c programs again in the 9i environment.

The compilation was succesful but on execution i got two errors, one related with connectivity

1.ORA-01034: ORACLE not available
and the other is bind value error
2.ORA-01480: trailing null missing from STR bind value

However i have found alternatives like in the first case,the pro*c program had a connect statement as
EXEC SQL CONNECT :userid;
and after i changed it to
EXEC SQL CONNECT /@ORACLE_SID it works.

In the second case of error on further debugging i found it was throwing arror at a point of code where value from the table(node name) is stored in a variable and after i initialize the variable
(bzero(&g_loc_node_id,sizeof(g_loc_node_id));)
or either append null to it (g_loc_node_id[strlen(g_loc_node_id)]='\0') it works !!

The pro*c code on HP-UX11i that worked on 8i enviroment has to be changed now on 9i environment.
I wanted to know, if these are characteristic features of 9i? like change in SQL CONNECT statemnetand all that bind variables need to be initialized? or if I am missing something that had to be looked into?

Note: I have compiled the code using 32 bit libraries

Thanks a lot in advance for all the help.
3 REPLIES

Re: Pro*C problem on HP-UX11i with new Oracle 9.2.0 environment

You need to re-compile the Pro*C codes even when the minor version changes if any of the library files used for that code are changed or updated in the version upgrade (like migrating from 8.1.7.3 to 8.1.7.4). You need to re-compile the code even when the $ORACLE_HOME is changed, even if it is on the same system, same oracle version.
Nothing is impossible
Girija
Occasional Contributor

Re: Pro*C problem on HP-UX11i with new Oracle 9.2.0 environment

Thanks.
I have recompiled the code,on 9i, and only then on execution I have got those errors, as I have already mentioned.
Vedamoorthy
Occasional Visitor

Re: Pro*C problem on HP-UX11i with new Oracle 9.2.0 environment

I too faced this problem with above said senario.

For Error1:
***********
ORA-01034 : ORACLE not available

I changed the following code,
Before Error:
-------------
EXEC SQL CONNECT :username IDENTIFIED BY :password;

After Error:
-------------
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :sid;


For Error2:
***********

ORA-01480: trailing null missing from STR bind value

I changed the following code,

Before Error:
--------------
char variablename;

After Error:
-------------
varchar variablename;

I changed the datatype 'char' to 'varchar'.
Further if you face 'Segmentation fault'.
use variablename.arr appropriately.