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 |
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-03-06 : 13:41:16
|
Greetings,We have some major problems with our SQL server and would appreciate your input. We have a few databases created in our SQL server. Recently our head office initiated this index defrag procedure via a stored procedure which goes through each database and defrags anything with fragmentation above 10% every 1 hour in all databases including system databases except tempdb. sadly it recently failed on the msdb database sysjobhistory table nc1 IndexName. Since the job that does has been failing our whole server and all application that point to it are behaving very slowly and even some timing out.So my question is1. Should defrag really be ran on system databases?2. How can find out when this stored procedure was deployed to the system databases?Thank you |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-03-06 : 13:50:50
|
ok folks I found this awesome post. I had a funny feeling they were running this on our system databases and sure enough they had an older version of this defrag stored procedure. the newer version explicitly skips system databases: IF @dbname IN ('master', 'msdb', 'model', 'tempdb')so this is resolved but wanted to post this out there if anyone ran into this nightmare. |
 |
|
|
|
|