Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DBcreator Expand / Collapse
Author
Message
Posted Thursday, April 18, 2013 9:32 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:01 PM
Points: 1,787, Visits: 3,240
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
Post #1443947
Posted Thursday, April 18, 2013 9:54 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 411, Visits: 1,310
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.
Post #1443965
Posted Thursday, April 18, 2013 9:57 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:01 PM
Points: 1,787, Visits: 3,240
Can this account itself add himself as a dbowner right after the database is restored?

Post #1443969
Posted Thursday, April 18, 2013 10:49 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 411, Visits: 1,310
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.
Post #1444003
Posted Thursday, April 18, 2013 11:36 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:01 PM
Points: 1,787, Visits: 3,240
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.
Post #1444048
Posted Thursday, April 18, 2013 12:53 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: 2 days ago @ 8:53 AM
Points: 411, Visits: 1,310
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.
Post #1444103
Posted Thursday, April 18, 2013 12:55 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 6:01 PM
Points: 1,787, Visits: 3,240
Thank you, that is good to know too.
Right now this server is setup to use windows authentication, that works for us.
Post #1444106
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse