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
407 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now