x

Can I run the Rebuild index for compatibility level 80 database in sqlserver 2005?

Can I run the Rebuild index for compatibility level 80 database in sqlserver 2005?

[Edit - additional information:]
And I got a 60 tables are have heigh fragmentation so can I do the rebuild index and reorganize index by using DMV On compatibility level 80 database in sql server 2005?
more ▼

asked Sep 06, 2011 at 12:36 AM in Default

sql server 2005 gravatar image

sql server 2005
11 1 1 2

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Yes you can.

If you have Enterprise Edition, you can even perform this as an online operation (uncomment the second line below if you want to do that).

ALTER INDEX [index_name] ON [schema].[table_name] REBUILD
--WITH (ONLINE = ON) 
more ▼

answered Sep 06, 2011 at 12:42 AM

WilliamD gravatar image

WilliamD
25.9k 17 19 41

thanks for your reply.... and go through the question once again please. I added another doute..
Sep 06, 2011 at 03:21 AM sql server 2005
(comments are locked)
10|1200 characters needed characters left

I suggest you use Michelle Uffords Index Defrag-scripts http://sqlfool.com/2011/06/index-defrag-script-v4-1/.

I have them scheduled to run weekly for all databases - they check the fragmentation and reorganize when suitable, rebuild when suitable.

Regarding the question about DMV and compatibility level 80 - I think you should read this article at SqlSkills: [A DBA myth a day: (13/30) you cannot run DMVs when in the 80 compat mode (T-SQL Tuesday #005)][2]

[2]: http://bit.ly/qSCK1Y
more ▼

answered Sep 06, 2011 at 03:38 AM

Magnus Ahlkvist gravatar image

Magnus Ahlkvist
16.5k 16 19 33

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1945
x128
x22
x21

asked: Sep 06, 2011 at 12:36 AM

Seen: 1708 times

Last Updated: Sep 06, 2011 at 03:39 AM