Board index » delphi » Problems Running Multiple BDE Programs connecting to SQL Server Database

Problems Running Multiple BDE Programs connecting to SQL Server Database

Hi,

I'm having very bizare problems running multiple BDE (4.5) applications
(Delphi 3.1) simultaneously.  I have two different programs which both
access the same MS-SQL Server database, they share read access with one
table (NOLOCK) and they both peform updates on other different tables.
If I start them at different times, they run perfectly.  If I start them
at the same time, they both lock up and the BDE itself locks up - I
cannot get into the BDE Administrator.

It does not seem to matter if I use SQL Links native drivers or ODBC
drivers, I get this same behavior.   It's not just these two programs, I
have seen this behavior with several programs.

These programs are database monitors and I am using the SQL enterprise
manager to run them as scheduled tasks.  If these programs run
simultaneously, I will get this lock up every other time.

When I check the locks in the SQL enterprise manager, I do not see any
locks on the tables at all.  This is as it should be because I am using
queries with no-lock

I have no clue as to what to look for next.  Can anyone give me some
ideas on what to look at?

-Thanks
Scott

 

Re:Problems Running Multiple BDE Programs connecting to SQL Server Database


Quote
Scott Van Kirk wrote:

> Hi,

> I'm having very bizare problems running multiple BDE (4.5) applications
> (Delphi 3.1) simultaneously.  I have two different programs which both
> access the same MS-SQL Server database, they share read access with one
> table (NOLOCK) and they both peform updates on other different tables.
> If I start them at different times, they run perfectly.  If I start them
> at the same time, they both lock up and the BDE itself locks up - I
> cannot get into the BDE Administrator.

> It does not seem to matter if I use SQL Links native drivers or ODBC
> drivers, I get this same behavior.   It's not just these two programs, I
> have seen this behavior with several programs.

> These programs are database monitors and I am using the SQL enterprise
> manager to run them as scheduled tasks.  If these programs run
> simultaneously, I will get this lock up every other time.

> When I check the locks in the SQL enterprise manager, I do not see any
> locks on the tables at all.  This is as it should be because I am using
> queries with no-lock

> I have no clue as to what to look for next.  Can anyone give me some
> ideas on what to look at?

> -Thanks
> Scott

Hello,
  If it is the BDE that is locking up, try the following:
1) remove all unnecessary aliases from the config file
2) increase MEMSIZE to 24 in the BDE admin tool
3) increase SHAREDMEMSIZE to 4096 in the BDE admin tool

  Scott
--
BDE Support:
 http://www.inprise.com/devsupport/bde
Delphi Support:
 http://www.inprise.com/devsupport/delphi
Common Delphi and BDE Questions and Answers:
 http://www.inprise.com/devsupport/delphi/qanda/

Re:Problems Running Multiple BDE Programs connecting to SQL Server Database


Re:Problems Running Multiple BDE Programs connecting to SQL Server Database


The problem lies with the way the BDE creates temporary files for the
application.  Both of my .exes were in the same directory.  When this happens
each tries to access the same temporary file and they lock up.  I solved the
problem by moving the executables to different directories.  I think I could
have gotten the same results by adding a Tsession and changing its
'PrivateDir' property.

BORLAND:  When you have quirky, stupid, unobvious things like this DOCUMENT
THEM EVERYWHERE!!!!! PLEASE!

-Scott

Quote
Scott Frolich [Inprise] wrote:
> Scott Van Kirk wrote:

> > Hi,

> > I'm having very bizare problems running multiple BDE (4.5) applications
> > (Delphi 3.1) simultaneously.  I have two different programs which both
> > access the same MS-SQL Server database, they share read access with one
> > table (NOLOCK) and they both peform updates on other different tables.
> > If I start them at different times, they run perfectly.  If I start them
> > at the same time, they both lock up and the BDE itself locks up - I
> > cannot get into the BDE Administrator.

> > It does not seem to matter if I use SQL Links native drivers or ODBC
> > drivers, I get this same behavior.   It's not just these two programs, I
> > have seen this behavior with several programs.

> > These programs are database monitors and I am using the SQL enterprise
> > manager to run them as scheduled tasks.  If these programs run
> > simultaneously, I will get this lock up every other time.

> > When I check the locks in the SQL enterprise manager, I do not see any
> > locks on the tables at all.  This is as it should be because I am using
> > queries with no-lock

> > I have no clue as to what to look for next.  Can anyone give me some
> > ideas on what to look at?

> > -Thanks
> > Scott
> Hello,
>   If it is the BDE that is locking up, try the following:
> 1) remove all unnecessary aliases from the config file
> 2) increase MEMSIZE to 24 in the BDE admin tool
> 3) increase SHAREDMEMSIZE to 4096 in the BDE admin tool

>   Scott
> --
> BDE Support:
>  http://www.inprise.com/devsupport/bde
> Delphi Support:
>  http://www.inprise.com/devsupport/delphi
> Common Delphi and BDE Questions and Answers:
>  http://www.inprise.com/devsupport/delphi/qanda/

Other Threads