Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Index usage overview


Index usage overview

Author
Message
Wilfred van Dijk
Wilfred van Dijk
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1253 Visits: 1357
Comments posted to this topic are about the item Index usage overview

Wilfred
The best things in life are the simple things
Madhu R
Madhu R
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 43
Hi,

I am trying to run your index preview. But its turns out as error for my DB.

Here is the error

[color=#505050]Msg 102, Level 15, State 1, Procedure vw_index_usage, Line 3
Incorrect syntax near ' '.
Msg 102, Level 15, State 1, Procedure vw_index_usage, Line 21
Incorrect syntax near 'MB'.
Msg 102, Level 15, State 1, Procedure vw_index_usage, Line 22
Incorrect syntax near 'cols'.
Msg 102, Level 15, State 1, Procedure vw_index_usage, Line 23
Incorrect syntax near 'included'.[/color]
ian.scrivens
ian.scrivens
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 70
This is because of the formatting when copying and pasting from the web.

Select one of the 'space' characters, for example the first character on the second line the do a 'replace all' and replace them all with a single space. This should sort it out.
hfxDBA
hfxDBA
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 490
Not knocking the script... but for newbies would be nice to explain the column outputs in a brief description. They could probably find explanations in BOL (and common sense) but might be a nice to get the original thoughts form the OP
MOP
MOP
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 37
That does not seem to fix things. Also, replacing the double quote (not space) does not fix things either...;-)
hfxDBA
hfxDBA
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 490
MOP (3/23/2010)
That does not seem to fix things. Also, replacing the double quote (not space) does not fix things either...;-)


I can confirm that the fix mentioned works (for me). if all else fails with the find and replace, retype the query and you'll be able to run it fine.
MOP
MOP
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 37
Yes, my bad. I picked the first character in the third line, did a replace with space and the script ran just fine.

Thanks!
ian.scrivens
ian.scrivens
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 70
hfxDBA (3/23/2010)
Not knocking the script... but for newbies would be nice to explain the column outputs in a brief description. They could probably find explanations in BOL (and common sense) but might be a nice to get the original thoughts form the OP


I agree, and explaination would be nice.
Wilfred van Dijk
Wilfred van Dijk
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1253 Visits: 1357
Got it, I'll post an explanation later this week.

Wilfred
The best things in life are the simple things
YvonneZ
YvonneZ
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 112
Hi there,

I have encounted the following errors when trying the script:

Server: Msg 208, Level 16, State 1, Procedure vw_index_usage, Line 3
Invalid object name 'sys.index_columns'.
Server: Msg 208, Level 16, State 1, Procedure vw_index_usage, Line 3
Invalid object name 'sys.index_columns'.
Server: Msg 208, Level 16, State 1, Procedure vw_index_usage, Line 3
Invalid object name 'sys.dm_db_index_usage_stats'.
Server: Msg 208, Level 16, State 1, Procedure vw_index_usage, Line 3
Invalid object name 'sys.indexes'.
Server: Msg 208, Level 16, State 1, Procedure vw_index_usage, Line 3
Invalid object name 'sys.filegroups'.

I guess it doesn't work on SQL 2000 (which is what I am using)?

Thanks!

Yvonne
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search