Database User 'dbo' - I don't want it assigned a sql login - can I change it to nothing?

Posted on 2006-06-12
Medium Priority
Last Modified: 2010-07-27
I have a database set up on Sql Server 2000 sp3 and the dbo user is associated with a particular login. I don't want that login in to be associated with dbo user for that database. Can I remove a login name from the dbo  user altogether? If not, what would be a good default for the dbo user? A network login or sa login?

Question by:Sue_W
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16889223
>I have a database set up on Sql Server 2000 sp3 and the dbo user is associated with a particular login.
it's set with sa login by default. you should not change that unless you have some very good reasons for doing so.

Assisted Solution

MySt1k earned 200 total points
ID: 16890989
btw, many users can be dbo's.
basically the user who create a database will be dbo for that database.

this can also be assigned or removed to any login in the database.
be sure there is at least 1 dbo per database.

as Angel said, Sa will be dbo and its usually a good thing :)

Author Comment

ID: 16891560
Ok, I don't understand why dbo user has this particular login. I did not create the original database but attached the database through Enterprise manager. I was not logged in as the login name that was associated with dbo user. I found that I needed to give this particular login certain roles but since it was the creator of the database, I could not assign it roles or so the sql message stated. I noticed other databases where the dbo user was not associated with a particular login. Why?

I am not using sa for anything. I either have a special login that mimics sa or I use the windows login. If I give the dbo user for this database to the sa account, then what happens to the permissions on this database?.

Sorry for the confusion, users and permissions assigning are something new to me.

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16891684
>I did not create the original database but attached the database through Enterprise manager
by default, is suggest the current logged in user as owner of the database, which would explain what happened.

to change:
 detach the database
 attach the database again, where you can specify the database owner (sa)

Assisted Solution

Julianva earned 200 total points
ID: 16892114
Dbo is a role - if  you give a user dbo rights to a database then he/she has full controll of that database.

a login is at server level - you can login with windows account or with sql account to a server  - then you have users for a particular database that you assign roles to.

if you want to remove the dbo rights for a particular user

open enterprise manager

open the server in question - expand databases - click on users you will see all the users on the right pane
 double click on that user and deselect  the dbo role and give him or her read or write or ddl or what ever other role you want to assign.

if you are the database administrator then its ok for your login to have the dbo role.if you login with your credentials on the windows server that you installed sql on then the login will be - if windows account

domain name\sue_w - then the dbo user will be assigned to  the sue_w login - if

sql account - sa -  sa login will be dbo.

each user will have a particular role that you assign -  the database administrator should be dbo.


Author Comment

ID: 16921314
What would happen if I changed the dbo user to a windows user if the windows user's password expires?
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 1600 total points
ID: 16921820
>What would happen if I changed the dbo user to a windows user if the windows user's password expires?
Only that user will not be able to login. nothing else (ie the database does not get inaccessible by the windows account gettting locked in windows level)

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question