javi2
asked on
Pro*C/C++ Execution problem...
Hi,
I created a program with Pro*C/C++ to connect with ORACLE.. It's run OK as when i use oracle user to execute it...
I added the following enviroment variables to nobody user:
LD_LIBRARY_PATH=/usr/local /oracle/ap p/product/ 8.0.6/lib
ORACLE_BASE=/usr/local/ora cle
ORACLE_HOME=/usr/local/ora cle/app/pr oduct/8.0. 6
ORACLE_SID=USADOS
But when i try to execute with other username (nobody) i get the next error:
Can't find libclntsh.so.1.0 library...
I copied libclntsh.so.1.0 to /lib but i get a lot of errors like:
ORACLE error--
Error while trying to retrieve text for error ORA-12547
nobody user can execute sqlplus and connect to oracle with next problems:
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Can anyone help me!
Regards...
I created a program with Pro*C/C++ to connect with ORACLE.. It's run OK as when i use oracle user to execute it...
I added the following enviroment variables to nobody user:
LD_LIBRARY_PATH=/usr/local
ORACLE_BASE=/usr/local/ora
ORACLE_HOME=/usr/local/ora
ORACLE_SID=USADOS
But when i try to execute with other username (nobody) i get the next error:
Can't find libclntsh.so.1.0 library...
I copied libclntsh.so.1.0 to /lib but i get a lot of errors like:
ORACLE error--
Error while trying to retrieve text for error ORA-12547
nobody user can execute sqlplus and connect to oracle with next problems:
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Can anyone help me!
Regards...
As cadabra commented please give us a clear picture where the
file resides and how your trying to fire it. Does the user
(nobody) having acess to all the tables your using in the pro*c.
What are all the error messages u get when u run the exe.
file resides and how your trying to fire it. Does the user
(nobody) having acess to all the tables your using in the pro*c.
What are all the error messages u get when u run the exe.
ASKER
Edited text of question.
========================== ========== ========== ========== ========== ========== =======
> nobody user can execute sqlplus and connect to oracle with next problems:
>
> Error accessing PRODUCT_USER_PROFILE
> Warning: Product user profile information not loaded!
> You may need to run PUPBLD.SQL as SYSTEM
This is'nt a problem. If you run the pupbld.sql script as user system, this will go away ...
Which Unix are we talking about ?
Can you post all the environment variables and their values as defined in the Oracle unix user account ?
Which shell is defined for the Oracle unix account, and which for the nobody unix account ?
Note: Please don't edit the text of the question, but rather post comments with additional information, so that everyone may follow the history of the discussion .
> nobody user can execute sqlplus and connect to oracle with next problems:
>
> Error accessing PRODUCT_USER_PROFILE
> Warning: Product user profile information not loaded!
> You may need to run PUPBLD.SQL as SYSTEM
This is'nt a problem. If you run the pupbld.sql script as user system, this will go away ...
Which Unix are we talking about ?
Can you post all the environment variables and their values as defined in the Oracle unix user account ?
Which shell is defined for the Oracle unix account, and which for the nobody unix account ?
Note: Please don't edit the text of the question, but rather post comments with additional information, so that everyone may follow the history of the discussion .
The problem is only with environment setup.
You will have to login in to oracle as system and run PUPBLD.SQL .
And set the enviroment for the user nobody. This should solve your problem.
You will have to login in to oracle as system and run PUPBLD.SQL .
And set the enviroment for the user nobody. This should solve your problem.
ASKER
Unix --> Solaris 6
My oracle user as next enviroment variables...
LD_LIBRARY_PATH=/usr/local /oracle/ap p/product/ 8.0.6/lib
ORACLE_BASE=/usr/local/ora cle
ORACLE_HOME=/usr/local/ora cle/app/pr oduct/8.0. 6
ORACLE_SID=USADOS
TNS_ADMIN=/usr/local/oracl e/app/prod uct/8.0.6/ network/ad min
LD_LIBRARY_PATH=/usr/local /oracle/ap p/product/ 8.0.6/lib
and uses /bin/sh shell
nobody user uses tcsh shell and i added all enviroment variables to nobody user like oracle user...
When i execute a Pro*C/C++ program in nobody shell it works fine...
but when i use the program like a apache CGI i get next error from sql_error()
ORACLE error--
Error while trying to retrieve text for error ORA-12547
Manual says TNS connection is broken...
My oracle user as next enviroment variables...
LD_LIBRARY_PATH=/usr/local
ORACLE_BASE=/usr/local/ora
ORACLE_HOME=/usr/local/ora
ORACLE_SID=USADOS
TNS_ADMIN=/usr/local/oracl
LD_LIBRARY_PATH=/usr/local
and uses /bin/sh shell
nobody user uses tcsh shell and i added all enviroment variables to nobody user like oracle user...
When i execute a Pro*C/C++ program in nobody shell it works fine...
but when i use the program like a apache CGI i get next error from sql_error()
ORACLE error--
Error while trying to retrieve text for error ORA-12547
Manual says TNS connection is broken...
Run a CGI script in apache that displays all the environment variables it sees and their values, and post them as a comment.
ASKER
Hi,,
This are server variables:
SERVER_SOFTWARE: Apache/1.3.3 (Unix) mod_perl/1.16
DOCUMENT_ROOT: /data/imail/httpd/htdocs
GATEWAY_INTERFACE: CGI-Perl/1.1
REMOTE_ADDR: 212.66.181.89
SERVER_PROTOCOL: HTTP/1.0
SERVER_SIGNATURE:
REQUEST_METHOD: GET
QUERY_STRING:
HTTP_USER_AGENT: Mozilla/4.7 [en] (WinNT; I)
PATH: /bin:/usr/bin:/usr/ucb:/us r/bsd:/usr /local/bin
TZ: US/Eastern
HTTP_CONNECTION: Keep-Alive
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
REMOTE_PORT: 64257
LD_LIBRARY_PATH: /data/imail/lib:/data/imai l/lib:/dat a/imail/li b
MOD_PERL: 1.16
HTTP_ACCEPT_LANGUAGE: en
SCRIPT_NAME: /cgi-bin/login/env.cgi
SCRIPT_FILENAME: /data/imail/httpd/cgi-bin/ login/env. cgi
HTTP_ACCEPT_ENCODING: gzip
SERVER_NAME: sun00838.dn.net
REQUEST_URI: /cgi-bin/login/env.cgi
HTTP_ACCEPT_CHARSET: iso-8859-1,*,utf-8
NLSPATH: /data/imail/lib/nlslib/%L/ %N.cat:/da ta/imail/l ib/nlslib/ %L/%N.cat
SERVER_PORT: 82
PERLHOME: /data/imail/perl
HTTP_HOST: 209.207.236.62:82
I don't have ORACLE environment variables, how can i had to user?!?
This are server variables:
SERVER_SOFTWARE: Apache/1.3.3 (Unix) mod_perl/1.16
DOCUMENT_ROOT: /data/imail/httpd/htdocs
GATEWAY_INTERFACE: CGI-Perl/1.1
REMOTE_ADDR: 212.66.181.89
SERVER_PROTOCOL: HTTP/1.0
SERVER_SIGNATURE:
REQUEST_METHOD: GET
QUERY_STRING:
HTTP_USER_AGENT: Mozilla/4.7 [en] (WinNT; I)
PATH: /bin:/usr/bin:/usr/ucb:/us
TZ: US/Eastern
HTTP_CONNECTION: Keep-Alive
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
REMOTE_PORT: 64257
LD_LIBRARY_PATH: /data/imail/lib:/data/imai
MOD_PERL: 1.16
HTTP_ACCEPT_LANGUAGE: en
SCRIPT_NAME: /cgi-bin/login/env.cgi
SCRIPT_FILENAME: /data/imail/httpd/cgi-bin/
HTTP_ACCEPT_ENCODING: gzip
SERVER_NAME: sun00838.dn.net
REQUEST_URI: /cgi-bin/login/env.cgi
HTTP_ACCEPT_CHARSET: iso-8859-1,*,utf-8
NLSPATH: /data/imail/lib/nlslib/%L/
SERVER_PORT: 82
PERLHOME: /data/imail/perl
HTTP_HOST: 209.207.236.62:82
I don't have ORACLE environment variables, how can i had to user?!?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK...
I'm using putenv at C programm, it's works fine...
Cadabra i want accept you the question...
I'm using putenv at C programm, it's works fine...
Cadabra i want accept you the question...
You can use "accept comment as answer option" ...
kkooty changed the proposed answer to a comment
2. What error messages are you getting (interactively, and in sqlnet.log) ?
3. Can you connect to the "nobody" user with sql*plus ?