Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-16 : 09:40:41
|
GurusPlease tell me one thing.I have a DB in a live scenario and we take backup of that db every weekend and then we restore that db on the local server.If i run the dbcc show contig on the production server and dbcc showcontig on the backup which i restored couple of days back,will it give the same results or results can vary?Please guideRegardsNitin |
|
X002548
Not Just a Number
15586 Posts |
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-17 : 01:13:41
|
HiI download the Db backup every weekend and we restore it on the local server.i Just wanna know will the result of DBCC showcontig on the live server will be different that dbcc showcontig on the local server?RegardsNitin |
 |
|
sponguru_dba
Yak Posting Veteran
93 Posts |
Posted - 2006-10-17 : 06:16:59
|
Hi allfor you question my answer is must show different result,Using DBCC SHOWCONTIG we can find fragmentation information for the data and indexes of the specified table.based on result we can one the methode1.Drop the index and Recreate2.DBCC INDEXDEFRAG(Online command)3.DBCC DBREINDEX (Off Line) not recommandedSreenivasaRaoBangalore,INDIA |
 |
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-18 : 02:43:27
|
HiI couldnt get you.You meant to say the results will be different on a backup set and on the live DB.I dont think so.Can you please confirm because DBCC Showcontig shows the fragmentation level and accorrding to me backup set will have the same info as live DB.RegardsNitin |
 |
|
nitin1353
Constraint Violating Yak Guru
381 Posts |
Posted - 2006-10-27 : 09:05:05
|
GurusCan someone Please confirm me this thing?RegardsNitin |
 |
|
mcrowley
Aged Yak Warrior
771 Posts |
Posted - 2006-10-27 : 09:45:45
|
DBCC SHOWCONTIG will show you the current fragmentation of an index. If you run DBCC SHOWCONTIG on the backup version of the database, you will see the fragmentation as it was on the day of the backup. If the backup you restored is a week old, then the live server will have a week's more fragmentation in it than the backup will. As such, the differences will be seen in tables that have a lot of inserts/updates/deletes in the live environment. A table with relatively static data will probably give you similar results from DBCC SHOWCONTIG, since such a table would not get very fragmented over time anyway. |
 |
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2006-10-27 : 09:48:41
|
Nitin ... why don't you try it and tell us? Or maybe you did try it and the backup is less fragmented than the live and you want to know why? Or maybe you did try it and the backup and live framentation is the same and you want to know why? Or maybe someone asked you to research it and you didn't feel like conducting an actual test ...Jay White |
 |
|
|
|
|