Sqlserver-dba.com

Subscribe

Subscribe to RSS feed  Follow @jackvamvas - Twitter

Enjoy this post? Enter your email address for updates on new posts:

Delivered by FeedBurner

Email +Jack Vamvas at jack@sqlserver-dba.com

SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
Cannot create or update statistics on view because both FULLSCAN and NORECOMPUTE options are required

16 June,2012 by Jack Vamvas

Question: During a regular maintenance UPDATE STATISTICS tasks  I’m getting   the following error:

 Cannot create or update statistics on view "dbo.myView" because both FULLSCAN and NORECOMPUTE options are required. [SQLSTATE 42000]

 How can I fix it?

Answer:   The UPDATE STATISTICS is trying to update statistics on a VIEW.  On a  SQL VIEW a FULLSCAN is required.

On a SQL Server Instance this can cause a problem – particularly if you’re running a catch-all script. A FULLSCAN could cause servere delays on an UPDATE STATISTICS job – if every object required a FULLSCAN.

Some options are:

1)       Create different scripts for VIEWS

2)       Use sp_updatestats  - which only only updates on objects which  need the update

 

 

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)

Enjoy this post? Enter your email address for updates on new posts:

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer