[Samba] Samba & Delphi & Paradox

Jim Morris jim at morris-world.com
Tue Feb 11 19:44:20 GMT 2003


On Tue, 2003-02-11 at 12:01, Fábio Ferreira wrote:

> I have a server samba/linux executing a software Delphi with access to
> database Paradox. The configurations are OK, but when more than an user is
> accessing the system, he is very slow.
> How can I solve this problem?

Delpi applications use the Borland Database Engine (BDE) to access
shared file databases such as Paradox and dBase files on a network
drive.  I develop a lot of C++ Builder applications myself, and have
been using the BDE for quite a few years now.  With dBASE files at
least, what causes slow operation when multiple users begin accessing
the files are the use of opportunistic locks (oplocks) on the share.

When one client is accessing the file, oplocks allow the client to cache
database table changes locally.  However, when a second client accesses
the file, the Samba server issues an oplock break request to the first
client that has an oplock on the file.  The second client is not granted
access to the file until the first client acknowledges the oplock break
and flushes all of its changes back to the Samba server.  This can take
quite a while if the file is large, or if the first client does not
acknowledge the oplock break request (due to network errors or buggy
client code).

There are two things you can try:

1. Disable oplocks on the entire share, by putting 'oplocks = no' in
that share definition in smb.conf:

	[myshare]
	oplocks = no

2. Or disable oplocks on JUST the Paradox files, by specifying using the
'veto oplock files' option and a wildcard pattern.  Here is what I use
to prevent oplocks on dBASE files:

	[myshare]
	veto oplock files = /*.DBF/*.dbf/*.MDX/*.mdx/

I hope that explanation helps.

Remember too that Paradox databases have a file called PDOXUSERS.NET,
which will typically be stored in the root of a drive.  This file is
used to arbitrate file access and locks between multiple Paradox client
applications.  If using a network drive, this needs to be a common
shared location for all client PC's.  According to the BDE help, if
using Paradox files on a network drive, ALL CLIENT PC's must have the
'NET DIR' parameters set to the same mapped network drive location. 
This is configured in the Paradox driver settings in the BDE
Administration tool....
-- 
/-----------------------------------------------
| Jim Morris  |  Email: Jim at Morris-World.com
|             |    AIM: JFM2001
\-----------------------------------------------



More information about the samba mailing list