sp_createstats

  • When I run the command below on SQL Server 2005 box I get the following error.

    EXEC sp_CreateStats 'fullscan'

    Msg 15600, Level 15, State 1, Procedure sp_createstats, Line 27

    An invalid parameter or option was specified for procedure 'sys.sp_createstats'

    The same command seems to run fine on SQL Server 2000 box.

    Is this an issue with SQL Server 2005?

    [font="Verdana"]Imagination is more important than knowledge-Albert Einstein[/font]

  • That's right. Since you don't name the parameter SQL Server assumes that it the first one. But the first parameter is @indexonly where you are trying to assign 'fullscan' parameter.

    So name the parameter like:

    EXEC sp_CreateStats @fullscan = 'fullscan'

  • Wow! Works like a charm! Thanks a million.......:)

    [font="Verdana"]Imagination is more important than knowledge-Albert Einstein[/font]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply