December 20, 2011 at 11:32 pm
This is very interetsing scenario.
I have a table called TableA which contain 10 million records. I am creating a new table TableB from tableA (Query : Select A1,A2,A3,A4 into TableB from TableA). These tables are partitoned tables.
1.I am creating an column ID with Identity(1,1)
2. Then I am creating a clustered index for the ID column
After that I am updating the tableB 3times. With each batch will process at 100000 records.
--First update
While ()
Begin
Begin tran
Update tableB
Set A1 = A1* 2
Where ID>0 and ID<100000 (Loop)
Commit tran
End
--Second update
While ()
Begin
Begin tran
Update tableB
Set A2 = A2* 2
Where ID>0 and ID<100000 (Loop)
Commit tran
End
--Third update
While ()
Begin
Begin tran
Update tableB
Set A3 = A3* 2
Where ID>0 and ID<100000 (Loop)
Commit tran
End
After that I am creating a view from table A
Create view vw_tableA
Select * from TableA where A2 = ‘’
But I am getting error that the tableA is missing. After a few minutes Table B is missing. Any Idea why this happens. Database in Simple recovery model.
December 20, 2011 at 11:34 pm
Why start a new thread on this?
This cross posting only confuses and disjoints the answers.
Original post here
http://www.sqlservercentral.com/Forums/Topic1224878-391-1.aspx
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
December 20, 2011 at 11:48 pm
Sorry...When I post first ...I got some error...
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply