Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!!!

I tried to check database health using DBCC CHECKDB. It works fine. But when i am trying the check Index Usage statistic or index physical statistic using standard reports ,it showed me this error.

incorrect syntax near '('


i am using sql server 2008.
when i checked database options it shows that it's compatibility level is SQL SERVER 2000(80).
I googled and found that i should consider bringing it up to 2005/2008 . Is this the solution?? if so how will i do it??? and will my data will be as it is now after doing it or some data will be lost ?? I can't take risk of loosing data... please help me.
Posted
Updated 4-Jul-12 22:35pm
v2
Comments
Mehdi Gholam 5-Jul-12 4:31am    
Show your code.
ujjwal uniyal 5-Jul-12 4:35am    
i right clicked on database then selected reports then standard reports then index usage statistics.
Abhinav S 5-Jul-12 4:32am    
What is your query?
ujjwal uniyal 5-Jul-12 4:35am    
i right clicked on database then selected reports then standard reports then index usage statistics.

1 solution

Seems you have upgraded to SQL Server 2008 from lower version....set the compatibility then it won't give this error

to set to a higher compatibility use the below code

EXEC sp_dbcmptlevel 'yourDatabaseNameHere', 100 


Read more on sp_dbcmptlevel

Mark as solution if it anwer your question....
 
Share this answer
 
v2
Comments
ujjwal uniyal 5-Jul-12 5:13am    
do i have the risk of loosing data when using this command ???
Shemeer NS 5-Jul-12 5:16am    
No data loss..... if you are still worriying take a backup :)
Shemeer NS 5-Jul-12 5:18am    
I have updated the solution with a link for more details
ujjwal uniyal 5-Jul-12 5:56am    
thank you!!! i really helped me.. +5 from me
Shemeer NS 5-Jul-12 5:57am    
Thank you...I'm happy to help you...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900