Kbase 21981: ESQL-92 -- Access denied(Authorisation failed) (7512)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/19/2002 |
|
SUMMARY:
This Knowledge Base Solution provides one explanation for error 7512. When connecting an ESQL-92 client and querying a Progress database, you might encounter this error:
Access denied(Authorisation failed) (7512)
EXPLANATION:
With ESQL-92 the value of the DH_USER environment variable determines the default username; this is true on both UNIX and Windows platforms. If DH_USER is not set, then the value of the USER environment variable determines the default username.
Due to an issue in Progress 9.1x, the DH_USER environment variable is not being read on UNIX platforms (Win32 works properly), thus resulting in the username being read from the USER environment variable instead (this is the user that is logged into the UNIX session). If the username in the USER environment variable has not been granted privileges in the database, error 7512 will occur.
This issue has been reported to Progress Development with the
reference number 20020327-002.
SOLUTION:
This issue is fixed in Progress 9.1D.
In versions prior to 9.1D, you can code around the problem with the CONNECT TO DEFAULT USER in the embedded SQL program.
Example:
if (!(username_p=getenv("DH_USER")))
{
printf ("You must set $DH_USER\n");
return 1;
}
strcpy(username, username_p);
EXEC SQL CONNECT TO DEFAULT USER :username;
References to Written Documentation:
Progress Embedded SQL-92 Guide and Reference, "Connection Management in ESQL-92"
Progress Knowledge Base Solution 20143, "Basic Guide to Defining Progress SQL-92 Database Security"