Consultor Eletrônico



Kbase P126472: Cannot make sql-92 connection to replication enabled target database
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/17/2008
Status: Verified

SYMPTOM(s):

Cannot make sql-92 connection to replication enabled target database

source and target databases are synchronized

The Source and Target databases are synchronized. (10668)

Can start 4GL client server connection

Error connecting to SQL-92 server on UNIX from SQL explorer

SQL server process terminated. (8841)

SQLExplorer.exceptions shows Database not started

[JDBC Progress Driver]:Database not started

Cannot connect with sqlexp on UNIX

Cannot connect with ODBC/sqlexp from Windows.

Starting database broker using proserve script which sets appropriate environment variables calling
. $DLC/bin/slib_env
. $DLC/bin/java_env

Environment variables, CLASSPATH, JDKHOME,LD_LIBRARY_PATH are set correctly by proserve script.

Permissions have been set without suid on sql on executables:
chown root
chmod 4755
chmod 755 _sqlsrv2
chmod 755 _waitfor
for the $DLC/bin directory.

Correct java in use for environment

ldd _sqlsrv2 shows all libraries found

manually spawning the _sqlsrv2 broker throws a Segmentation Fault (core dump).

segfault when attempting following command to manually spawn _sqlsrv2,

_sqlsrv2 -z \
> -D juniper.serverid=1 \
> -D "juniper.dbfile=\"`pwd`/sports.db\""

FACT(s) (Environment):

UNIX
Progress 9.1x
OpenEdge 10.x

CAUSE:

The problem is related to permissions. If the owner of the database is different from starter of the database, _sqlsrv2 cannot spawn.

Once the database is started, the suid bit on the _mprosrv is downgraded. The SUID bit spawns the executed process as if it would be started by the owner of the binary file. This technique is, used by the database broker (_mprosrv) but cannot be used for the _sqlsrv2 process as the necessary libraries will not be loaded (unless there are symbolic links in the /usr/lib directory).

The _sqlsrv2 process is started by the database broker (_mprosrv). When the process is executed, it needs to find all the required libraries in order to function properly. The location of shared libraries is not coded in the binary file (_sqlsrv2). However since the suid bit has been downgraded, and the user who started the database does not have write permissions, the process cannot initilise.

FIX:

Make sure the database is owned by and the database login broker is started by the same user.
Example:

permissions on executables:
-rwsr-xr-x 1 root root _mprosrv
-rwxr-xr-x 1 root root _sqlsrv2

permissions on database:
chmod 644 dbname*
-rw-r--r-- 1 root support dbname.db
Database started by a userid of "support" group: uid=1061(meep) gid=300(support)
SQLSRV2 process will not spawn.
chmod 664 dbname*
-rw-rw-r-- 1 root support 655360 Oct 18 11:31 ss.db
Database started by a userid of "support" group: uid=1061(meep) gid=300(support)
SQLSRV2 process will spawn as user will connect as member of "support" group which has write permissions.

Please refer to Progress Solution 12538, Progress and UNIX Permissions