Showing posts with label fact. Show all posts
Showing posts with label fact. Show all posts

Friday, March 23, 2012

proclarity question

Hi,

I have a question regarding Proclarity viewer and whether it can assists me.

I have a UDM as follows.

A fact table containing a sale for each salesman. There can be more that one row per salesman

This Fact is connected to a dimension dim_salesman that hold details about each salesman and other more dimensions.

Another fact containing a number of vacations each salesman took. There is more that one row per salesman.

This fact also connected to the same dim_salesman and and other more dimensions.

I want to inquire for example - how many vacations and sales each saleman had, sliced by the dim_saleman.

If I uses a pivot table excel to view a report that contains data from both fact tables I get wrong data.

Is the proclarity viewer able to browse 2 different fact tables and join them to a single report?

Thank for you help.

Hello. Both ProClarity Professional 6.2 and Excel 2007 can create reports from data in two separate fact tables.

This is not as much a client question but how you have related the two measure groups(fact tables) in the cube editors dimension usages tab. In SSAS2005 one cube can have several fact tables(measure group).

HTH

Thomas Ivarsson

Tuesday, March 20, 2012

processing time issue

Hi all,

I have a quick question regarding the processing time.

I created view in db for the count purposes with huge fact table. ( I'm using dimension table which

joins the 1 fact and 1 dimension to count the key for the fast data retrieval)

If I write the query for the count in management studio and it gives a results within 5 sec.

But, if I add this view in DSV and process the cubes than it takes around 50 minutes.

This causes due to the Fact table? or what else?

I don't know what to check and please give me some comments.

Thanks in advance.

Have you run a profiler trace against the server. You could probably trace either SQL or SSAS to capture the exact SQL statement that is being executed. If this view is being used as a fact table SSAS will do a full scan of it and do a look up for each row to each of the associated dimensions. Doing a trace against SSAS might give you some more hints on what is going on. There are also a number of SSAS specific counters in Performance Monitor that might give some insight into what is going on.|||

Hi Darren,

Thanks for your good tips.

As you mentioned above, the view looks up for each row of associated dimension (fact table). In the Fact, total number of rows is around 153,000,000 and it makes cube processing very slow now.

So to improve better performance and faster processing what would you recommend in this situation? I only need the count of store number not that huge fact table.

Please give me some comments.

Thanks.

|||

There would be a couple of possible approaches to improving the processing performance.

One would be to partition the fact table so that you only process recent records and not the full 153 million.

Another might be to look at doing incremental processing. If you can keep track of which records are new since you last processed, you can just load those.

Finally you could possibly do a "group by" in your view to reduce the granularity, but often reducing the granularity reduces the flexibilty of your design and would generally be a last resort.

Processing one 'fact partition or measure group' weekly, while others are daily?

Is this possible to have done in 2 different (or 1 intelligent) AS deployment script(s)? Sunday would be the full processing day, while other days would just handle the smaller fact areas.

You could use Integration Services with XMLA scripts to accomplish this...

Frank

|||

Is this type of thing something that's available in standard edition? I tried making a new connection with type of Integration Services, but I'm not sure where to go from there, as the object exlorer appears to give no options to make a new package or whatever route I'd need to take to make a new schedule.

Could you provide more info as to how it would be created and then scheduled (or is this a manual thing if not an option provided by SSIS)?

|||

Yes, this is available in the standard edition.

how to create an SSIS package: http://msdn2.microsoft.com/en-us/library/ms141178.aspx

This thread explains a couple of different ways to do this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1626707&SiteID=1

Frank|||

I will take a look over the article. Thanks.

