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
413 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
[X]
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
7 Comments
 
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.
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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)
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 143

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…

737 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