DBcreator

  • We have a build process , the build account is a dbcreator, after it create the database, it cannot access the objects in it, why is that?

    Thanks

  • sqlfriends (4/18/2013)


    We have a build process , the build account is a dbcreator, after it create the database, it cannot access the objects in it, why is that?

    Thanks

    Because DBCREATOR role is for restoring or creating the database, even delete it. To see inside, you need additional privileges or different role. This is by design.

  • Can this account itself add himself as a dbowner right after the database is restored?

  • sqlfriends (4/18/2013)


    Can this account itself add himself as a dbowner right after the database is restored?

    Two things ...

    DBCreator is a server role. dbowner is a database role. So you are talking about two different roles, different security levels.

    If you want the same account (or group) be part of dbowner Immediatly after being restored, add that user to model and make it part of dbowner group. Next time when your job creates the database, it will also contain the user or group and will be part of dbowner.

  • Thanks, that is a good alternative. I ended up adding that account temporily into database as dbowner when backing it up, after done, I removed it from original database.

    So when restoring to antoher server, it has dbowner buildin it.

  • sqlfriends (4/18/2013)


    Thanks, that is a good alternative. I ended up adding that account temporily into database as dbowner when backing it up, after done, I removed it from original database.

    So when restoring to antoher server, it has dbowner buildin it.

    Well,

    That will work if you are using a Windows login. If you are using a SQL login, it will not. You will have to reset the SID on the target database, as they are different. You must also create the SQL account / Login at server level, on target as well.

  • Thank you, that is good to know too.

    Right now this server is setup to use windows authentication, that works for us.

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

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