Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using MS Sql Server Mgt Studio.

  1. I select a database.
  2. I right click and select Report / Standard Reports / Index Usage Statistics
  3. I get Error: Incorrect syntax near '('

I check some of the other reports display ok. Others, for example: Top transactions, All Block Transactions, I get Error: Index(zero baseD) must be greater than or equal to zero and less than the size of the argument list.

Any ideas what could be wrong?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

My suspicion here is that your database is still running in SQL Server 2000 compatibility mode. Right click on the database, go to properties and then options and see. If that is the case you'll have to look at the index usage statistics manually with queries, certain constructs used in these reports and using operators like the APPLY operator won't work against DBs in 2000 compatibility mode. You should consider bringing up to 2005/2008 mode but this needs to be a dev project and properly tested/vetted in a pre-production environment.

If it isn't the compatibility mode, I'd also look at what version of SSMS you are running and what version/SP the database engine is. If they aren't the same this could also be a part of the issue.. Help about on SSMS will show it's version and may show the instance version but you can also run Select @@version to get the build number of your instance for sure.

share|improve this answer
    
You're right!! The database was still running in SQL Server 2000 compatibility mode, I changed to sql server 2008(100) and it worked! –  user7317 Mar 9 '12 at 21:54
    
@osvaldoagudelo mark this as the answer by selecting the button below post score. This ensures that others visiting this question are able to jump to the answer easily. –  Thomas Stringer Mar 10 '12 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.