Excessive Blocking Via .NET SqlClient

Apr 16, 2008

I'm running into a blocking problem on my SQL 2000 server. I have a table that is frequently read/written to (inserts, updates, deletes) -- I don't place any explicity locks but I do a SELECT @@Identity after I insert a record to get the Identity value via a sqlCommand.ExecuteScalar.

So my questions:

#1 Is blocking normal? (40-90 blocks consistantly - 350 or so client connections)
#2 Is there any better coding solution to avoid blocks?
#3 I need to get the Identity value after the recorded is added and I thought ExecuteScalar is the fastest and least overhead, put perhaps I'm wrong?


Any suggestions or hints welcome.

Thanks, Rob.

.NET 2.0

View 4 Replies


ADVERTISEMENT

Excessive Blocking - Runnable Processes

May 23, 2006

Hi there,

Currently using SQL Server 2000 (SP4). The following condition started occurring last week:

- Server has excessive blocking
- Majority of the processes are in runnable state
- Excessive blocking happens for a few mins. and repeats again during the day. Does not happen at night.
- Nothing on the server errorlog, profiler
- CPU averages 40 - 50% at that point of excessive blocking

Any help would be greatly appreciated.

Thanks.

View 7 Replies View Related

Excessive Maintenance ?

Feb 11, 1999

Help !!
I am running a database of 500-600mb 20-30% of which is new data daily (5 day old data being deleted as part of the nightly maintenance) And my nightly maintenance is regularly taking an hour plus.
CheckDB, New Alloc, Catalog, re-indexing and dumps are performed nightly (2am ish) and as the system is in constant use I cannot afford such a long task. I can't use weekly dumps/checkDB as we use transaction log replication and these are dumped every minute. I really need some suggestions on how I can improve matters. The deletion of old data in particular is taking a long time due to the use local variables but is there a faster way to do this :

OPEN tnames_cursor
FETCH NEXT FROM tnames_cursor INTO @connectionid
WHILE (@@fetch_status <> -1)
BEGIN
IF (@@fetch_status <> -2)
BEGIN
Select @dRent = DeliveredRetention from ControlDB..connectiontable
where ControlDB..connectiontable.Cid = @connectionid
Delete from MyDB..Table where Cid = @cid
and DateDelivered != NULL
and Datediff(hh,MyDB..Table.DateDelivered,getdate()) >= (@dRent*24)
END
FETCH NEXT FROM tnames_cursor INTO @connectionid
END
DEALLOCATE tnames_cursor
GO

These jobs have also started running out of locks and deadlocking on occaision which seems odd as the system has 10000 available (escalating at 2000)
Any Suggestions would be very much appreciated

Damon

View 1 Replies View Related

Excessive Memory Usage

Nov 27, 2006

Hi there group.

Could some please point me in the right direction?

We have a database and it's about 28GB in size, recently the SQL server process that runs uses approximately 1.6GB of Memory.

I have tried running SQL profiler to find out which Stored Procedure is causing this but came up unsuccessful.
When restarting SQL the process it run's at about 50MB for about 20sec and then starts climbing up to 1.6GB of memory usage.

Please assist.

View 12 Replies View Related

Excessive Query Execution Times

Mar 16, 1999

We recently upgraded from SQL 6.5 to SQL 7. I have a few .sql files that were each running around 5 - 8 minutes under 6.5. These same files now each take over 30 minutes to run. Has anybody had problems with their queries taking longer to run under 7.0? These files are quite large and are comprised of 3 - 4 batches with several queries in each batch. If anybody has any thoughts on the cause please let me know.

Thanks in advance.

View 1 Replies View Related

Excessive Dtexec Logging Post SP2

Jun 25, 2007

Since the other related topic is closed/answered...



The Short version:

SQL is now logging too much info with every package. The volume of the new "User: Diagnostic" event has caused some packages to fail and the command-line exclusion option appears to have no effect on the events logged to the SQL provider. Is this a bug in dtexec or am I using the wrong syntax to exclude log entries? I don't want to modify all of my SSIS packages...



More Info:

SQL SP2 introduced new logging events, most of which appear to get logged by default. So far, none of our packages have used any sort of explicit logging configuration; it's all been set at the command line using a syntax like shown below:



dtexec.exe /FILE "D:SSIS PackagesMyAppVendors.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REP E;Diagnostic /LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"MyDBConnName"



This does appear to correctly limit what gets logged to the console (and thereby the SQL Agent's job step log), but has no effect on what's logged to the database. Normally, I'd use /REP EWDCI, but I was attempting to limit the log entries to Errors only.



I first came across this error when a package failed, but it only logged the following to the console with nothing in sysdtslog90 (while not the "latest/greatest" server, this is a relatively low-utilized quad 2.8ghz xeon ProLiant DL580 G2):


Error: 2007-06-21 06:01:30.45
Code: 0xC0202009
Source: MYPACKAGENAME Log provider "{0C3CBE9B-D828-41C2-98D2-99BA498B314A}"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Connection is busy with results for another command".
End Error
Error: 2007-06-21 06:01:30.46
Code: 0xC0014010
Source: MYPACKAGESTEP Load
Description: The SSIS logging provider "{0C3CBE9B-D828-41C2-98D2-99BA498B314A}" failed with error code 0xC0202009 ((null)). This indicates a logging error attributable to the specified log provider.
End Error

I changed this one package to only log OnError events, but I'd rather not have to change every package to do the same, plus I'd like the ability to easily turn on verbose or any other logging level when needed.

View 1 Replies View Related

What Shuold Be Considered Excessive Lock Requsts

May 22, 2006

have a 3rd party sql 2000 app, mostly bad sql. have lock issues, when monitoring sql locks/req per second, I get normally between 500,000 and 1,000,000 requests. For a 4 way box with 16 gig of memory, what is considered an excessive amounts of locks.

View 3 Replies View Related

TEMPDB Shows Excessive Size After A Backup.

Apr 18, 2000

I have got SQLv6.5 SP5a with SMS1.2 SP4 on seperate Alpha boxes. I have automated the backups so they are scheduled for after hours. SMS gets backed up first and TEMPDB shortly afterwards. However, since a back log in SMS MIFS has happened, the TEMPDB backup displays of 100,000pages backed up. When you back it up on its own, it only shows 170+ pages.

The SMS DB is 600MB in size, the Log is 210MB, Open objects is 5000, and TEMPDB is set 210MB on its own device.

Any ideas

View 1 Replies View Related

Excessive Stored Procedure [COMPILE] Lock

Jul 23, 2005

Hello!I am trying to investigate strange problem with particular storedprocedure. It runs OK for several days and suddenly we start gettingand lotof locks. The reason being [COMPILE] lock placed on this procedure. Asaresult, we have 40-50 other connections waiting, then next connectionusingthis procedure has [COMPILE] lock etc. Client is fully qualifyingstoredprocedure by database/owner name and it doesn't start with sp_. I knowthese are the reasons for [COMPILE] lock being placed. Is theresomethingelse that might trigger this lock? When troubleshooting this issue, Inoticed there was no plan for this procedure in syscacheobjects. Thestoredprocedure is very simple (I know it could be rewritten/optimized butourdeveloper wrote it):CREATE PROCEDURE [dbo].[vsp_mail_select]@user_id int,@folder_id int,@is_read bit = 1, --IF 1, pull everything, else just pull unread mail@start_index int = null, --unused for now, we return everything@total_count int = null output, -- count of all mail in specifiedfolder@unread_count int = null output -- count of unread mail in specifiedfolderASSET NOCOUNT ONselect m1.* from mail m1(nolock) where m1.user_id=@user_id andfolder_id=@folder_id and ((@is_read=0 and is_read=0) or (@is_read=1))orderby date_sent descselect @total_count = count(mail_id) from mail m1(nolock) wherem1.user_id=@user_id and folder_id=@folder_id and ((is_read=0 and@is_read=0)or (@is_read=1))select @unread_count = count(mail_id) from mail m1(nolock) wherem1.user_id=@user_id and folder_id=@folder_id and is_read=0GOI was monitoring server for a couple of day before and I am not surewhythis happens every 3-4 days only!Any help on this matter would be greately appreciated!Thanks,Igor

View 1 Replies View Related

Database Growth Excessive When Changing Varchar Length From 50 To 100.

Aug 9, 2007



Hi all,

I'm trying to get an understanding of a serious problem I have with a large DB in production. This is going to be obvious to someone (everyone probably) <bg>

I have a table which consists of numerous varchars and ints but also a Text type field. This table resides in a SQL 2000 Database. This DB currently has a data file size of 16Gb and a Transaction Log size of 17Gb. When I edit the table and increase the size of a Varchar field from 50 to 100 these files grow to more than double their size!

Why is this happening and how can I prevent this?

TIA

NozFx

View 1 Replies View Related

DB Design :: Database XYZ Has More Than 1000 Virtual Log Files Which Is Excessive

Jun 8, 2015

I am getting this massage in error log .

"Database XYZ has more than 1000 virtual log files which is excessive. Too many virtual log files can cause long startup and backup times. Consider shrinking the log and using a different growth increment to reduce the number of virtual log files."

I am using  sql server 2008r2.

View 5 Replies View Related

SQL Server 2000 Cluster - Excessive Page Faults

Jul 31, 2007

We are running SQL Server 2000 Enterprise Edition on a 2-node cluster with IIS/ASP.NET front-end hosting 150-200 active connections. There is a SVCHOST process running under LOCAL SERVICE account - hosting the Remote Registry process that is using only 4,200K but is page faulting 200-500 times per second. I realize this process is used for failover, but the page fault seems excessive. Any thoughts on this?

The servers are running Windows Server 2003 with 4 processors and 4gb RAM.

View 1 Replies View Related

Excessive Network Usage With SQL 2000 To SQL 2005 Transactional Replication

Aug 3, 2007

We have a SQL2000 database (Publisher) replicating inserts and updates across a 10Mb link to a SQL 2005 database (Subscriber). The Publisher has two tables we are interested in, 1 with 50 columns and 1 with 15. Both tables have 6 insert/update triggers that fire when a change is made to update columns on the publisher database.
We have set up a pull transactional replication from the Subscriber to occur against the Publisher every minute. We have limited the subscription/replication configuration to Publsih 6 columns from table 1 and 4 from table 2. Any change occuring on any other columns in the Publisher are of no interest. The SQL 2005 database has a trigger on table 1 and table 2 to insert values into a third table. There are around 7,000 insert/updates on table 1 and 28,000 on table 2 per day. All fields in the tables are text.
We are seeing "excessive" network traffic occuring of approximately 1MB per minute (approx 2GB per 24 hrs). We also see that the Distributor databases are getting very large -- upto around 30GB and growing until they get culled. We have reduced the culling intrval from 72 hrs to 24 hours to reduce the size.
Does anyone have any suggestions as to how this "excessive" network traffic can be minimised and how the distributor database size can be minimised. I think that maybe they are both related?

Thanks,
Geoff
WA POLICE

View 5 Replies View Related

SQL 2005 Server (SP2) To SQL 2005 Express (SP2) Replication Looping/Excessive Repl Times

Sep 25, 2007

We have a large number of clients attempting to replicate two publications on 2005 Express databases (2 publications subscribed to the one subscriber database) with our 2005 Server (9.00.3042.00 SP2 Standard Edition) and experiencing two significant problems:

1) Users experience the following message:

The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload).

This problem should not apparently occur with SQL Server 2005 (or 2005 Express) instances with SP2 applied. All clients experiencing this problem have SP2 installed as does our Server and the retention period is 30 days. The subscribers have been replicating well under that.


2) Replications never succeed after appearing to replicate/loop around for hours

This issue is the most critical as we have clients who have been installed and re-installed with new instances of SQL Server 2005 Express, new empty databases (on subscriber before snapshot extraction), and using fresh snapshots (less than an few hours old) which cannot successfully replicate.

Interestingly there is at least 1 instance where several computers are subscribed and successfully replicating the same database as another where replication refuses to succeed.

To test we have taken a republished database from another 2005 Server which is working fine and restored it to the same server as the one holding the database with which we are experiencing problems and subscribed to it. This test worked fine and replication of both publications went through fast and repeatedly without showing any signs of problem.

This indicates that the problem is perhaps data related as it appears localised to that database.

Below are two screenshots which may assist.

Screenshot 1 Shows that on the server side the replication attempts look like they are succeeding despite the fact that the subscriber end does not indicate success. Also the history indicates the the subscription has spent all it's time initialising and not merging any changes.

Screenshot 2 Shows a rogue process which has appears on many of the problem child subscribers. It shows a process running with no end time even though the job indicates failure in the message and even though other replication attempts appear to have succeeded after it. This process stays in the history showing that it is running even when I can find no corresponding process for it.

Can anyone suggest a further course of action/further testing/further information required which may assist?

This is extremely urgent and any assistance would be greatly appreciated!

Thanks in advance!

Scott

View 5 Replies View Related

Sqlclient

May 17, 2006

Hi Experts
I'm facing a weird problem with asp.net application and windows 2000 based client PC having IE 6.0 SP1, i have asp.net web application which have a form that have a facility to search for customer using its ID and application will bring the data from the database that record and users will be able to update the record.
Once updated, then i just want to query data for same customer id, application is not bringing updated record from the database but it showing the old record and once the IE closed and reloaded then it shows the correct record.
The same feature works fine, under windows xp machine having IE 6.0 SP2, that proves that there is no problem with my application or code but its windows 2000 client having problem.
I tried to update the windows 2000 machine with all the patches from microsoft but no success same problem.
Any help on this issue will much appreciated.
Regards
Bhavesh
 

View 2 Replies View Related

SQLClient Efficiency

Jul 24, 2007

Hi guys,
Since the project that i'm developing is rapidly increasing, the pages seems to be getting slower everytime you view it. I would like to ask if code below would be efficient enough for several simultaneous request of data or if you have any other suggestions, you are welcome to add:
1    Public Shared Function QueryDatabase(ByVal sql As String) As DataTable2    3                ' SQL Server Connection Object Variable4                Dim _oConnection As SqlConnection5                ' SQL Server Command Object Variable6                Dim _oCommand As SqlCommand7                ' SQL Server Data Adapter Object Variable8                Dim _oAdapter As SqlDataAdapter9                ' DataTable Object Variable (Early Binding)10               Dim _oDataTable As New DataTable11   12               ' Instantiate Connection Object with connection string13               _oConnection = New SqlConnection("Data Source=XXX.XXX.XXX.XXX;Initial Catalog=XXXXXX;User=XXX;Pwd=XXX;")14               ' Instantiate Command Object with SQL String and Connection Object15               _oCommand = New SqlCommand(sql, _oConnection)16               ' Instantiate Data Adapter Object with Command Object17               _oAdapter = New SqlDataAdapter(_oCommand)18               ' Fill the DataTable Object with the retrieve records19               _oAdapter.Fill(_oDataTable)20   21               ' Release resources used by DataAdapter Object22               _oAdapter.Dispose()23   24               ' Release resources used by Command Object25               _oCommand.Dispose()26   27               ' Close the connection of the Connection Object from SQL Server28               _oConnection.Close()29   30               ' Release resources used by Connection Object31               _oConnection.Dispose()32   33               ' Return the retrieve records34               Return _oDataTable35   36           End Function Thanks a lot.

View 2 Replies View Related

Weirdness In .NET Sqlclient?

Mar 4, 2008

Hi All: I'm having problems creating a data connection between a windows 2000 server running .net 2.0 and a sql2005 server (server2003). I'm trying to create a connection in VWD2005 express, and when I use the visual wizard, I get a connection error with something about "named pipes" when I'm trying to connect using an alias on the server that uses tcp/ip (the alias is created in cliconfg).
If I click on "advanced properties" in the connection, and I select "TCP/IP" for the Network Library, what's displayed is "TCP/IP (DBMSGNET)" ...but shouldn't it say "DMBSSOCN"?
I'm wondering if this is correct, or a cosmetic bug in the .net sqlclient GUI, or indicative of any underlying problem that's preventing me from creating the connection?
If I manually override the connection string in web.config by entering "Network Library: DBMSSOCN", I still can't connect, getting a timeout error that the sql2005 server is not responding. But I know the server is working properly, with other .NET DB connections working within the same application...so I'm thinking this must be a problem with VWD and/or the .net framework on my local computer (not the server)?
I don't know where to begin to look to debug this problem?

View 2 Replies View Related

SqlClient Vs. OleDb

Mar 6, 2005

Hi.

Somewhere around I find a message, which affirmed that for perfonmance it is better to use OleDb for SQL 6.5. Is this true?.

Then el SqlClient, only have perfomance in SQL 2000?

View 1 Replies View Related

SqlClient Vs OLEDb

Feb 29, 2008

I am porting a VB.NET application using Access as its backend to use SQL Express as its new backend.
The application uses .NET 2.0 OleDbProvider to connect to the database.

The porting of the database itself to Sql Express is nearly complete, now I need to modify the application.
So, does it really make sense to modify it to use Native Sql Client instead of OleDb in terms of effort & benefits???

Moreover, if I continue using OleDb, would I need to make such small changes to embedded Sql statements like using single quotes around strings or dates instead of double quotes or pound symbols that are currently being used for String or date data respectively???

View 4 Replies View Related

Blocking

Aug 15, 2000

One sql transaction is in rollback state and optimization job is trying to restructure index on the same table that this transaction is using. As a result,
transaction is in 'blocking' state and optimization job is in 'blocked' state. 'Kill process' doesn't do anything. How can this situation be resolved?

View 1 Replies View Related

Blocking

Nov 26, 2001

Is it possible that blocking can occur between a select and update statements running at the same time on the same object??thanks for the reply!
Sheila.

View 1 Replies View Related

Self Blocking SP4

Nov 1, 2007

Anyone out there having "self blocking" issues since upgrading to SP4 on SQL 2000? Enabing trace flag 9059 has not helped, is this a parallelism issue ?

thanks,
Paul

View 7 Replies View Related

Blocking When Doing Bcp

Jan 6, 2004

Any ideas?

I execute a sproc from QA.
It interogates a folder:


Select @Command_String = 'Dir ' + @FilePath + '*.txt'
Insert Into XLAT_Folder exec master..xp_cmdshell @Command_String
[/code[


Which I then Parse and get the details...

Set up a CURSOR (Booo hiss....)

[code]

DECLARE XLAT_Folder CURSOR FOR
SELECT Create_Time
, File_Size
, [File_Name]
FROM XLAT_Folder_Parsed
ORDER BY [File_Name]





WHILE FETCH STATUS = 0
BEGIN
BEGIN TRAN


Then, based on the methodology that the file name must match the table and format file (I check to make sure everything is out there)

I then bcp the data in using my connection pooling id (I'm logged on as sa in qa)



SET @cmd = 'bcp ' + @db_name + '..' + SUBSTRING(@File_Name,1,CHARINDEX('.',@File_Name)-1) + ' in '
+ @FilePathAndName
+ ' -f' + 'd:DataTax' + SUBSTRING(@File_Name,1,CHARINDEX('.',@File_Name)-1) + '.fmt'
+ ' -S' + @@servername + ' -U -P'

SET @Command_string = 'EXEC master..xp_cmdshell ''' + @cmd + '''' + ', NO_OUTPUT'

INSERT INTO #XLAT_BCP_Results(Col1) Exec(@Command_String)




MOVE DATA FILE TO ARCHIVE
COMMIT TRAN
ANOTHER FETCH



A spid is launched to do the bcp...I have 4 files...on the last load The connection Pooling lauched spid gets blocked by the sa spid that launched the sproc...it doesn't happen all the time, just most of the time....

I've put a trace on in Profiler, but I don't see anything...I've picked the event class of deadlocks...but I never see it...

When I do sp_who, it shows the blocking...

I'm so confused....

View 8 Replies View Related

Blocking

Aug 31, 2006

Hi just read an article on the internet that states

"A quick way to resolve a blocking problem is to disconnect the connection blocking the rest of the users. All you have to do is ask your database administrator to execute the KILL statement. Obviously, this is not a permanent solution, and won't really help anything except take care of an immediate need."

Now when i run sp_who ... i see that the spid that is blocking is the same as the spid itself....

Now the above article states that killing the one that is blocking the rest of the other spids is ok ...

But what if its the same SPID that is blocking ...what does it signify & whats the solution

Thanks

View 2 Replies View Related

Blocking

Nov 13, 2007

Hi Gurus,

I am running a simple SELECT statement on my TempDB

SELECT * FROM TempDB..SysObjects

When I run this , it's getting blocked by some other Process which is not at all relevant to the above Qry. First it gets blocked by one Stored Proc say Proc1 ( The Proc1 is just a SELECT statement on a table which just has four rows ). So I just kill this PROC1 and again its gets blocked by some other stored Proc PROC2 which again is a simple stored Proc and it runs in not time.

Any Suggestions as to where to start.

Thx in Advance

Venu

View 13 Replies View Related

Blocking

Jul 23, 2005

hi,I am using SQL SERVER 2000.Problem that i am facing is when ever I check locks in EnterpriseManager I findfollowing blocking - :1) sp_cursoropen;12) sp_cursorclose;13) sp_cursorfetch;1We dont have any control over application(source code).Whateverwe have to do, has to done from database side.can anyone guide me to solve this problem.Thanks

View 4 Replies View Related

Problem With My SQlClient Login

Aug 14, 2007

OK, I am an dinosaur, I am still using ASP.NET 1.1 with an MS Access database. However, I am being forced to upgrade from Access to SQL Server. I have converted the Access database using the Access Upsize wizard and everthing went fine. When I go into my ASP.NET app the Database shows up fine and I can list the data with no problems.
When I try to open the new data base in the code behind I get the following error: System.Data.SqlClient.SqlException: Login failed for user 'WIRELESSINFOASPNET"
Where the WIRELESSINFO is the name of my server. I have checked the permissions on the SQL Server directory and Sub directories where the actual data tables are located and the ASPNET Machine Account (WIRELESSINFOASPNET) has full control. Can anyone help out on this. Thanks, Art

View 4 Replies View Related

System.Data.sqlclient

Sep 22, 2007

 
i have installed visual express and sql express.
but the problem is  i want to add the connection string manuallty in visual studio express 2005.
so i want to add a reference of sql.data.sqlclient but could not add ?
i am not sure what is the problem or is am i missing anything
 

View 7 Replies View Related

System.Data.SqlClient

Feb 1, 2008

 
I am not able to add the namespace "system.data.SqlClient"  and not able to get the intellisense for sqlconnections. I have only vs2005.  i do not have sql management express
or sql server 2005
 

View 16 Replies View Related

SQLClient Cursor/recordset

May 15, 2008

hi, I want to work with a recordset/cursor with sqlserver sqlclient, I have a sqlconnection and sqlcommand, I need to scroll forward and back.

View 1 Replies View Related

SqlCe &&amp; SqlClient In One Application

Jan 17, 2008

Hi,
Can I use SqlCe v3.1 and SqlClient v2.0 in one .net application? (Note: I can't use RDA or replication. SqlClient read and write data in ON-LINE mode, SqlCe store and manipulate with data in OFF-LINE mode.)

View 4 Replies View Related

System.Transactions / SqlClient Bug?

Oct 14, 2005

Hi,
I've been doing some work with nested TransactionScope classes and timeouts and I'm getting some strange results that I can't quite explain.  I'm hoping that I've done something foolish in my code, since that will be by far the easiest fix :)
The scenario is that I have a stored procedure that may block indefinately (arguably not great, but it's outside of my control) - in the example below, it does a simple "waitfor" to pause for 3 seconds.  There is a intermediate data layer between my application code and the database that wraps all database calls in a TransactionScope (essentially the ExecCommand method in the example).  At the application layer, we create a TransactionScope with a timeout, then call into the data layer to perform the query (the application layer is the Main method in the example).
The behaviour I'm seeing is that the initial call will block within SQL Server until the current executing SQL command completes (in this case, the waitfor).  At that point, the batch is terminated and control returns to the C#.  Within the C# there are no errors until the outer TransactionScope is disposed; the only apparent way of detecting that the batch didn't complete is to examine the Transaction.Current.TransactionInformation.Status property.  I can just about live with that (although would have prefered that the ExecuteNonQuery had thrown); the example checks this status property and throws an exception if it's bad.
So far, so good.  It all goes very wrong if I attempt to make another call.  If the connection has the "connection reset" property set to false, then the second call fails immediately with a "transaction in doubt" error.  If the "connection reset" property is set to true, then the second call completes successfully, except the database doesn't get called! (In profiler, you see the exec os sp_reset_connection, but that's all).  It all looks as if I've not tidied up properly, but I'm not sure what I've missed.  To add some spice, putting a 1 second sleep before the Execute makes everything work as expected.
The sample code is below; sorry if it's a little large.  There a connection string right at the top that you may need to tweak.  It creates a stored procedure in the initial catalog; see line 95 for details - it's nothing offensive!  The sample compiles just fine from the command line with no special options needed.
Finally, I'm running .Net v2.0.50727 and the Sept. CTP of SQL Server 2005.
Here's hoping someone can tell me what I've done wrong!
Cheers,
Steve
using System;

View 2 Replies View Related

Sql Blocking Problem

Dec 13, 2007

I have one batch jobs running 4 time a day and web application.
We have hosted the site long time already but this month we are facing the store procedure blocked problem.
The problem is that when user submit the form when during the execution of batch job, two storeprocedure are blocked.
 One store procedure that is using from batch job read the table "A" and another store procedure that is using from web app update the table "A".
Then deadlock is occure. but i don't understand it is hosted long time already. Please let me know if you know how to solve this issue.
 Thanks,
Aung

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved