create a policy in policy management

  • How to create a policy that prevents users to create user objects in master database?

    Thanks

  • Not so much as a policy, but that could be handled with a DDL trigger.

  • If you follow the principal of least privileges the user shouldnt be able to create objects under the master database anyway.

    Jayanth Kurup[/url]

  • The thing I found on a dev server, the database developer has all the rights on the box

    and when he runs the build script sometimes, it accidently goes to the master database.

    One way is in the build script to add : Use userdatabase statement, then run the script, but I want also to avoid the accidental creation to master db.

  • sqlfriends (1/20/2013)


    The thing I found on a dev server, the database developer has all the rights on the box

    and when he runs the build script sometimes, it accidently goes to the master database.

    One way is in the build script to add : Use userdatabase statement, then run the script, but I want also to avoid the accidental creation to master db.

    The other is to create a DDL trigger that will prevent it as well. I think this is more viable than a policy.

  • sqlfriends (1/20/2013)


    The thing I found on a dev server, the database developer has all the rights on the box

    and when he runs the build script sometimes, it accidently goes to the master database.

    One way is in the build script to add : Use userdatabase statement, then run the script, but I want also to avoid the accidental creation to master db.

    Set default database for that login to a the user database instead of master.

    Jayanth Kurup[/url]

  • Thanks all, those are good ideas

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

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