.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

Read Committed Snapshot vs Snapshot isolation

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

Hi all,

Can someone show me with an example what the difference betweent these two are?

please help me

View Complete Post

More Related Resource Links

Isolation Level set to Read Committed Snapshot, Deadlock Graph shows Read Committed


I must misunderstand something here. I have altered the DB to allow READ_COMMITTED_SNAPSHOT and some deadlock situations have been solved. Nevertheless, in a very similar situation, I'm getting deadlocks and the deadlock graph (XML) shows me the following:

isolationlevel="read committed (2)"

What do I miss here?



Merge Replication: How to give read access on snapshot share to a sql account

Hello All, I want to give read access to an sql account(not windows account). Can it be given or not. Someone please tell. Thanks saandii777

Snapshot isolation transaction aborted due to update conflict.

To avoid deadlocks, we switched from ReadCommittedSnapshot isolation to SnapShot isolation for a SQL Server database at the database level and transaction level in the client code. Now, when two users perform concurrent operations on the database through the client, one of the clients get this error: "Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.cust_table' directly or indirectly in database 'cust_database' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement."What can we do to avoid deadlocks and update conflicts at the same time? (The same code with Oracle database and Oracle client works without any issues with the default Read Committed Snapshot isolation level)

What type of isolation is this "READ COMMITTED (2)"


I get below in Blocked Process Report. I understand READ COMMITTED, but what (2) signifies? Also why process status is listed as "suspended"?


 <process status="suspended" waittime="97" spid="55" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2010-09-29T12:25:08.143" lastbatchcompleted="2010-09-29T12:25:08.023" clientapp="Internet Information Services" hostname="WEBAPP6" hostpid="2216" loginname="masteruser" isolationlevel="read committed (2)" xactid="735041142" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">

Snapshot Isolation Levels


I have a customer that is getting long blocking chains caused by reporting against OLTP data. I have successfully setup replication to report against a subset of the tables for another customer and this has worked fine. The only downside to this, besides the replication performance impact, is that if many reports are running and updates are happening at the same time, the second report (and up) will be blocked. The blocking chain is the first report blocks the replication agent which blocks the second report and so on. This is probably acceptable but I want to make sure it is the best option. Therefore, I would like to look into using either read committed snapshot isolation (RCSI) or the snapshot isolation (SI).

1) Are RCSI and SI mutually exclusive options? From my testing, I could turn on one without turning on the other. However, I read a blog that said you can only turn on SI once RCSI has been turned on for the database. Is this true? I am assuming the blog was wrong.

2) If I only turn on SI and only ever use a "SET TRANSACTION ISOLATION LEVEL SNAPSHOT" statement in read only reports, the application (non-reports) should function the exact same correct? (Excluding the added tempdb space used). Obviously a huge dilemma with setting any of these snapshot levels is trying to prevent the changes to how the applicati

How to take a snapshot pic from a (.mp4/.3gp) video file ?


Hello there,

I need some help with video embedding in ASP.NET. So I am developing a litle custom blog and I need users to upload Quick Time videos (.mp4,.3gp) but I also need when upload completes to take a snapshot from the uploaded video which should be used as a link to a page that plays the video, in other words I need to take a frame from this video file... Do you have any idea how this is possible??

Thanks in advance

Initialize snapshot fro alternate location - multiple .bcp files for an article

I have to replicate over 50GB of data over a slow network.  I did not use the option to initialize snapshot from database backup because the replication articles contain row filters.  If I do that, I'll have to run a lot of scripts to remove the data and other unnecessary database objects on the subscriber. Instead, I created a workaround.  On the publisher, I first create the actual push subscription to the target subscriber on the publication.  This subscription is set not to initialize from snapshot.  I then created a second push subscription on the same publication, but the subscriber is a random database on the publisher server.  This second subscription is a dummy subscription set to initialize from snapshot - the purpose is to generate the necessary snapshot files.  I then reinitialized all subscriptions and generate the new snapshot files. On the subscriber, an empty database is created with the same tables as the publisher database.  I created an identical publication on this empty database, and a dummy push subscription on the target subscriber.  The subscription is reinitialized, and the snapshot files on the empty database is created.  These dummy snapshot files are then overwritten with the actual snapshot files created on the publisher, and then I synchronize the the dummy subscriptions with the actual sn

Help! "You must rerun snapshot because current snapshot files are obsolete" every 90 minutes!

I'm having difficulty with SQL Server replication getting machines in the field to replicate correctly.   Here are the specifics of my installation:   100 remote tablet PCs using web sync to update. 1/2 running Vista, 1/2 XP (all latest updates applied) SQL Server Express 2005SP2 w/ cumulative update 6.   Server: Win2003 (all latest updates) SQL Server 2005SP2 CU6   There is 1 database. For each tablet I create a separate publication (PUB001, PUB002, PUB003, etc.) with filtered articles containing data for the tablet. Each publication has a single subscription -- the tablet to which the subscription is assigned. Subscriptions are set to expire after 14 days. Snapshot agent was run when subscription was created, and is set to run automatically every 14 days.     This is a "test" system which is scheduled to roll out into production in 2 weeks.   For the past month I have been running 6 tablets A-OK with no problems (had 6 separate publications/subscriptions on the server/tablets).   I use a stored procedure to create the publications and subscriptions. This stored procedure hasn't changed in months.   Yesterday, we added another 6 tablets w/ separate publications on the server, using the same aforementioned stored procedure.     The tablet application is set to auto-sync over the internet every 15 minutes.   Starting yesterday afternoon, at random, tablets would st

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

