Operating System - HP-UX
1748205 Members
4771 Online
108759 Solutions
New Discussion юеВ

Re: 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 3
Sandeep Kapare
Advisor

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
New Member

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.