Multi User Database Issue

Xbase++ 2.0 Build 554 or later
Message
Author
dbroder@nycourts.gov
Posts: 10
Joined: Thu May 10, 2018 9:47 am

Re: Multi User Database Issue

#11 Post by dbroder@nycourts.gov »

Auge_Ohr wrote:
dbroder@nycourts.gov wrote:
skiman wrote:Hi,
Are you using indexes? It looks as you don't? You really need indexes!
Thanks for your response. We are using indexes.
did you use NTX or CDX :?:
Hi. We are using CDX

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Multi User Database Issue

#12 Post by Auge_Ohr »

dbroder@nycourts.gov wrote:
Auge_Ohr wrote:
dbroder@nycourts.gov wrote: Hi. We are using CDX
so you must have a own DBESYS ... please show it
greetings by OHR
Jimmy

dbroder@nycourts.gov
Posts: 10
Joined: Thu May 10, 2018 9:47 am

Re: Multi User Database Issue

#13 Post by dbroder@nycourts.gov »

[quote="Auge_Ohr"][quote="dbroder@nycourts.gov"][quote="Auge_Ohr"][quote="dbroder@nycourts.gov"]
Hi. We are using CDX[/quote][/quote][/quote]so you must have a own DBESYS ... please show it[/quote]

[code]
PROCEDURE dbeSys()
SET COLLATION TO // Use strict ASCII sorting
SET DATE TO AMERICAN // mm/dd/yy

DbeLoad("DBFDBE",.T.)
DbeLoad("FOXDBE",.T.)
DbeLoad("NTXDBE",.T.)
DbeLoad("CDXDBE",.T.)
DbeLoad("DELDBE",.T.)

IF !DbeBuild( "DELCDX", "DELDBE", "CDXDBE" )
ALERT("DELCDX Database Engine is not created", {"OK"} )
ENDIF

IF !DbeBuild( "FOXCDX", "FOXDBE", "CDXDBE" )
ALERT("FOXCDX Database-Engine is not created", {"OK"} )
ENDIF

IF !DbeBuild( "DBFNTX", "DBFDBE", "NTXDBE" )
ALERT("DBFNTX Database-Engine is not created", {"OK"} )
ENDIF

IF !DbeBuild( "DBFCDX", "DBFDBE", "CDXDBE" )
ALERT("DBFCDX Database-Engine is not created", {"OK"} )
ENDIF

DbeSetDefault("FOXCDX")
DbeInfo( COMPONENT_DATA, FOXDBE_LOCKRETRY, 100000)
DbeInfo( COMPONENT_DATA, FOXDBE_LOCKDELAY, 10)
DbeInfo( COMPONENT_DATA, FOXDBE_LIFETIME, 0)
DbeInfo( COMPONENT_DATA, FOXDBE_CREATE_2X, .F. )
DbeInfo( COMPONENT_DATA, FOXDBE_LOCKMODE , FOXDBE_LOCKMODE_VISUAL )

DbeSetDefault( "DBFCDX" )
DbeInfo( COMPONENT_DATA, DBFDBE_LOCKRETRY, 100000 )
DbeInfo( COMPONENT_DATA, DBFDBE_LOCKDELAY, 10 )
DbeInfo( COMPONENT_DATA, DBFDBE_LIFETIME, 0 )
DbeInfo( COMPONENT_DATA, DBFDBE_LOCKOFFSET, 1000000000 )

DbeInfo( COMPONENT_ORDER, CDXDBE_LOCKRETRY, 100000)
DbeInfo( COMPONENT_ORDER, CDXDBE_LOCKDELAY, 1 )
DbeInfo( COMPONENT_ORDER, CDXDBE_LIFETIME, 0 )
DbeInfo( COMPONENT_ORDER, DBE_LOCKMODE, LOCKING_STANDARD )
RETURN
[/code]

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Multi User Database Issue

#14 Post by Auge_Ohr »

hi,

i wonder that you are using FOXCDX and (!) DBFCDX :?:
your last DbeSetDefault() is using "DBFCDX". did you switch it in you App :?:

CDXDBE_LIFETIME does not exist. look at CDXDBE (ORDER Komponente)
greetings by OHR
Jimmy

dbroder@nycourts.gov
Posts: 10
Joined: Thu May 10, 2018 9:47 am

Re: Multi User Database Issue

#15 Post by dbroder@nycourts.gov »

Auge_Ohr wrote:hi,

i wonder that you are using FOXCDX and (!) DBFCDX :?:
your last DbeSetDefault() is using "DBFCDX". did you switch it in you App :?:

CDXDBE_LIFETIME does not exist. look at CDXDBE (ORDER Komponente)
We inherited this code so I'm not sure why the dbesys has a reference to FOXCDE.

We have the xbase help for 2.0 (we are using 1.9) wasn't sure if the CDXDBE_LIFETIME was removed in 2.0 so we left it in place in the dbesys. I can remove it. Thanks/

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Multi User Database Issue

#16 Post by Auge_Ohr »

hi,

more Comment
*_LIFETIME are for DATA-Component not for ORDER-Component
i recommend to remove hole "DBFCDX" DATA-Component, just use "FOXCDX" DATA-Component

Code: Select all

DbeInfo( COMPONENT_ORDER, CDXDBE_LOCKDELAY, 1 )
that is less than default ... :snooty:
*_LOCKRETRY and *_LOCKDELAY default value most working well (since v1.5x)
FOXDBE (DATA-Komponente) have FOXDBE_LOCKMODE
CDXDBE (ORDER Komponente) have CDXDBE_MODE and DBE_LOCKMODE
CDXDBE_MODE must be same Type like FOXDBE_LOCKMODE :!:
DBE_LOCKMODE i recommend default LOCKING_STANDARD until all run stable.
greetings by OHR
Jimmy

dbroder@nycourts.gov
Posts: 10
Joined: Thu May 10, 2018 9:47 am

Re: Multi User Database Issue

#17 Post by dbroder@nycourts.gov »

Auge_Ohr wrote:hi,

more Comment
*_LIFETIME are for DATA-Component not for ORDER-Component
i recommend to remove hole "DBFCDX" DATA-Component, just use "FOXCDX" DATA-Component

Code: Select all

DbeInfo( COMPONENT_ORDER, CDXDBE_LOCKDELAY, 1 )
that is less than default ... :snooty:
*_LOCKRETRY and *_LOCKDELAY default value most working well (since v1.5x)
FOXDBE (DATA-Komponente) have FOXDBE_LOCKMODE
CDXDBE (ORDER Komponente) have CDXDBE_MODE and DBE_LOCKMODE
CDXDBE_MODE must be same Type like FOXDBE_LOCKMODE :!:
DBE_LOCKMODE i recommend default LOCKING_STANDARD until all run stable.
Thank you. We will try your recommendations

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Multi User Database Issue

#18 Post by Auge_Ohr »

dbroder@nycourts.gov wrote:Thank you. We will try your recommendations
don't forget to create Index NEW (not REINDEX)
greetings by OHR
Jimmy

User avatar
alepap
Posts: 94
Joined: Tue Jul 28, 2015 5:15 am

Re: Multi User Database Issue

#19 Post by alepap »

I had this problem 2 years ago, and at that time, Kaspersky anti-virus was causing this.
I remove the Kaspersky and used only Defender and my problem was solved.

A few months ago, the very slow situation came back, around october 2018. I realize that it comes when a file is open in shared mode and another user is trying in exclusive mode.

If I use all files access, always in EXCLUSIVE MODE, I don t get the slow situation.
If I use SHARED and EXCLUSIVE, I get the slow situation.

The solution for me was to make sure that the file is always OPEN in SHARED mode at the beginning of the program, and no function would try to open the file in EXCLUSIVE mode.

I also installed the SMB2 patch from Alaska on all computers, Windows 7, Windows 8, Windows 10.

Post Reply