Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

HELP= Rebuild index & Update STATISTICS Expand / Collapse
Author
Message
Posted Thursday, March 18, 2010 3:01 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 8:31 AM
Points: 236, Visits: 934
Please advise, when you rebuild indexes if suppose the job failed due to some reason such as power outage, etc., what happens to the indexes? Does it get wiped from database?

Same question for update stat, what happens to statistics if during the execution if there is a power outage or job fails. Does the stats gets wiped from database? Please advise how it works. Thanks
Post #885932
Posted Thursday, March 18, 2010 4:07 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:51 AM
Points: 5,958, Visits: 12,839
the index which is being rebuilt is stored in a temporary area and brought in when the rebuild has finished to replace the existing index. An outage shouldnt really have any affect. The database consistency overall could be supsect but sql server takes care of this when starting up the database (using the transaction log file).

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #885961
Posted Thursday, March 18, 2010 4:12 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 20, 2013 9:25 AM
Points: 389, Visits: 357
Perry is correct, ACID property holds good here.

EnjoY!
Post #885964
Posted Friday, March 19, 2010 3:36 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 12:20 PM
Points: 41,529, Visits: 34,445
As with any data modification, if the transaction is not committed and there's a server failure, the changes will all be rolled back as part of the database restart-recovery.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #886175
Posted Friday, March 19, 2010 9:33 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 8:31 AM
Points: 236, Visits: 934
Thank you so much all for the reply! So it rolls back even for the job fails for some reason?
Post #886487
Posted Friday, March 19, 2010 6:27 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:51 AM
Points: 5,958, Visits: 12,839
As Gail says "no commit, no dice"
it's also worth noting if the database is in simple or bulk-logged recovery the create\alter index is not fully logged!


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #886805
Posted Saturday, March 20, 2010 3:57 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 12:20 PM
Points: 41,529, Visits: 34,445
Perry Whittle (3/19/2010)
it's also worth noting if the database is in simple or bulk-logged recovery the create\alter index is not fully logged!


Minimally logged, but that doesn't change the 'no commit, no change' rule.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #886870
Posted Saturday, March 20, 2010 4:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:51 AM
Points: 5,958, Visits: 12,839
yes, that goes without saying!

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #886873
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse