cancel
Showing results for 
Search instead for 
Did you mean: 

powerbuilder application does not connect to the oralce db

Former Member
0 Kudos

Hi,

my powerbuilder application does not connect to oracle DB in windows 7, when we are running the application as administrator it is connecting with the oracle DB, i cannot give the administrator permission to all users, anybody knows the solution for this problem? thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raman,

I had similar issue. Are you getting the below errors while trying to connect to Oracle in SQL*Plus?


SP2-1503: Unable to initialize Oracle call interface

SP2-0152: ORACLE may not be functioning properly

The problem is, Oracle tools (SQL*Plus etc) seem to require a "Create Global Objects" permission. This is turned off for normal user in Windows 7 by default. In windows 7, every program is actually run as "normal user" even though you logged in with Administrator, thus the program cannot create global objects and thus fails.

This blogger has a nice post as to how to fix this issue:

http://daverobertson63.wordpress.com/2007/10/18/sqlplus-windows-administator-only/

One small correction on that page: Author meant Control Panel -> Administrative Tools.

Here is some more on Global objects:

Create global objects: Security Configuration Editor; Security Services

windows - What exactly is a "global object"? - Super User

http://www.stigviewer.com/check/V-26480

There is also this:

http://serverfault.com/questions/26673/create-global-objects-rights-on-a-terminal-server

I didn't try this.

So far, only Oracle seems to have this problem. (though my PB application that used the Oracle driver also failed due to the same issue).

HTH

Sam

Former Member
0 Kudos

Hi sam,

     It is worked, thank you very much..

KVRaman

Answers (1)

Answers (1)

Former Member
0 Kudos

What is the SQLCA.ErrText saying?

I would guess because you can connect as an Administrator that it is a rights issue.  Make sure the "Authenticated Users" have the following rights if you are using the Instant Client.  (You may also need to give the same rights to "Users").

If you are using the Client install of Oracle then you should give the same type of rights to the following area.

.

 

Former Member
0 Kudos

Hi,

Thanks for your reply

sqlca.errtext is saying nothing,

I tried with full permission for that oracle folder and application folder and whole c:(windows installed drive). still it is not connecting with the oracle DB

Former Member
0 Kudos

Mmmm...Do you get any error message at all?  A messagebox?  Unless your SQLCA.SQLCode is returning 0, there has to be some error thrown.  Do regular users have access to the server where the Oracle database resides?  If the Administrator can connect, and users can't, then it has to be some type of rights issue.

What version of PB and Oracle are you using?  Are you using the Instant Client or the Client install from the Oracle disc?

For the Client install from the disc you need to have the following Environment variable entry.  (I'm using Oracle 10g).

For the Instant Client you need the following Environment variable entry.

.

.

Former Member
0 Kudos

Hi

No error message at all, but the application is opening but couldn't logon (i put an messagebox to show sqlca error message while connecting to DB)

I am using pb 8 and oracle 10g Database, i installed oracle 10g client as "runtime" and i have set the environmental path to 'oracle home', still the problem continues.. i don't know about TNS_ADMIN, even i created it as you showed in the picture.. still the problem continues..

Former Member
0 Kudos

You should set the "oracle_home"\bin folder in your path, not "oracle_home"

Step through your code with the debugger to verify you are setting all the SQLCA variables as expected.  I don't think the 'administrator' problem is the issue.  You do not need administrative privileges for an application to use the oracle client.  I've never had any user having problems with that.
 

Former Member
0 Kudos

TNS_ADMIN is the path to the machine's tnsnames.ora file. It is NOT the location of your oracle client.

Set this variable properly or remove the setting. If incorrectly set your Powerbuilder connection will fail without error as this is a configuration error. Administrator rights have nothing to do with connecting to a database.