none
Permission problem execute "DBCC FREESYSTEMCACHE ('All')"

    Dotaz

  • if i login with windows authentication i could execute this command

    if i login with sql server authentication i getting the following error

    Msg 2571, Level 14, State 11, Line 1

    User 'system' does not have permission to run DBCC freesystemcache.

    but this user have db__ddladmin and db_owner permissions

    how to grand permission

    11. února 2012 8:36

Odpovědi

Všechny reakce

  • According to Books Online, you need ALTER SERVER STATE for this. I.e., GRANT ALTER SERVER STATE TO <loginName>. if this is what you really want of course.

    Tibor Karaszi, SQL Server MVP | web | blog

    11. února 2012 8:58
  • try rdy still same permission error
    24. března 2012 3:01
  • I ran this successfully:

    CREATE LOGIN testlogin WITH PASSWORD = 'temporary'
    go
    GRANT ALTER SERVER STATE TO testlogin
    go
    EXECUTE AS LOGIN = 'testlogin'
    go
    DBCC FREESYSTEMCACHE('All')
    go
    REVERT
    go
    DROP LOGIN testlogin

    First check that you have actually granted ALTER SERVER STATE. If that is the case, it's time to look for explicit DENY. Which could be a to Windows group.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    24. března 2012 10:18