Blog » By Jack Vamvas on SQL Server DBA

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

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

 

 

 

Speak Your Mind

  • No HTML is allowed.