STRONG SQL Server Blockings OR Deadlocks
Feb 23, 2005
Hello,
Got aprivate webserver with two main sites which generate maximum 800.000 pages vieweved a day...
these are running ASP and SQL Server 2000
FREQUENTLY, SQL Server doesn't respond and seems to be blocked, wich cause all my pages to be unreachable by the fact that my header file open a SQL connection in every page.
I've read a lot of documentation about SQL blocking or deadlocking but shame on me i don't really understand how to easily identify the reason of blocking and far more important, still don't kow the way to STOP these.
Is there a way to set a global parameter to STOP any SQL request wich is longer than 10 seconds let says... ?
I tried SET LOCK_TIMEOUT timeout_period but it seems we have to put it in EVERY transaction... not simple. Further more i tried it and it generated me a lot of errors (example : returning -1 for recordcounts after a request)...
Any help for a newbie SQL user to avoid these blocks ?
View 4 Replies
ADVERTISEMENT
Aug 12, 1998
I need some help in reducing deadlocks in 6.5 I have tested with `Insert Row Locking` turned off and it reduced the number of deadlocks. What i need to know is if removing the foreign key relationships on tables reduces/eliminates Deadlocks. If any of you have any info on this please let me know.
Thanks
Kalyan
View 1 Replies
View Related
Feb 21, 2005
i have an issue regarding the following error message:
[Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID ##) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
this is caused on a couple of ASP pages, which are using:
Code:
recordset.open "sql statement", connection, adOpenKeyset, adLockOptimistic
etc etc
recordset.addnew
etc
recordset.update
This is happening fairly frequently, which can't be a good thing, so would it be worth changing the lock or cursor types to a different one, in particular, adLockPessismistic?
Any pointers or comments would be very welcome.
This is happening on a windows server os, sql server 2000 using classic asp (.asp) pages, connecting to sql server using ado within the asp pages.
View 1 Replies
View Related
Jul 20, 2005
HiI'm having a problem with deadlocks in a table in SQL server whentrying to update it through Biztalk 2004. There is no problem when Iuse the same Biztalk solution to update a similar dummy table, butwhen I try updating the original table in the production database,some transactions are updated successfully whereas others become thevictim of the deadlock (Transaction (Process ID 185) was deadlocked onlock resources with another process and has been chosen as thedeadlock victim. Rerun the transaction). The table that is updated isalso being used by another application that just selects rows from it.As a workaround, I have used recursion in the code that updates thetable. The function is put through a recursive loop whenever thedeadlock exception(#1205) is caught. It keeps on trying to update thetable until the updation is successful or another exception (not thedeadlock one) is caught. i.e.Bool Update_IVR(string amount, string customer_id){Try{//updation code}}Catch (exception ex){If( ex.message == deadlock message){Bool succ =Update_IVR (amount, customer_id) //recursionReturn succ;}Else //error handling code}After introducing this code, the problem did not occur for the next13000 transactions. Then I got the error again four times along with atimeout error (Timeout expired. The timeout period elapsed prior tocompletion of the operation or the server is not responding). Howeverfor the next 17000 transactions (to date) this error has not showedup.ThanksHasan
View 3 Replies
View Related
Jan 3, 2006
Any help with deadlocks ?
I keep getting deadlocks..and can't figure out why....
version of sql server: 8.00.2040 (SP4).
[Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
View 1 Replies
View Related
Sep 14, 1999
Hey,
I am looking for mid to senior level SQL developers for some sweet companies here in Seattle. A chance to work in a dynamic envirnoment with bleeding edge Microsoft technologies. Are you good? then we can help.
shoot me an e-mail.
patc@snowdogs.com
thanks
pat copeland
snowdogs
we are for the people.
View 1 Replies
View Related
May 22, 2006
I am a Newbie to programming and databases and would like to create a simple program for doing full text searching on a SQL database.
I have downloaded and installed Visual Basic 2005 Express, Web Developer 2005 Express, and SQL Server 2005 Express. I have watched several hours of video tutorials and done numerous tutorials. I feel I am making progress and having a lot of fun. My machine is running XP home edition.
I have found the following resource that looks like a good place for me to start with creating a full text search program:
€œSQL Server 2005 Books Online
Item Finder Sample
http://msdn2.microsoft.com/en-us/library/ms160844.aspx
However I am stuck at the beginning with trying to €œgenerate a strong name key file.€? I don€™t know how to €œopen a command prompt€? (I did confess to being a Newbie!!). I searched the database for this forum and found a relevant thread stating that €œSQLCMD is the command-line utility for SQL Server and is included with SQL Server 2005 Express Edition.€? I found the SQLCMD program on my computer but when I opened it, it does appear to provide the options listed below in the tutorial (i.e., €œclick start,€? €œPoint to all programs,€? etc.).
Initially here is what I need based on the first section of the tutorial:
Building the Sample
If you have not already created a strong name key file, generate the key file using the following instructions.
To generate a strong name key file
Open a Microsoft Visual Studio 2005 command prompt. ClickStart, point toAll Programs, point toMicrosoft .NET Framework SDK 2.0, and then clickSDK Command Prompt.
-- or --
Open a Microsoft .NET Framework command prompt. ClickStart, point toAll Programs, point toMicrosoft .NET Framework SDK 2.0, and then clickSDK Command Prompt.
Use the change directory command (CD) to change the current directory of the command prompt window to the folder where the samples are installed.
Note:
To determine the folder where samples are located, click theStartbutton, point toAll Programs, point toMicrosoft SQL Server 2005, point toDocumentation and Tutorials, and then clickSamples Directory. If the default installation location was used, the samples are located in <system_drive>:Program FilesMicrosoft SQL Server90Samples.
At the command prompt, run the following command to generate the key file:
sn -k SampleKey.snk
Important:
For more information about the strong-name key pair, see "Security Briefs: Strong Names and Security in the .NET Framework" in the .NET Development Center on MSDN.
How do I complete this initial step of generating a strong name key file for the tutorial? I guess I am missing something simple and once I get past this I will be able to complete the tutorial. Any help will be greatly appreciated.
View 7 Replies
View Related
Sep 28, 2015
Have any seen Insert statement deadlocking itself ? Most of the articles published by Microsoft says to change the transaction isolation level from Read Committed to Read Committed Snapshot.Below is the XML file on the deadlock
<deadlock>
<victim-list>
<victimProcess id="processe259948" />
</victim-list>
<process-list>
[code]...
View 0 Replies
View Related
Feb 13, 2014
I am not sure if i am looking correctly at the deadlocks but i see deadlocks between two select statements.These statements are being run through an application. Below is the table schema from where the select is being performed
CREATE TABLE [dbo].[CMS_LOCKS7](
[PARENTID] [int] NOT NU, Â --we have a non clustered index on this column
[CHILDID] [int] NOT NULL, --we have a non clustered index on this column
[ISMEMBER] [int] NOT NULL, -- we have a non clustered index on this column
[ORDINAL] [int] NULL,-- we have a non clustered index on this column
[Code] ....
View 12 Replies
View Related
Nov 1, 2006
Hi,My computer crashed and I have had to reinstall all the software. However, when I try to reinstall MSDE (server), it keeps telling me a strong SA password is required and to use the SAPWD to switch it. I cannot find SAPWD files or anyway to change this. After I get this message, the installation process stops. I didn't have this issue the first time I installed everything back in the beginning of September when the class started and before the computer crashed, I had no problem accessing a database using Web Matrix and the same server setup that I'm trying to install right now.If anyone can help me, I would be more than grateful.Thank youCarolyn (Crowbare)
View 3 Replies
View Related
Jul 23, 2005
I urgently need tom use SP3a upgrade the instance of SQLServer200MSDE runing on my local machine but I am having problems in doing so.My first problem is that when I start the set up procedure I get themessage"A strong SA password is required for security reasons. Please useSAPWD switch to supply the same"Currently the sa password isAbc/def/ghk1Which I think is a 'strong password' according to the microsoft rulesathttp://www.microsoft.com/resources/...sword_tips.mspxI would be grateful if someone could confirm that Abc/def/ghk1 is astrong password.If anyone could point me to some published informal help on installingSP3a then that would also be very helpful (I do of course have the MSread me file). If anyone has a sample command line entry for theupdating then I would find that extremely useful. There is oneinstance of MSDE on my machine, named NetSDK.Best wishes, John Morgan
View 6 Replies
View Related
Aug 12, 2006
how do I disable "strong password required"??? because I want to allow to add a user with the config-tool with no strong password
View 1 Replies
View Related
Apr 3, 2005
When I try to install SQL Server I get the follwing message when I click on the installation file :
A strong SA password is required for security
reasons.
Please use SAPWD
switch to supply the same. Refer to readme
for more details.
Setup will now exit.
I've checked the readme but can't really find any info on how to fix this.
I don't know what password this SA password is nor how to change it.
Can anyone help me out?
View 6 Replies
View Related
Jun 3, 2008
Hi folks.
I just tried to perform the install of SQLServer 2005 Express on a Win 2003 SP2 machine and the install failed with the rejection of the SA password. Currently, our pwd is 1 uppercase letter, 4 lowercase letters and 1 number for a total of 6 characters. Other installations on Win 2003 SP1 have worked fine in the past. I read in a recent version of Books Online that the SA pwd guidelines might have recently changed and that 8 characters might now be required.
My question is: do these new 8 character guidelines apply only to the sa pwd or to all logins?
Thanks!
Mike
View 6 Replies
View Related
May 1, 2006
Hello,
I am attempting to upgrade an MSDE SP4 named instance to SQL Express SP1 and it is failing with a message that I must use Windows Authentication to continue the upgrade. The thing that I noticed is that when I specify an '@' sign in my sa password the upgrade fails, but if I specify a "#' sign instead the upgrade runs successfully.
The strong password rules appear to be that
1) the password must be greater than 8 characters
2) at least one character must be from 3 out of 4 of the following:
a) lower case characters
b) upper case characters
c) numeric
d) special characters (non-alphanumeric)
If I install the MSDE SP4 named instance with the password abcd@ABCD the upgrade to SQL Express SP1 fails with the message above. If I install the MSDE SP4 named instance with password abcd#ABCD the upgrade works.
The command I am using to install the MSDE instance is
"setup.exe INSTANCENAME=<instance> SAPWD=<password> SECURITYMODE=SQL"
To upgrade to SQL Express SP1 the command is
"setup.exe UPGRADE=SQL_Engine INSTANCENAME=<instance> SECURITYMODE=SQL" which fails when the sa password contains the "@".
Any help with this issue would be appreciated.
Thanks
View 1 Replies
View Related
Oct 19, 2006
Is this possible to do during installation of express ? Is it possible at all ?
Want to use sql security mode (mixed). I need to build a trial version of software package and want real simple sql server passwords.
View 5 Replies
View Related
Dec 26, 2007
Hi,
I have a little question. I searched google, and could not find good answer for this one.
I have a stored procedure that returns two tables. Usually I generate a dataset out of a stored procedure by dragging it to the dataset.
When I drag this one it creates a DS with only one table, the first one. How can I make it use both tables?
Thank you.
View 2 Replies
View Related
Mar 21, 2013
There are a few databases I work with that have been designed where varchar columns are used to store what actually displays on the front end as Ints, Decimals, Varchars, Datetimes, checkboxes.
I often have to write integrations with these databases bringing data in and prefer to validate the data whilst loading from the staging tables.
I have seen allsorts of values being passed into the staging tables that will load into the target database because the columns are all varchars but the values don't display on the front end because the app actively filters bad values out.
What I would like to do is for my validation scripts to warn up front of potentially invalid datatypes. My problem is that forexample the ISNUMERIC() function return 1 for the value ',1234' but a CONVERT(NUMERIC, ',1234') or CAST(',1234' AS NUMERIC) will fail with a "Error converting data type varchar to numeric).
I've been trying to locate a set of reliable datatype testing functions that will reliably determine if a varchar can be converted to a given data type or not.
View 6 Replies
View Related
Mar 17, 2005
Our system is reasonably complex with a lot of non-trivial stored procedures. As the load on our DB increased we're now getting more and more deadlocks (10 per day or so from about a million stored proc executions).
We try to avoid transactions where we can, and we do attempt to optimse stored procs to steer clear of deadlock conditions, but with the sheer number of stored procedures we can't possibly avoid all deadlock conditions.
One solution I'm considering is to re-run stored procs that failed because of a deadlock. In the .net code we'll run the stored proc, check for a deadlock error and if one happened, wait 100ms and try again.
What do you guys think?
View 8 Replies
View Related
Aug 13, 2002
Hi,
we have a production inviremont that is running for about 10 months. Since a couple of weeks we are having problems with "Deadlocks".
This cant be due to an increase in data size on the tables that are having the issues because these are cleaned in the same transaction that populates them.
These tables are used to store temporary data that the production system needs to calculate the correct price for any given order. This transaction takes between 0.5 to 1 second to commit.
We are running on a dual processor machine with 1 Gb of RAM with SQL Server 7 - sp 3, Windows NT 4 sp 6, Microsoft Transaction Server.
In all our queries and stored procedures we use the optimizer hints (nolock) for select statements and (rowlock) for updates or deletes.
Any help and/or suggestions would be appriciated.
View 2 Replies
View Related
Dec 17, 1998
Is there any way to totally avoid deadlocks. In some critical applications
we have removed transactions entirely, counting on other means to maintain
database consistency. We still get deadlocks in this area. These are mainly
inserts, and the only thing I can think is that updates to the indexes are
causing multiple page locks which result in deadlocks. Is this true?
Will deadlocks be eliminated in 7.0 with row level locking for this situation?
Or will index page splits still cause a possibility of deadlock contention?
Thanks!
ben
View 2 Replies
View Related
Mar 5, 2001
Hi ,
I have a problem with a SP in 6.5. When i try to run a Stored Proc which is a simple select statement dumped into a temp table in a particular database, I lock other users who are tring to log into other databases some in tempdb database. When i try to kill the process the rollback takes almost 45 mins or so..till then no one can log on to the server.
The SP works fine when no one is logged into the Great Plains server. One more thing i observed is that, the SP when run results on a deadlock only when the owner is a user. If the owner is DBO it works fine.
Can anybody throw some light on this.
Thanks in Advance
Siv
View 1 Replies
View Related
Jul 10, 2002
I am getting the following dead lock error message writtent to the Error Log.
How do i interpret this...?
2002-07-10 11:49:52.88 spid3 Node:1
2002-07-10 11:49:52.88 spid3 KEY: 6:1531868524:1 (1e0040209980) CleanCnt:1 Mode: X Flags: 0x0
2002-07-10 11:49:52.88 spid3 Grant List::
2002-07-10 11:49:52.88 spid3 Owner:0x26429de0 Mode: X Flg:0x0 Ref:2 Life:02000000 SPID:62 ECID:0
2002-07-10 11:49:52.88 spid3 SPID: 62 ECID: 0 Statement Type: INSERT Line #: 67
2002-07-10 11:49:52.88 spid3 Input Buf: RPC Event: sp_Save;1
2002-07-10 11:49:52.88 spid3 Requested By:
2002-07-10 11:49:52.88 spid3 ResType:LockOwner Stype:'OR' Mode: Range-S-S SPID:58 ECID:0 Ec:(0x29f534f8) Value:0x2649f0c0 Cost:(0/0)
2002-07-10 11:49:52.88 spid3
2002-07-10 11:49:52.88 spid3 Node:2
2002-07-10 11:49:52.88 spid3 KEY: 6:1695345104:1 (ffffffffffff) CleanCnt:1 Mode: Range-S-U Flags: 0x0
2002-07-10 11:49:52.88 spid3 Grant List::
2002-07-10 11:49:52.88 spid3 Owner:0x26450f20 Mode: Range-S-U Flg:0x0 Ref:1 Life:02000000 SPID:58 ECID:0
2002-07-10 11:49:52.88 spid3 SPID: 58 ECID: 0 Statement Type: INSERT Line #: 250
2002-07-10 11:49:52.88 spid3 Input Buf: RPC Event: sp_IPAQManagerFetchFilterDetail;1
2002-07-10 11:49:52.88 spid3 Requested By:
2002-07-10 11:49:52.88 spid3 ResType:LockOwner Stype:'OR' Mode: Range-Insert-Null SPID:62 ECID:0 Ec:(0x3bb5f4f8) Value:0x2649e040 Cost:(0/2340)
2002-07-10 11:49:52.88 spid3 Victim Resource Owner:
2002-07-10 11:49:52.88 spid3 ResType:LockOwner Stype:'OR' Mode: Range-S-S SPID:58 ECID:0 Ec:(0x29f534f8) Value:0x2649f0c0 Cost:(0/0)
View 1 Replies
View Related
Oct 27, 2004
Hi,
I've got a deadlock problem. The log below has been generated. The problem is that during one day, I have more than 300 deadlocks like it. Before, the were not so many deadlocks.
During past year, the number of users has grow (from 100 before to 500 or 700 now)
*** Deadlock Detected ***
- Requested by: SPID 360 ECID 0 Mode "S"
- Held by: SPID 113 ECID 0 Mode "S"
Index: aaaaa_PK
Table: TABLE_1
Database: MYDB
== Lock: KEY: 22:325576198:1 (ff009ae5078d)
- Requested by: SPID 113 ECID 0 Mode "S"
- Held by: SPID 374 ECID 0 Mode "X"
Index: aaaaa_PK
Table: TABLE_1
Database: MYDB
== Lock: KEY: 22:325576198:1 (ff009ae5078d)
- Requested by: SPID 374 ECID 0 Mode "IX"
- Held by: SPID 360 ECID 0 Mode "S"
Table: TABLE_2
Database: MYDB
== Lock: PAG: 22:1:2428
== Deadlock Lock participant information:
Input Buf: S E L E C T the_rest_of_the_query
SPID: 360 ECID: 0 Statement Type: UNKNOWN TOKEN Line #: 1
Input Buf: s p _ e x e c u t e 8
Input Buf: s p _ c u r s o r 8À B 8 8f ç @ Table I
Input Buf: S E L E C T the_rest_of_the_query
SPID: 360 ECID: 0 Statement Type: SELECT Line #: 1
== Session participant information:
== Deadlock Detected at:
==> Process 360 chosen as deadlock victim
I have done :
- rebuild indexes on all tables (fillfactor 90)
- analysed memory activity
Could a lack of memory be at the origin of the problem ? Which counters in perfmon are significant for memory lack ?
Could the index fill factor could be at the origin of the problem ? At time, it is at 90 percent.
Config : Winnt4 Server, MS-SQL 7 SP4 , 2 GB of RAM , 2 x Xeon 700
Thanks for any help.
View 4 Replies
View Related
Feb 16, 2004
Hi folks,
I have an application built on top of a questionable DB design which requires overcomplicated selects. The application is experiencing deadlocks regularly, in some cases with only one concurrent user.
I set the trace flag 1204 but am not seeing anything in the Error.log and I initiated a trace in profiler which does not seem to show any deadlock.
Despite having recreated the problem which show my browser hanging indefinitely. When I run the following queries:
SELECT spid, waittime, lastwaittype, waitresource
FROM master..sysprocesses
WHERE waittime > 10000
AND spid > 50
SELECT spid, cmd, status, loginame, open_tran, datediff(s, last_batch, getdate ()) AS [WaitTime(s)]
FROM master..sysprocesses p
WHERE open_tran > 0
AND spid > 50
AND datediff (s, last_batch, getdate ()) > 30
ANd EXISTS (SELECT * FROM master..syslockinfo l
WHERE req_spid = p.spid AND rsc_type <> 2)
I get:
55860978LCK_M_XPAG: 13:1:2573
54AWAITING COMMANDsleeping sa 11499
55UPDATE sleeping sa 21499
respectively. Any help would be welcome.
Thanks in advance,
Don
View 9 Replies
View Related
Sep 16, 2007
hi,
We have a SQL 2005 transaction database server that suddenly started to issue deadlock errors last week on most of the databases on that server and a lot of timeout errors. Before that, that database server performed very well and timeouts were minimal to zero. I am not sure what changed for it to have these performance problems.
The only major change we did was to convert several varchar columns to nvarchar in several tables (as part of internationalization initiatives). We did not modify the procs from varchar to nvarchar though but would be doing that phase by phase.
There is also one proc in which we used the snapshot isolation level of sql server 2005. These are only 2 major changes done within the past 2 weeks. Would these be the cause for these deadlocks and timeouts on our web-based application?
Any ideas?
Thx
Sri
View 6 Replies
View Related
Jul 23, 2005
Hi EverybodyI am new to sqlserver 2000.I know basics of locks.but i dont know how toresolve deadlock issues.I am cofusing by reading articles with 90%information and remaining 10% missing.Can any one help me which is the goodsite to learn and resolve deadlocks.Note: I create deadlock. when i try to trace deadlock using dbcc traceon(1205,3604,-1).In error log showing nothing about the deadlock.showing created traceon.........Any help would be appreciated.--Message posted via http://www.sqlmonster.com
View 13 Replies
View Related
Jan 13, 2006
We have a problem with a table giving us deadlock issues and we can'tfigure out why.It's a table we write to fairly often perhaps 50 times a minute. Andalso do a select of 200 rows at a time from 4 servers every 5 minutes or so.We are only keeping 48 hours worth of rows in the table which averagesat 30000 a day on a busy day.This table has 1 PK and 2 FKs plus one TEXT column which does notparticipate in the WHERE clause.We are using binded variables.We have applied the latest patch to SQL2003 server running onWindows2003. The patch is supposed to resolve deadlock issues.Anyone have any advice on how to alleviate this problem.Thanks
View 5 Replies
View Related
Jan 17, 2008
Morning All,
Am getting the following error from a number of users and am sort of wondering where to start in terms of diagnosing the problem. If anyone could give me any pointers on where to start in diagnosing the issue I would be grateful.
"System.Data.SqlClient.SqlException: Transaction (Process ID 282) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
View 1 Replies
View Related
Jul 25, 2002
I know blocks and Deadlocks are different but how related are they? Seems like when I get reports of deadlocks I always have blocks and the blocks grow as time passes.
View 2 Replies
View Related
Oct 10, 2000
My database has been in production for 10 months with no deadlock problems. Three weeks ago I had to restore the database and I am now experiencing several deadlocks. SQL server is suppose to handle this and kill a process to resolve the deadlock but it is not. The deadlock occures on a stored procedure which is a simple select on a table with 187 records. DBCC ran with no problems. Any ideas what might be causing this? Any why is SQL not handling? Your help is greatly appreciated!
View 1 Replies
View Related
Apr 21, 2006
Lock:Deadlock Chain
Exchange
1
16325
2006-04-21 09:20:18.560
Parallel query worker thread was involved in a deadlock
0
Is the process I am running deadlocking with Exchange Server?
The data above is from Profiler.
Thanks
Lystra
View 4 Replies
View Related
Mar 19, 2004
I am conducting stress testing for my website and keep getting deadlocks with the following message when one process is adding about 100 records per second and another process is trying to access the data:
Transaction (Process ID 499) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
What do I need to do in my stored procedures to avoid this? I only have ONE stored prcoedure that locks a row while incrementing an ID value. I am not doing any other locks, so is this a SQL Server system lock?
Any advise would be much appreciated. Thanks!
View 2 Replies
View Related