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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 DBCC commads

Author  Topic 

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-10-16 : 09:40:41
Gurus
Please 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 guide

Regards
Nitin

X002548
Not Just a Number

15586 Posts

Posted - 2006-10-16 : 13:32:58
You only take a backup every weekend?

What about the logs?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-10-17 : 01:13:41
Hi
I 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?
Regards
Nitin
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2006-10-17 : 06:16:59
Hi all

for 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 methode
1.Drop the index and Recreate
2.DBCC INDEXDEFRAG(Online command)
3.DBCC DBREINDEX (Off Line) not recommanded





SreenivasaRao
Bangalore,INDIA
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-10-18 : 02:43:27
Hi
I 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.

Regards
Nitin
Go to Top of Page

nitin1353
Constraint Violating Yak Guru

381 Posts

Posted - 2006-10-27 : 09:05:05
Gurus
Can someone Please confirm me this thing?
Regards
Nitin
Go to Top of Page

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.
Go to Top of Page

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
Go to Top of Page
   

- Advertisement -