I also want to ask again, is it possible to process all fact tables but one (not by specifying the name of the facts, but only the name of the one I don't want to process)?

Processing methodology

we have 3 large fact tables with combined rec cnts of 32 million. These 3 fact tables share order attribute that we would like to pull out and create a order dimension so that the facts tables don't have to contain the attributes. I've tried update processing of this dimension but the time it takes is not much different than a full process. I would like to know if there is anything like a incremental processing of this dimension and how would I set that up?

I assume that you are using Analysis Services 2005?

Actually, the "Process Update" method is slow than doing a "Process Full" on a dimension. The reason for this is, that "Process Update" reads the entire dimension table and compares the content of this with the existing, processed dimension. Any differences are then updated in the OLAP dimension. "Process Full", on the other hand, does not have to make any comparisons - it simply reads the entire dimension table and builds the OLAP dimension.

Now, the main reason for using "Process Update" is that is does not invalidate your processed measure groups. If you do a "Process Full" on the dimension, you are forced into doing a "Process Full" on any measure group that contains this dimension. Note, that "Process Update" will invalidate the aggregations on any associated measure group, provided that changes have occured to the dimension. This means, that a "Process Update" on the dimension will have to be followed by a "Process Index" on the associated measure groups in order to get aggregations back.

Monday, March 12, 2012

Processing Cube hangs

Hi,

I have a problem with processing my cube. My fact table (with telephone data) contains about 400,000 records... which is increasing rapidly (400,000 records is about 8 months of data)...
I have a few dimensions:
Dimension User: about 200 records
Dimension Line: about 200 records
Dimension Direction: 4 records
Dimension Date: 365 records for each year
Dimension TimeInterval: with 24 intervals

So far so good... when I process this dimension I have no problem....
However, when I add a dimension (CalledNumber, with exactly 101 records) the processing hangs as soon as it starts...

The SQL performed when processing the cube looks like this:
[CODE]
SELECT field1, field2,... fieldn
FROM table1, table2,.... tablem
WHERE
(table1.id=table2.table1id)
AND
(table2.id=table3.table2id)
...
[/CODE]

When I execute above SQL in the Query Analyser from SQL Server Enterprise Manager, it ALSO hangs...

I am not really suprised by that, because this SQL first create a huge table of 400,000 x 200 x 200 x 4 x 365 x 24 x 101 records and after that works through the WHERE statements to filter out the appropriate records.

for me it would be more logical to use the following code to process the cube, but that cannot be changed in Analysis Manager:
[CODE]
SELECT field1, field2,... fieldn
FROM table1
LEFT JOIN table2 ON (table1.id=table2.table1id)
....
LEFT JOIN tablem ON (tablem.id = tablem-1.tablemid)
[/CODE]

When I execute above SQL in the Query Analyser from SQL Servel Enterprise Manager, it does NOT hang, but performs the query in about 35 seconds....
But Analysis Manager does not allow me to change the SQL used for processing the cube...

What can I do to add more dimensions to my cube... (It will be more anyway after adding the CalledNumber dimension)?
any suggestions?

PS. forgot to mention: I use Sql Server 2000

For people who have the same problem... on another forum I got an answer (Thanks Darren Gosbell) which gave me the solution:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olapdmad/agoptimizing_1qr7.asp

Processing after new data

I'm trying to build a cube in the "real world" for the first time. I had my fact table populated with one day's worth of data, set up my time dimension using named calculations based on a datetime within the DS View of the fact table (a la the Larsen book), then built and deployed and everything worked great.

However, when I added the next day's worth of data into the fact table and tried to get it to process incrementally (and then fully), the processing fails and it looks like it's complaining about those named calculations that worked so well on day one. Any thoughts on what I might be missing here? Thanks

Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_fact_ALI, Column: YearOfBid, Value: 2006; Table: dbo_fact_ALI, Column: QuarterOfBid, Value: 2006Q2; Table: dbo_fact_ALI, Column: MonthOfBid, Value: 200607; Table: dbo_fact_ALI, Column: DayOfBid, Value: 20060702; Table: dbo_fact_ALI, Column: HourOfBid, Value: 00:00. Errors in the OLAP storage engine: The record was skipped because the attribute key was not found. Attribute: Time Key of Dimension: Dim Time from Database: ALI DM 2, Cube: ALI DM 2, Measure Group: Fact ALI, Partition: Fact ALI, Record: 577. Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation. Errors in the OLAP storage engine: An error occurred while processing the 'Fact ALI' partition of the 'Fact ALI' measure group for the 'ALI DM 2' cube from the ALI DM 2 database.

You must process each dimension before the cube if you have updated your source system since the last day.

HTH

Thomas Ivarsson

Wednesday, March 7, 2012

Process Hangs

the OK status is:

I build 12 fact table point to 12 partitions, and a father-son dimention. the dimention get to the fact table by the key column(son). I processFull,processUpdate the dimention, it run well. I processFull the cube or the partition, it run well too.

The Hangs status is:

I use the Process Dimention component in the SSIS. I chose the dimention, and use an ole db Source component point to the dimention table,and in it I use a query to chose the new row:"select from AgentDim where newdata=1". In the IDE, run the package, it's OK. Then I save the package to file system, and run it by Sql Server Job Agent.

Then it hangs, the job to run the package never stop. I stop the AS service and restart it. And I get into the Management Studio, and try to Process, then found it hangs.

I tried ProcessFull, ProcessAdd, ProcessUpdate, I tried deal with cube,dimention and any object, all hangs. It seem to AS is already dead.

God save me.

thanks.

Further Info: the query to chose the new row will return 0 rows.

Found Something, I think I found a bug.

The Hangs status happened when you do this:

The query to chose the new row returns 0 rows, that will make SSIS try to put a NULL set into AS,but AS don't know how to deal with such a NULL set, so it just keeps stop there.

This is really make me angry. We will get new rows everytime if we processAdd? Ofcause not.

Saturday, February 25, 2012

process cube but leave transaction open?

We have a massive cube. All but one of the fact tables are by 3am. But the final fact table isn't loaded in the SQL data warehouse until 11am. The users want the cube processed and available as immediately as possible. But the cube can't show ANY updated data until it shows ALL updated data including the fact table from 11am. Any thoughts on making this happen?

One option would be to process the cube at 3am in another database. Then process the final measure group at 11am. Then use the Synchronize command to get those changes to the live database soon after 11am. But there are two drawbacks... 1) This requires twice the amount of disk space as before and 2) I can't figure out a way to synchronize two databases on the same server.

