Dropping the guesy schema / user account

  • Where am I going wrong ...trying to drop the guest user and schema from adventure works

    I try this to see if the schema is empty (it is )

    SELECT name, object_id, type_desc

    FROM sys.objects

    WHERE OBJECTPROPERTY(object_id, N'SchemaId') = SCHEMA_ID(N'Guest')

    ORDER BY type_desc, name;

    GO

    I then try to drop it as a precursor to dropping the user and it wont let me 🙁

    any ideas ?"!

    thank you simon

  • Books Online:

    The guest user cannot be dropped, but it can be disabled by revoking its CONNECT permission. The CONNECT permission can be revoked by executing REVOKE CONNECT FROM GUEST within any database other than master or tempdb

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thank you Gail ....it came from an article in sqlmag concerning sample databases where it states "you can always remove the guest user if it constitutes a violation of ... security"

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

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