SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deployment accounts and best practice


Deployment accounts and best practice

Author
Message
Ells
Ells
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2364 Visits: 931
Up untill now I have handed over my code to be deployed.

Now things are different and it caused me to think. Once the SQL software is installed and an instance created, which account would you use to create your database and its objects? If you used SSIS and SSAS as well would this be a different account when deploying.

As I mentioned SSIS I would prefer answers relevant to SQL 2012 rather than 2008.

Are there any good links / white papers etc as this must be documented somewhere as a best practice.

Another day learning something is a day well spent
E
Cool
PS Thanks in Advance
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93531 Visits: 33009
I don't think there is a single right answer to this. I very much believe that you should NOT use the administrative accounts as owners of the databases or for any other security other than administrative tasks. From there, all security should be set up using as little access as possible. Meaning, if a login only needs read access, only give it read access. If login needs to read and write data, only let it read and write data, etc.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)SSC Guru (203K reputation)

Group: General Forum Members
Points: 203190 Visits: 41947
I agree with Grant. If you're responsible only for given databases, you should have only dbo privs as a max. I would also strongly recommend that all code being promoted use ONLY the 2 part naming convention to prevent any confusion (and, it helps performance a bit, as well) especially if there's some other schema in play other than just dbo. It will also help with an object accidently being owned by a user.

The "SA" user should actually be disabled. If DBAs actually need "SA" privs to do their jobs, for reasons of traceability, it should be a part of their privs instead of having them login as "SA" or some other common login.

If you need the 3 or 4 part naming convention because some object is in another database or even on another server /instance, DON'T use the 3 or 4 part naming convention even then. Instead, setup a synonym to do the job for you. If the name of a database changes or is moved to a different server, it's MUCH easier to redefine a handful of synonyms than it is to find all of the 3 and 4 part naming in code and changing it.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Ells
Ells
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2364 Visits: 931
Many thanks guys

E
dbassassin
dbassassin
SSC Veteran
SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)

Group: General Forum Members
Points: 288 Visits: 290
Grant,

I read at brentozar.com:
http://www.brentozar.com/blitz/jobs-owned-by-user-accounts/
http://www.brentozar.com/blitz/database-owners/

So would you recommend striving towards not using SA (possibly even renaming/disabling it), and creating new accounts that are least privilege for specific purposes?

I've always setup the Windows service accounts in this way, but not so much for jobs and db owners (I did run into the scenario Brent presents where IT had disabled an old user account that had been used for running a handful of jobs)

Why is it that people who can't take advice always insist on giving it? - James Bond, Casino Royale
Ells
Ells
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2364 Visits: 931
Still looking into this. SSA jobs will be set up under a different account and one that will not be discontiinued.

Still unsure on the database owner and may go SA

Thnaks for the links
E
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93531 Visits: 33009
dbassassin (1/13/2014)
Grant,

I read at brentozar.com:
http://www.brentozar.com/blitz/jobs-owned-by-user-accounts/
http://www.brentozar.com/blitz/database-owners/

So would you recommend striving towards not using SA (possibly even renaming/disabling it), and creating new accounts that are least privilege for specific purposes?

I've always setup the Windows service accounts in this way, but not so much for jobs and db owners (I did run into the scenario Brent presents where IT had disabled an old user account that had been used for running a handful of jobs)


Yeah, pretty much. I've worked at the extreme end, where everything and everyone had 'sa' privs. It's impossible to manage. You're seriously better off if you can limit access as much as possible. Plus, depending on the type of company you're working for, you may need to for legal compliance reasons.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
dbassassin
dbassassin
SSC Veteran
SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)SSC Veteran (288 reputation)

Group: General Forum Members
Points: 288 Visits: 290
Grant/Jeff

Would you say that using SA as the database owner or jobs account is not a preferred method. Did you make new user accounts for each purpose?

Jeff

Have you run into any issues when disabling/renaming the SA account?

Why is it that people who can't take advice always insist on giving it? - James Bond, Casino Royale
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)SSC Guru (93K reputation)

Group: General Forum Members
Points: 93531 Visits: 33009
I would use system administration ownership for packages and databases, yes, but not the 'sa' account. Two different critters.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search