Another option would be to process the cube at 3am but leave that transaction open (so end users can't see the new data) for 8 hours until you process the final measure group and then close the transaction. This doesn't seem like a good plan, but I wanted to hear people's thoughts.

I would certainly experiment with leaving transaction open for 8 hours. I don't see why it doesn't seem like a good plan to you. Note, that you will still have doubled usage of disk space, since two versions will be coexisting for the 8 hours.|||

Well, maybe it's not a dumb idea. I guess the reason I was worried about it is just my relational background and the idea to never leave transactions open. But I guess that doesn't matter in this case.

So my main concern with the technical feasibility is whether the server will clean up the idle session (in so doing cancel the transaction). Am I going to have to run some cheap discover function ever 5 mins for 8 hours to keep the session alive? Any other way?

Thanks for the feedback Mosha.

|||

If server canceling the idle session becomes a problem - you can always bump up the session expiration timeout.

|||

I've got this working. Cube processing is broken up into two parts with the connection being dropped in between. Just like you said, it works fine. Just had to bump up the IdleOrphanSessionTimeout setting.

There is one problem, though. If we get a failure on part 2 of the processing (like if there's an invalid dimension key in a fact table) then that failure rolls back the entire transaction, not just the stuff being processed during part 2. Wondering if there's a way around this. I can walk you through reproducing this against Adventure Works:

First, change the query binding of the Reseller_Sales_2004 partition of the Reseller Sales measure group to be:

SELECT [dbo].[FactResellerSales].[ProductKey],-999 as OrderDateKey,[dbo].[FactResellerSales].[DueDateKey],[dbo].[FactResellerSales].[ShipDateKey],[dbo].[FactResellerSales].[ResellerKey], [dbo].[FactResellerSales].[EmployeeKey],[dbo].[FactResellerSales].[PromotionKey],[dbo].[FactResellerSales].[CurrencyKey],[dbo].[FactResellerSales].[SalesTerritoryKey],[dbo].[FactResellerSales].[SalesOrderNumber],[dbo].[FactResellerSales].[SalesOrderLineNumber],[dbo].[FactResellerSales].[RevisionNumber],[dbo].[FactResellerSales].[OrderQuantity],[dbo].[FactResellerSales].[UnitPrice],[dbo].[FactResellerSales].[ExtendedAmount],[dbo].[FactResellerSales].[UnitPriceDiscountPct],[dbo].[FactResellerSales].[DiscountAmount],[dbo].[FactResellerSales].[ProductStandardCost],[dbo].[FactResellerSales].[TotalProductCost],[dbo].[FactResellerSales].[SalesAmount],[dbo].[FactResellerSales].[TaxAmt],[dbo].[FactResellerSales].[Freight],[dbo].[FactResellerSales].[CarrierTrackingNumber],[dbo].[FactResellerSales].[CustomerPONumber]
FROM [dbo].[FactResellerSales]
WHERE OrderDateKey >= '915' AND OrderDateKey <= '1280'

(Note that "-999 as OrderDateKey" will cause a failure.)

Second, pull up the directory contains the 2004 partition for Internet Sales. (On your computer it should be something like c:\program files\Microsoft SQL Server\mssql.2\OLAP\data\Adventure Works DW.0.db\Adventure Works DW.18.cub\Fact Internet Sales 1.18.det\Internet_Sales_2004.16.prt) After part 1 completes, you'll see the number of files in this directory double. After part 2 fails, you'll see those new files disappear as the transaction was rolled back.

Then, compile a little VB.NET app, put a breakpoint on the Sleep command so you can see the number of files in that 2004 partition directory double. Then run it:

Public Shared Function Main(ByVal args As String()) As Integer

Dim sServer As String = "localhost"

Dim sDatabase As String = "Adventure Works DW"

ProcessPart1(sServer, sDatabase)

System.Threading.Thread.Sleep(5000) 'simulate a break in the program

ProcessPart2(sServer, sDatabase)

End Function

Public Shared Sub ProcessPart1(ByVal sServer As String, ByVal sDatabase As String)

Dim server As New Server()

server.Connect(sServer)

Dim database As Database = server.Databases.FindByName(sDatabase)

'save the session ID so we can retrieve it later and connect to this session later

'alternately, it could be saved to a SQL database instead

database.Annotations.SetText("ProcessCubeSessionID", server.SessionID)

database.Update(UpdateOptions.Default, UpdateMode.Update)

server.BeginTransaction()

Try

Dim cube As Cube = database.Cubes.FindByName("Adventure Works")

Dim mg As MeasureGroup = cube.MeasureGroups.FindByName("Internet Sales")

mg.Process(ProcessType.ProcessFull)

'after processing has succeeded, change the orphan session timeout

'to 24 hours so that this session we're about to leave open won't timeout

'before we're done with it

server.ServerProperties("IdleOrphanSessionTimeout").Value = CStr(24 * 60 * 60)

server.Update()

'false means don't end session

'leave the session open so we can connect to it later

'and continue with the open transaction

server.Disconnect(False)

'don't commit the transaction now

'leave it open until we finish the processing later

Catch ex As Exception

server.RollbackTransaction()

'blank out the ProcessCubeSessionID annotation

database.Annotations.SetText("ProcessCubeSessionID", Nothing, True)

database.Update(UpdateOptions.Default, UpdateMode.Update)

server.Disconnect(True)

Throw

End Try

End Sub

Public Shared Sub ProcessPart2(ByVal sServer As String, ByVal sDatabase As String)

Dim server As New Server()

server.Connect(sServer)

Dim database As Database = server.Databases.FindByName(sDatabase)

Dim oldSession As String = database.Annotations.GetText("ProcessCubeSessionID")

If String.IsNullOrEmpty(oldSession) Then

Throw New Exception("Was not able to find the existing session which " _

& "processed the other 95% of the cube and has the open transaction! " _

& "The cube will not be processed.")

End If

server.Disconnect(True)

Try

server.Connect(sServer, oldSession)

Dim cube As Cube = database.Cubes.FindByName("Adventure Works")

Dim mg As MeasureGroup = cube.MeasureGroups.FindByName("Reseller Sales")

mg.Process(ProcessType.ProcessFull) 'BUG?: if this fails, it rolls back the transaction!!!

server.CommitTransaction()

'blank out the ProcessCubeSessionID annotation

database.Annotations.SetText("ProcessCubeSessionID", Nothing, True)

database.Update(UpdateOptions.Default, UpdateMode.Update)

'set this property back to the default now that

'we're done needing orphan sessions to survive

server.ServerProperties("IdleOrphanSessionTimeout").Value = _

server.ServerProperties("IdleOrphanSessionTimeout").DefaultValue

server.Update()

server.Disconnect(True) 'true means to end session

Catch ex As Exception

'there was a problem with the last 5% of the processing...

'so leave the session open so the problem can be corrected and we can

'start with 95% of the processing from earlier in the morning

'being completed already

server.Disconnect(False) 'false means don't end session

Throw

End Try

End Sub

If you search for the line in the code which has a comment saying "BUG?" that's where the processing fails because of our tweak to the partition query. When that processing fails.

|||

I'd still like to hear if anyone knows a workaround, but I've posted this as a bug:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=278000

|||I expect the bug that you filed to be resolved "By Design". The definition of the transaction is that it either fully succeed or fully fails. That's the letter "A" in the ACID definition - A for Atomicy. You have very long transaction, but it doesn't matter - if anything fails within transaction, the entire transaction is rolled back.

process cube but leave transaction open?

We have a massive cube. All but one of the fact tables are by 3am. But the final fact table isn't loaded in the SQL data warehouse until 11am. The users want the cube processed and available as immediately as possible. But the cube can't show ANY updated data until it shows ALL updated data including the fact table from 11am. Any thoughts on making this happen?

One option would be to process the cube at 3am in another database. Then process the final measure group at 11am. Then use the Synchronize command to get those changes to the live database soon after 11am. But there are two drawbacks... 1) This requires twice the amount of disk space as before and 2) I can't figure out a way to synchronize two databases on the same server.