How to let a non admin business user run a replication snapshot job?

According to the msdn library, I would have to give the non admin user (User1) SQLAgentUserRole privileges. But it also says that it has to be a local job and not a multi server job. Is the snapshot agent job a local or multi server job? Considering the snapshot agent is a local job and i make USER1 the owner of that job. He should be able to run the job rite? I need to give USER1 the ability to run sp_start_job to start the snapshot agent ONLY! (and not any other jobs). So what are the steps to do this? I also read that the only way to achieve this is by creating a proxy account? Is there an article somewhere that best describes this?  

Merge Replication, Push Subscription : The snapshot takes centuries to apply

Well, not centuries, except that the users are storming the gate. I'm trying to find how to get the snapshot moved to the subscriber and applied in a reasonable time. Last time was successful, but took 2 1/2 days to build the subscriber database from the snapshot. Hillary responded: Something is very wrong here. You should be able to generate your snapshot, copy it manually over to the subscriber - using the altsnapshotfolder parameter and then apply it there. So now I have my snapshot, a folder with lots of .cft .bcp .dri .prc .sch  and .trg files. Getting this to the subscriber computer shouldn't take long. Once I get it there, how do I use it to get the subscriber set up?  You can't be successful at this unless you're at least 1/2 a bubble off level.

Getting counts by 2nd Date Dimension Attribute with Snapshot Style Fact Table

  I have an MDX question finding hard to solve.  I have a Snapshot Fact Table with a snapshot of the records in the source system for each batch date.  All records in the fact table are assigned the batch date with the batch date key.  There are many records for each day and each batch date is an entire copy of the source records.  So, the grain of the fact table is one record for each batch date that exists in the source system.  These facts rows have another date in them for when the record was entered.  This date is different from the batch date in that the batch date is based on the day the batch was processed and the entered date is based on when the record was entered.  If a record was entered many days before, its batch date will be today but its entered date will be several days ago.  Therefore each day a copy of all the records entered the previous batch date and all the records added on today's batch date are present. Fact Table : FactSnaphshotKey (surrogate for easier administration) BatchDateKey (link to batch date dimension – date dimension, first in dimension list so it is used for semi aggregate measures) EnteredDateKey (link to entered date dimension – date dimension) Facts Count – measure for fact table - default measure from Analysis Services cube 2 Dim

change snapshot agent user (Agent security)

Hi, we have replicated dbon sql server 2008 (transaction replication) now we want to change the user used for the snapshot agent, from sql Managment studio go to publication property and then agent security and then snapshot agent (now we are using domain user) here we want to use the other option which is " to be run under sql server agent service account" but I couldnt choose this option because its unactive so how we can activate this option for existing replication without restarting the replication (i can use this option for the new replication wizard) Thanks

Snapshot report with matrix sometimes does not display data ... rerun report and it does

Hi All, I am having a strange problem with a snapshot report that is scheduled through Report Manager and runs once a day at approximately 18:30 each evening. The report contains a column chart with a textual category, numeric data, and a date series. Above the chart, is a matrix containing the value of the last bar in each series, and the average value of all bars in the series.  Here's a screen capture of what the report looks like: http://img832.imageshack.us/img832/185/wipu.png The problem is that sometimes the matrix is missing.  The chart still displays properly and all the data is correct.  If I rerun the report manually, and save a new snapshot, the matrix re-appears. For the past 6 months this report has been running flawlessly.  In the past 3 weeks, the problem has occurred twice.  I don't know why. Why would the matrix disappear?  What is causing this, and how can I fix it?  Any ideas? I'm using SSRS 2008. Thanks in advance for any insights. Regards, --DanDJAnsc

A query in Snapshot replication ---- Please help !!!!!

Hi,     I have a SQL Database with different roles and users,depends upon their roles,permissions,they can see some table,views and etc.     Now,I am going to replicate (Snapshot) the same Database into different server.    My query is, in the source database incase if they do some changes in the roles,permissions,adding roles/updation of users happens, the same will be replicated in the  destination databsase as well? One of my friend told that ,snapshot replication just deals with records inside the Database and does not deal with users/roles/permissions...Is that so?

How to "infill" snapshot facts by repeating last non-empty value

I have a cube with a typical snapshot structure and daily granularity (like inventory quantities). I would like to be able to remove some of the granular data from this cube, because we have something like 270,000,000 rows of source data, cube processing is slow, and there isn't a meaningful difference from one data point to the next, at the day level. However, users want a graduated level of detail - daily detail for the recent past, then monthly or quarterly for older periods. Doing that would help the situation BUT - they also want charts that "appear" to show data for each data point and not have "holes" between one data point and the next. So here's the question: if I have a cube with a snapshot fact table, and the table has daily values for the most recent 30 days, then monthly values for 6 months, then quarterly values for two years prior, is there any sane way to make output from the cube "spoof" the gaps, by repeating the last snapshot value for each "empty" day? In other words, if I deliver a chart over the whole time period, I want it to have plateaus that repeat the last non empty value across each gap in the data, but without incurring the storage penalty of keeping all those values.

which is best Snapshot Replication or Transaction Replication for my requirement?

Hi,    We have a main transaction database where all the live data is there.Now, to run a reporting application,we need a  different database, but the data is as EXACTLY as the live database.So,probaly every noght aroung 1 0'clock,we want to sync these two databases.   In this scenario,which is better, Snapshot replication or Transaction Replication? what are the pros and cons of using them? As I am new to this things,ur answers would be very much helpful..
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