|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 12:56 AM
Points: 898,
Visits: 1,045
|
|
Comments posted to this topic are about the item Index usage overview
Wilfred The best things in life are the simple things
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, March 24, 2013 6:56 PM
Points: 6,
Visits: 42
|
|
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]
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 28, 2011 7:31 AM
Points: 6,
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.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 6:59 AM
Points: 19,
Visits: 404
|
|
| 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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, April 06, 2011 10:30 AM
Points: 3,
Visits: 37
|
|
That does not seem to fix things. Also, replacing the double quote (not space) does not fix things either...
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 6:59 AM
Points: 19,
Visits: 404
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, April 06, 2011 10:30 AM
Points: 3,
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!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 28, 2011 7:31 AM
Points: 6,
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.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 12:56 AM
Points: 898,
Visits: 1,045
|
|
Got it, I'll post an explanation later this week.
Wilfred The best things in life are the simple things
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 9:36 AM
Points: 11,
Visits: 66
|
|
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
|
|
|
|