Creating dbs using roles other than sysadmin

  •  

    If there's a requirement that someone other than the DBA needs to set up dbs and they will be controlled by him, what options are best for a DBA:

    1. Set up a login for him and grant him DB_Creator server role. (But the dbo user for such dbs will not have sysadmin rights as the login with which he will be executing batch files would have a db_creator role. Is that fine?)

    2. Make him set up the dbs using sa account. Once done, change sa password and create user with db_owner role for his ongoing activities. But this has a fall back again. If he needs to create objects in future, they would not be owned by dbo and I think thats a problem. Right?

    3. Create another login and grant sysadmin rights. This, I think, is the worst option as it would grant him full authority of server activities and also control over dbs that are irrelevant to him.

    Could any one please guide me? For now, I think first option is best but my only concern is that the user mapped on dbo would not be having sysadmin rights. Is that OK?

    Please do reply.

    Thanks.

  • Madiha,

    You can grant db_creator role membership. But if you don't trust this person than I would tell him/her to submit the db creation script to me and run it myself after checking that everything is OK. I normally create databases myself if asked and the superuser is a member if db_owner database role, or he/she owns a login that is a DBO. Do not use SA login even if you change the PW later.

    Regards,Yelena Varsha

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

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