dbo ownership vs user ownership

  • What's the minimun level of rights I need to grant in order for tables, stored procedures etc to be created with DBO as owner instead of the user as owner ?

  • The db_ddladmin fixed database role is the minimum level of rights needed to accomplish this. A user with such rights would have to make sure to specify the owner in the create statement. For instance:

    CREATE TABLE dbo.MyTable

    CREATE PROC dbo.MyStoredProc

     

    K. Brian Kelley
    @kbriankelley

  • you can also change de database-ower (exec sp_changedbowner @loginame = 'theOneAndOnly' ,@map = 'true' ) Then that user by default creates dbo-objects. If he/she wants older existant 'theOneAndOnly' -tables, he/she should qualify them !

    con : there can only be one database-owner !

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

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

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