MsSQL Lock request timeout period exceeded error
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
MsSQL Lock request timeout period exceeded error
Hi,
I converted my project ADO to UniDac. We installed the new version software to the client two weeks ago. Since then my client users start to complain about sql error : "Lock request timeout period exceeded".
I used same parameters as ADO.. Do I have to consider any other parameters?? Any Help?
Thanks
Tugrul
I converted my project ADO to UniDac. We installed the new version software to the client two weeks ago. Since then my client users start to complain about sql error : "Lock request timeout period exceeded".
I used same parameters as ADO.. Do I have to consider any other parameters?? Any Help?
Thanks
Tugrul
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
Re: MsSQL Lock request timeout period exceeded error
Is it too difficult problem? My customer is getting this bug every day, and start to complain about...
Is it side-effect of UniDAC components?
Please help..
Is it side-effect of UniDAC components?
Please help..
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
Hi,
My default creation codes like this.
//Connection Creation
Cn := TUniConnection.Create(Nil);
Cn.SpecificOptions.Values['CommandTimeOut'] := '9000';
Cn.SpecificOptions.Values['LockTimeout'] := '9000';
Cn.Server := Server;
Cn.Database := aDatabase;
Cn.Username := aUsername;
Cn.Password := aPassword;
Cn.LoginPrompt := False;
Cn.ProviderName := aProviderName;
Cn.Connected := True;
//Query Creation
Q := TUniQuery.Create(Owner);
Q.Connection := fUniConnection;
Q.Options.RequiredFields := False;
Q.SpecificOptions.Values['CommandTimeOut'] := '9000';// CommandTimeOut := 900;
Q.LockMode := lmNone;
//UniSql Creation
UC := TUniSQL.Create(Self);
UC.SpecificOptions.Values['CommandTimeOut'] := '9000';
My default creation codes like this.
//Connection Creation
Cn := TUniConnection.Create(Nil);
Cn.SpecificOptions.Values['CommandTimeOut'] := '9000';
Cn.SpecificOptions.Values['LockTimeout'] := '9000';
Cn.Server := Server;
Cn.Database := aDatabase;
Cn.Username := aUsername;
Cn.Password := aPassword;
Cn.LoginPrompt := False;
Cn.ProviderName := aProviderName;
Cn.Connected := True;
//Query Creation
Q := TUniQuery.Create(Owner);
Q.Connection := fUniConnection;
Q.Options.RequiredFields := False;
Q.SpecificOptions.Values['CommandTimeOut'] := '9000';// CommandTimeOut := 900;
Q.LockMode := lmNone;
//UniSql Creation
UC := TUniSQL.Create(Self);
UC.SpecificOptions.Values['CommandTimeOut'] := '9000';
-
- Posts: 32
- Joined: Mon 25 Aug 2008 18:28
Hi Tugrul,Tugrul Tamturk wrote:I don't use transaction sql in the code. If LockMode is lmNone, why Lock timeout request expire ?? Why query try to lock?? I don't understant Unidac lock mechanism..
have you resolved your locking issue in the meantime?
We had similar issues in the beginning and have found that for multi-user usage the lock mode for SQL Server should be pessimistic and for Oracle optimistic. lmNone should only be used in single user application.
Starting with SQL Server 2005 you could also enable Snapshots in the database (requires most likely an alter database statement to allow that and also a specific isolation level).
The issues are not with Unidac at all, but with how SQL Server uses locks on either rows, pages or full tables, which is done automatically and not foreseeable. I'd highly recommend use google to find more explanations and look up the SQL Server documentation on MSDN.
Regards,
Tobias