Create db_owner with restrictions to other databases

  • Hi,

    Is it possible to create an user on SQL Server that is owner of a database (can create, alter, drop tables) but has no access to other databases?

    Thanks,

    Pedro



    If you need to work better, try working less...

  • db_owner is referred to a single database, it's not a server role.

    You just have to create the user as db_owner of the target database and leave it as "public" on the other databases.

    -- Gianluca Sartori

  • but being public won't he have select and other permissions on the other databases?

    I don't want the user to be able to perform cross database selects or other stuff like that.

    Thanks,

    Pedro



    If you need to work better, try working less...

  • Public role doesn't have table access, don't worry about that.

    -- Gianluca Sartori

  • Many thanks...

    Pedro



    If you need to work better, try working less...

  • You could also avoid mapping the login to a db user completely, so that it can't access the database at all.

    -- Gianluca Sartori

Viewing 6 posts - 1 through 6 (of 6 total)

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