GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Not able to connect with database
Operating System - HP-UX
1855856
Members
1590
Online
104107
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2009 09:58 PM
08-25-2009 09:58 PM
Not able to connect with database
Hi Experts,
I just have written a sampleconn.pc file to connect with Oracle 10g database.
I am compiling it using command
$proc sampleconn.pc
$ cc -o sampleconn sampleconn.o
ld: Unsatisfied symbol "sqlcxt" in file sampleconn.o
1 errors.
I am getting the above error and not able to resolve this error from past three days. Please help me in resolving the issue.
I have tried ldd command
$ ldd -r sampleconn
libc.so.1 => /usr/lib/hpux32/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
symbol not found: sqlcxt (sampleconn)
PC file contents are below
#include
#include
#include
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA.H;
void main()
{
strcpy(uid.arr,"DUMMY");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"DUMMY");
pwd.len = strlen(pwd.arr);
EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;
printf("Connected to Oracle\n");
EXEC SQL COMMIT WORK RELEASE;
return;
errexit:
printf("Connection failed");
return;
} /* end of main */
Please help me as soon as possible.
I am struck in urgent issue.
$ echo $LD_LIBRARY_PATH
/oraclewhwb/app/oracle/10g:/oraclewhwb/app/oracle/10g/precomp/lib:/oraclewhwb/app/oracle/10g/rdbms/public:/oraclewhwb/app/oracle/10g/lib:/oraclewhwb/app/oracle/10g/lib32:/opt/java1.5/jre/lib/IA64N/server/:/oraclewhwb/app/oracle/10g/lib/libocci10_296.so.10.1:/oraclewhwb/app/oracle/10g/lib/libordim10.soO
$ echo $PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/gvsd/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/usr/contrib/kwdb/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/sentinel/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/langtools/bin:/opt/gwlm/bin:/opt/hpvm/bin:/opt/hp-gcc/bin:/oraclewhwb/app/oracle/10g/bin:/oraclewhwb/app/oracle/10g/precomp/public:/oraclewhwb/app/oracle/10g/precomp/lib:/oraclewhwb/app/oracle/10g/rdbms/public:/oraclewhwb/app/oracle/10g/lib
Thanks
Rahul Shukla
I just have written a sampleconn.pc file to connect with Oracle 10g database.
I am compiling it using command
$proc sampleconn.pc
$ cc -o sampleconn sampleconn.o
ld: Unsatisfied symbol "sqlcxt" in file sampleconn.o
1 errors.
I am getting the above error and not able to resolve this error from past three days. Please help me in resolving the issue.
I have tried ldd command
$ ldd -r sampleconn
libc.so.1 => /usr/lib/hpux32/libc.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
symbol not found: sqlcxt (sampleconn)
PC file contents are below
#include
#include
#include
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA.H;
void main()
{
strcpy(uid.arr,"DUMMY");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"DUMMY");
pwd.len = strlen(pwd.arr);
EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;
printf("Connected to Oracle\n");
EXEC SQL COMMIT WORK RELEASE;
return;
errexit:
printf("Connection failed");
return;
} /* end of main */
Please help me as soon as possible.
I am struck in urgent issue.
$ echo $LD_LIBRARY_PATH
/oraclewhwb/app/oracle/10g:/oraclewhwb/app/oracle/10g/precomp/lib:/oraclewhwb/app/oracle/10g/rdbms/public:/oraclewhwb/app/oracle/10g/lib:/oraclewhwb/app/oracle/10g/lib32:/opt/java1.5/jre/lib/IA64N/server/:/oraclewhwb/app/oracle/10g/lib/libocci10_296.so.10.1:/oraclewhwb/app/oracle/10g/lib/libordim10.soO
$ echo $PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/gvsd/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/usr/contrib/kwdb/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/sentinel/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/langtools/bin:/opt/gwlm/bin:/opt/hpvm/bin:/opt/hp-gcc/bin:/oraclewhwb/app/oracle/10g/bin:/oraclewhwb/app/oracle/10g/precomp/public:/oraclewhwb/app/oracle/10g/precomp/lib:/oraclewhwb/app/oracle/10g/rdbms/public:/oraclewhwb/app/oracle/10g/lib
Thanks
Rahul Shukla
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2009 10:57 PM
08-25-2009 10:57 PM
Re: Not able to connect with database
$ cc sampleconn.o
ld: Unsatisfied symbol "sqlcxt"
You need to link your program with some oracle libs.
ld: Unsatisfied symbol "sqlcxt"
You need to link your program with some oracle libs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2009 11:20 PM
08-25-2009 11:20 PM
Re: Not able to connect with database
Hi Dennis,
Thanks for reply. I have include $ORACLE_HOME/lib path in my $LD_LIBRARY_PATH. I also have tried nm $ORACLE_HOME/lib/* | grep sqlcxt. It gave me
nm: /oraclewhwb/app/oracle/10g/lib/libclntst10.a: cannot open
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[35] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[18] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
So I include this static library at the time of linking also I am giving required header files with -I flag at the time of linking.
Can you please help me which library file I am missing and where to include it's path.
Looking for your help -
Thanks for reply. I have include $ORACLE_HOME/lib path in my $LD_LIBRARY_PATH. I also have tried nm $ORACLE_HOME/lib/* | grep sqlcxt. It gave me
nm: /oraclewhwb/app/oracle/10g/lib/libclntst10.a: cannot open
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[35] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
[18] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
So I include this static library at the time of linking also I am giving required header files with -I flag at the time of linking.
Can you please help me which library file I am missing and where to include it's path.
Looking for your help -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2009 12:32 AM
08-27-2009 12:32 AM
Re: Not able to connect with database
>nm $ORACLE_HOME/lib/*
If you are going to scan multiple libs, you should use:
nm -pxAN $ORACLE_HOME/lib/*
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
These are all uses but no definitions of sqlcxt.
>Can you please help me which library file I am missing and where to include it's path.
I would assume your proC or oracle documentation would tell you that.
You need to add -l XX on your link line.
If you are going to scan multiple libs, you should use:
nm -pxAN $ORACLE_HOME/lib/*
[68] | 0| 0|FUNC |GLOB |0| UNDEF|sqlcxt
These are all uses but no definitions of sqlcxt.
>Can you please help me which library file I am missing and where to include it's path.
I would assume your proC or oracle documentation would tell you that.
You need to add -l XX on your link line.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP