.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Database blocking while performing a transaction scope?

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :Sql Server


I was running my application where i enter a transaction scope and perform a number of transact-sql statements. I was doing this while running the application in VS2008 in debug mode. My question is if i take a break while the debugger is at a breakpoint, will this block other users from using the database?


ilikecoding but i also like to take a break every once a while... :-)

View Complete Post

More Related Resource Links

SQL Server Database Transaction

A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

Dropping and linking multiple items within the same editing scope transaction

Hi, I'm using IActivityTemplateFactory.Create to provide a custom experience when the user drops a toolbox item onto my Flowchart designer.  The implementation of IActivityTemplateFactory.Create is to use the model item tree to programmatically create multiple model items (related to activities), and link them together using the appropriate model item properties and connector view state.  All this works fine except for one thing. Say I'm dropping three activities as a result of IActivityTemplateFactory.Create.  I want the first activity to appear at the top, underneath should be the second activity and below that the third activity.  I want all three activity designers to appear alighned around their center point and there to be a straight, centered connection arrow between activity one and two and another straight, centered connection arrow between two and three.  Here's some ASCII art (we'll see how the formatting is retained - not very well it seems): |-----------------| | Activity 1 | | | |-----------------| | | | \/ |--------------| | Activity 2 | |--------------| | | | \/ |----------| |Activity 3| |----------|  It's important to note that the activity designers all not all the same size; both the height and width can vary. I've written code that looks at the various activity

Transaction log for database 'adv' is full?

Iam getting the error. the error is as follows The transaction log for database 'ADV' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases. But i have seen the log_reuse_wait_desc column in sys.databases. the status is "CHECKPOINT".  previously i have seen the status is "NOTHING" when previously i got this error. Can you please help on this..? Thanks Anil

SQL blocking + Sharepoint database +


Environment :- MOSS 2007 (Sp1)
Issue:- SQL blocking to the sharepoint related database.


1)      What would be causing this?

2)      What steps can be taken to avoid this?

Dropping and linking multiple items within the same editing scope transaction - Part 2



In an earlier forum post, I asked about how to drop multiple items from the toolbox onto the design surface, have them arranged nicely, and do all this in a single editing transaction.  In that post, Kenny came up with a nice solution.

There's one more scenario that I didn't discuss in the earlier post, that I was hoping to be able to resolve on my own after getting the other post answered.  But, I I'm afraid I need some more help.

The scenario is the same as in the earlier post with one additional complication.  One of the items I'm dropping as part of the drag/drop operation is a FlowSwitch node.  If I did nothing else, the solution presented in the earlier forum post would work.  However, I've an additional need to visually change the appearance of the FlowSwitch designer. Normally, one can change an activity's designer (even a built in activity) by using the metadata store.  However, the FlowSwitch is unique in that the Flowchart designer has hard-coded knowledge of the FlowSwitch designer, and if you replace the built in designer via the metadata store, there are numerous places where the Flowchart designer will generate exceptions and pop up error messages.  I also have the need t

SSIS - DB - The transaction log for database 'PROD' is full


Good day,

I get the following message "The transaction log for database 'PROD' is full" the DBA cleared it up last week and is currently on leave & and i urgently need to complete before the end of weekend.

It is a liv Database, how do i Safely clear the Transaction Log?





When creating a database and SETing defaults should the TSQL statments be packaged as a transaction?


I'm a long time programmer but new to ADO & TSQL...

I'm looking to DROP (if it exists) and then CREATE a database in C#/ADO and then make some calls to ALTER DATABASE [myDB] SET ....

Since these are all affecting the master db, should these calls be wrapped inside of a transaction and if so at what IsolationLevel?

Thanks in advance - PMB


Transaction Scope and Batches



I have the following scenario:

From an MVC client I want to choose some items I need to delete. The actual deletion is carried out using a WCF service operation, and to aid performance the service operation allows a collection of items to be deleted rather than the client (MVC) having to call the method for each item.

The behaviour I have is that if one or more of the items fail to be deleted, the successful items remain deleted. For example, if I have 10 items to delete but 3 fail then 7 items remain deleted, i.e. the failure of one item does not mean the rest of the items abort. However I still want each individual delete to be within their own Transaction.

My question is where do I place the Transaction scope? 

Should I have the collection service simply do a foreach on each item and call another service which has the TransactionScope defined?

I hope this makes sense.



Is there a systematic way to know whether a DMV is server-scope or database-scope

If there is any, is there a systematic way to know whether a DMV is server-scope or database-scope according to its name or some other properties. I looked some dmv's up on msdn but just get confused. Thanks

State Machine workflow Transaction Scope


Hi All,


THis is regarding the Transaction Scope in STATE MACHINE Workflow.

We are using .NET 3.5 version of WWF.

The requirement is as follows:

Assume we have two states S1 and S2. S1 has got task T1 and S2 has got Task T2.

Completion of task T1 will ensures that we will move out of state S1 and will enter into next step S2 and get the new task T2 initiated.

Assume due to some error Task T2 doesnt get initiated, the requirement is system should roll back to State S1 and task T1 should be available to user to complete again.

Till now we havent found any solution where in TRANSACTION SCOPE spread across states?

Any idea how to attain this? Any solution to it..


Thanks in advance


Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

IP Address Blocking or Restriction in SQL Server

"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.

.RRAS IP Filter

Adding Rows in GridView without using a Database

This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend