Solved

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

Posted on 2006-06-12
7
410 Views
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?

Sue
0
Comment
Question by:Sue_W
7 Comments
 
LVL 142

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.
0
 
LVL 1

Assisted Solution

by:MySt1k
MySt1k earned 50 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 :)
0
 

Author Comment

by:Sue_W
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.

Sue_W
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 142

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)
0
 
LVL 8

Assisted Solution

by:Julianva
Julianva earned 50 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.




0
 

Author Comment

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

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 400 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)
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

831 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