Another option would be to process the cube at 3am but leave that transaction open (so end users can't see the new data) for 8 hours until you process the final measure group and then close the transaction. This doesn't seem like a good plan, but I wanted to hear people's thoughts.

I would certainly experiment with leaving transaction open for 8 hours. I don't see why it doesn't seem like a good plan to you. Note, that you will still have doubled usage of disk space, since two versions will be coexisting for the 8 hours.|||

Well, maybe it's not a dumb idea. I guess the reason I was worried about it is just my relational background and the idea to never leave transactions open. But I guess that doesn't matter in this case.

So my main concern with the technical feasibility is whether the server will clean up the idle session (in so doing cancel the transaction). Am I going to have to run some cheap discover function ever 5 mins for 8 hours to keep the session alive? Any other way?

Thanks for the feedback Mosha.

|||

If server canceling the idle session becomes a problem - you can always bump up the session expiration timeout.

|||

I've got this working. Cube processing is broken up into two parts with the connection being dropped in between. Just like you said, it works fine. Just had to bump up the IdleOrphanSessionTimeout setting.

There is one problem, though. If we get a failure on part 2 of the processing (like if there's an invalid dimension key in a fact table) then that failure rolls back the entire transaction, not just the stuff being processed during part 2. Wondering if there's a way around this. I can walk you through reproducing this against Adventure Works:

First, change the query binding of the Reseller_Sales_2004 partition of the Reseller Sales measure group to be:

SELECT [dbo].[FactResellerSales].[ProductKey],-999 as OrderDateKey,[dbo].[FactResellerSales].[DueDateKey],[dbo].[FactResellerSales].[ShipDateKey],[dbo].[FactResellerSales].[ResellerKey], [dbo].[FactResellerSales].[EmployeeKey],[dbo].[FactResellerSales].[PromotionKey],[dbo].[FactResellerSales].[CurrencyKey],[dbo].[FactResellerSales].[SalesTerritoryKey],[dbo].[FactResellerSales].[SalesOrderNumber],[dbo].[FactResellerSales].[SalesOrderLineNumber],[dbo].[FactResellerSales].[RevisionNumber],[dbo].[FactResellerSales].[OrderQuantity],[dbo].[FactResellerSales].[UnitPrice],[dbo].[FactResellerSales].[ExtendedAmount],[dbo].[FactResellerSales].[UnitPriceDiscountPct],[dbo].[FactResellerSales].[DiscountAmount],[dbo].[FactResellerSales].[ProductStandardCost],[dbo].[FactResellerSales].[TotalProductCost],[dbo].[FactResellerSales].[SalesAmount],[dbo].[FactResellerSales].[TaxAmt],[dbo].[FactResellerSales].[Freight],[dbo].[FactResellerSales].[CarrierTrackingNumber],[dbo].[FactResellerSales].[CustomerPONumber]
FROM [dbo].[FactResellerSales]
WHERE OrderDateKey >= '915' AND OrderDateKey <= '1280'

(Note that "-999 as OrderDateKey" will cause a failure.)

Second, pull up the directory contains the 2004 partition for Internet Sales. (On your computer it should be something like c:\program files\Microsoft SQL Server\mssql.2\OLAP\data\Adventure Works DW.0.db\Adventure Works DW.18.cub\Fact Internet Sales 1.18.det\Internet_Sales_2004.16.prt) After part 1 completes, you'll see the number of files in this directory double. After part 2 fails, you'll see those new files disappear as the transaction was rolled back.

Then, compile a little VB.NET app, put a breakpoint on the Sleep command so you can see the number of files in that 2004 partition directory double. Then run it:

Public Shared Function Main(ByVal args As String()) As Integer

Dim sServer As String = "localhost"

Dim sDatabase As String = "Adventure Works DW"

ProcessPart1(sServer, sDatabase)

System.Threading.Thread.Sleep(5000) 'simulate a break in the program

ProcessPart2(sServer, sDatabase)

End Function

Public Shared Sub ProcessPart1(ByVal sServer As String, ByVal sDatabase As String)

Dim server As New Server()

server.Connect(sServer)

Dim database As Database = server.Databases.FindByName(sDatabase)

'save the session ID so we can retrieve it later and connect to this session later

'alternately, it could be saved to a SQL database instead

database.Annotations.SetText("ProcessCubeSessionID", server.SessionID)

database.Update(UpdateOptions.Default, UpdateMode.Update)

server.BeginTransaction()

Try

Dim cube As Cube = database.Cubes.FindByName("Adventure Works")

Dim mg As MeasureGroup = cube.MeasureGroups.FindByName("Internet Sales")

mg.Process(ProcessType.ProcessFull)

'after processing has succeeded, change the orphan session timeout

'to 24 hours so that this session we're about to leave open won't timeout

'before we're done with it

server.ServerProperties("IdleOrphanSessionTimeout").Value = CStr(24 * 60 * 60)

server.Update()

'false means don't end session

'leave the session open so we can connect to it later

'and continue with the open transaction

server.Disconnect(False)

'don't commit the transaction now

'leave it open until we finish the processing later

Catch ex As Exception

server.RollbackTransaction()

'blank out the ProcessCubeSessionID annotation

database.Annotations.SetText("ProcessCubeSessionID", Nothing, True)

database.Update(UpdateOptions.Default, UpdateMode.Update)

server.Disconnect(True)

Throw

End Try

End Sub

Public Shared Sub ProcessPart2(ByVal sServer As String, ByVal sDatabase As String)

Dim server As New Server()

server.Connect(sServer)

Dim database As Database = server.Databases.FindByName(sDatabase)

Dim oldSession As String = database.Annotations.GetText("ProcessCubeSessionID")

If String.IsNullOrEmpty(oldSession) Then

Throw New Exception("Was not able to find the existing session which " _

& "processed the other 95% of the cube and has the open transaction! " _

& "The cube will not be processed.")

End If

server.Disconnect(True)

Try

server.Connect(sServer, oldSession)

Dim cube As Cube = database.Cubes.FindByName("Adventure Works")

Dim mg As MeasureGroup = cube.MeasureGroups.FindByName("Reseller Sales")

mg.Process(ProcessType.ProcessFull) 'BUG?: if this fails, it rolls back the transaction!!!

server.CommitTransaction()

'blank out the ProcessCubeSessionID annotation

database.Annotations.SetText("ProcessCubeSessionID", Nothing, True)

database.Update(UpdateOptions.Default, UpdateMode.Update)

'set this property back to the default now that

'we're done needing orphan sessions to survive

server.ServerProperties("IdleOrphanSessionTimeout").Value = _

server.ServerProperties("IdleOrphanSessionTimeout").DefaultValue

server.Update()

server.Disconnect(True) 'true means to end session

Catch ex As Exception

'there was a problem with the last 5% of the processing...

'so leave the session open so the problem can be corrected and we can

'start with 95% of the processing from earlier in the morning

'being completed already

server.Disconnect(False) 'false means don't end session

Throw

End Try

End Sub

If you search for the line in the code which has a comment saying "BUG?" that's where the processing fails because of our tweak to the partition query. When that processing fails.

|||

I'd still like to hear if anyone knows a workaround, but I've posted this as a bug:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=278000

|||I expect the bug that you filed to be resolved "By Design". The definition of the transaction is that it either fully succeed or fully fails. That's the letter "A" in the ACID definition - A for Atomicy. You have very long transaction, but it doesn't matter - if anything fails within transaction, the entire transaction is rolled back.