Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by MUTHUKKUMARAN...
»
INDEX DEFRAGMENTATION SCRIPT
40 posts, Page 4 of 4
««
«
1
2
3
4
INDEX DEFRAGMENTATION SCRIPT
Rate Topic
Display Mode
Topic Options
Author
Message
vanceprice
vanceprice
Posted Monday, March 26, 2012 3:16 PM
Forum Newbie
Group: General Forum Members
Last Login: Friday, April 12, 2013 3:02 PM
Points: 2,
Visits: 27
If we are running SQL 2008 and have "Auto Update Statistics" enabled, Do we need to update statistics in condition 2 or 3 of this script? Are there any down sides to doing both?
Post #1273036
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
Posted Tuesday, March 27, 2012 6:15 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
vanceprice (3/26/2012)
If we are running SQL 2008 and have "Auto Update Statistics" enabled, Do we need to update statistics in condition 2 or 3 of this script? Are there any down sides to doing both?
It will not create and problem. if you don't want then you may remove it.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>
SqlserverBlogForum
Post #1273431
pavankvnv
pavankvnv
Posted Tuesday, April 17, 2012 1:46 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, December 20, 2012 2:00 AM
Points: 1,
Visits: 10
HI Muthu,
I ran the script and it created those two tables in master and msdb and executed successfully.
But fragmentation is not reduced. Please let me know how to put this script in a job that should execute weekly and should run for all databases.
Thanks,
Pavan KVN
Post #1284721
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
Posted Wednesday, April 18, 2012 6:02 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
pavankvnv (4/17/2012)
HI Muthu,
I ran the script and it created those two tables in master and msdb and executed successfully.
But fragmentation is not reduced. Please let me know how to put this script in a job that should execute weekly and should run for all databases.
Thanks,
Pavan KVN
It may be a small table.
You can do that using script. Write a SP loop the sys.databases.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>
SqlserverBlogForum
Post #1285575
sboerde
sboerde
Posted Tuesday, June 19, 2012 8:35 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, October 05, 2012 8:41 AM
Points: 3,
Visits: 8
Hi Muthukkumaran,
The phrases '@frag BETWEEN 15 AND 29' and '@frag>=30' should be replaced by
'@frag BETWEEN 15 AND 30' and '@frag>30'.
With the current script you are missing the values of @frag greater than 29 and smaller than 30.
(also the comments should be adjusted likewise)
Regards,
Siebe
Post #1318080
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
Posted Wednesday, June 20, 2012 3:16 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
Thanks Siebe. Will change it.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>
SqlserverBlogForum
Post #1318524
henrik staun poulsen
henrik staun poulsen
Posted Wednesday, September 26, 2012 12:44 AM
Ten Centuries
Group: General Forum Members
Last Login: Thursday, May 16, 2013 11:48 PM
Points: 1,130,
Visits: 852
Hi Muthukkumaran,
Did you look at http://ola.hallengren.com/
IMHO it works better on larger databases.
Best regards,
Henrik Staun Poulsen
Stovi Software
Post #1364457
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
Posted Wednesday, September 26, 2012 1:50 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
henrik staun poulsen (9/26/2012)
Hi Muthukkumaran,
Did you look at http://ola.hallengren.com/
IMHO it works better on larger databases.
Best regards,
Henrik Staun Poulsen
Stovi Software
Henrik,
Indeed! That's good for larger databases.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>
SqlserverBlogForum
Post #1364489
Paul Randal
Paul Randal
Posted Wednesday, September 26, 2012 10:36 AM
SSCommitted
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:23 PM
Points: 1,905,
Visits: 1,601
Your script as such will suffer false positives from fragmented LOB_DATA and ROW_OVERFLOW_DATA allocation units - a common oversight. You need to filter on alloc_unit_type_desc = IN_ROW_DATA.
Paul Randal
CEO,
SQLskills.com
:
Check out SQLskills online training!
Blog:
www.SQLskills.com/blogs/paul
Twitter:
@PaulRandal
SQL MVP, Microsoft RD, Contributing Editor of
TechNet Magazine
Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005
Post #1364829
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
Posted Wednesday, September 26, 2012 10:50 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, May 13, 2013 4:17 AM
Points: 1,123,
Visits: 4,422
Paul Randal (9/26/2012)
Your script as such will suffer false positives from fragmented LOB_DATA and ROW_OVERFLOW_DATA allocation units - a common oversight. You need to filter on alloc_unit_type_desc = IN_ROW_DATA.
I have no idea on that.Thanks Paul.I will update it asap alloc_unit_type_desc = IN_ROW_DATA.
Muthukkumaran Kaliyamoorthy
Helping SQL DBAs and Developers >>>
SqlserverBlogForum
Post #1364836
« Prev Topic
|
Next Topic »
40 posts, Page 4 of 4
««
«
1
2
3
4
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.