Granting CONTROL permission on a database

  • Comments posted to this topic are about the item Granting CONTROL permission on a database

  • Nice, easy question, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • In 2014, I discovered, you can execute the GRANT statement without the user existing in the database, and SQL Server will obligingly add the user. However, the user will be disabled (i.e. won't be able to connect) until you issue a GRANT CONNECT.

    Roland Alexander 
    The Monday Morning DBA 
    There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer

  • Roland Alexander STL - Tuesday, July 17, 2018 5:07 AM

    In 2014, I discovered, you can execute the GRANT statement without the user existing in the database, and SQL Server will obligingly add the user. However, the user will be disabled (i.e. won't be able to connect) until you issue a GRANT CONNECT.

    Try testing on a new databases that has no users or groups added. I believe that is the behavior if that user is a member of a group that already exists in the database.
    Otherwise you should be getting the error Cannot find the user 'SomeUserName', because it does not exist or you do not have permission.

    Sue

  • Sue_H - Wednesday, July 18, 2018 12:05 PM

    Roland Alexander STL - Tuesday, July 17, 2018 5:07 AM

    In 2014, I discovered, you can execute the GRANT statement without the user existing in the database, and SQL Server will obligingly add the user. However, the user will be disabled (i.e. won't be able to connect) until you issue a GRANT CONNECT.

    Try testing on a new databases that has no users or groups added. I believe that is the behavior if that user is a member of a group that already exists in the database.
    Otherwise you should be getting the error Cannot find the user 'SomeUserName', because it does not exist or you do not have permission.

    Sue

    Actually, the user was based on a group which existed at the server level, but was not in the database, nor were any of its members, as far as I could tell. I'll dig a little deeper.

    Roland Alexander 
    The Monday Morning DBA 
    There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer

Viewing 5 posts - 1 through 4 (of 4 total)

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