Want to restrict DBOWNER to Drop database

  • pujain (6/22/2011)


    writing a trigger is always a option for me but wanted to check if we have something else than trigger.

    I think that something like Lowell option would work for you.

    What does this person do?

    Do they create and drop objects,etc?

    What are their roles and responsibilities? Once you find that out you should be the one telling him what permissions that you are grant them.;-)

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Welsh Corgi (7/10/2011)


    george sibbald (6/22/2011)


    why don't you want to use a DDL trigger?

    I was wondering how you can prevent a member of the db_owner from from disabling or altering the trigger?:-)

    I was just wondering why the obvious method was excluded up front.

    And how did we get to db_owner. the OP states these users are creating these databases which makes them DBO, not just a member of the db_owner role.

    ---------------------------------------------------------------------

  • Welsh Corgi (7/10/2011)


    george sibbald (6/22/2011)


    why don't you want to use a DDL trigger?

    I was wondering how you can prevent a member of the db_owner from from disabling or altering the trigger?:-)

    By creating a server-scoped DDL trigger (which is the level that DROP and CREATE database are).

    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
  • GilaMonster (7/10/2011)


    Welsh Corgi (7/10/2011)


    george sibbald (6/22/2011)


    why don't you want to use a DDL trigger?

    I was wondering how you can prevent a member of the db_owner from from disabling or altering the trigger?:-)

    By creating a server-scoped DDL trigger (which is the level that DROP and CREATE database are).

    I should have realized that or researched before posting. I have created Oracle Database and Server Level Triggers.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Your can also grant read write permissions only, that is if they will not be tampaering with the DDL but working on DML.

Viewing 5 posts - 16 through 19 (of 19 total)

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