Re: Changing login for dbo object (SQL Server 2000)



Worked like an absolute charm! Exactly what I needed! Thanks again.

Randall

"Sue Hoegemeier" <Sue_H@xxxxxxxxxxxxx> wrote in message
news:jl9k62p4ipgkbppvhglaqlbkgsnpt745fo@xxxxxxxxxx
It sound like what you are looking for is sp_changedbowner.
In Query Analyzer, change your database context to the
database you are having problems with and execute:
sp_changedbowner 'sa'

-Sue

On Tue, 16 May 2006 11:27:25 -0500, "Randall Arnold"
<randall.nospam.arnold@xxxxxxxxxxxxxxxx> wrote:

I've got a SQL Server 2000 database (ASOQA) that has the dbo User linked
to my Windows-based domain login. This has been causing me problems when
trying to add permissions to my account; I get an error that I can't make
any changes to the dbo object.

The fix, as I understand it, is to change the dbo User to use the sa login
and add another administrative User for my Windows-based login. I note
that a companion database on the same server is setup that way and I have
no problems with assigning roles on that one. I was directed to use
sp_change_users_login but that also produces errors stating that the dbo
object is invalid for the User parameter.

Basically, here's what I see now for users in Enterprise Manager on ASOQA:

Name Login Name
dbo noe\ranarnol *
dev dev
reportuser reportuser
(etc)

Here's how the other database is setup, and how I want ASOQA done:

Name Login Name
dbo sa *
dev dev
ranarnol noe\ranarnol *
reportuser reportuser
(etc)

noe\ranarnol is my usual login. Any ideas how I go about accomplishing
this?

Thanks,

Randall Arnold



.



Relevant Pages

  • Re: Confused about dbo
    ... neither the explicit database owner or aliased to the dbo user. ... member of the db_owner role does not mean you are aliased to the dbo user. ... When you connect to SQL Server you do so using a login. ...
    (microsoft.public.sqlserver.security)
  • Re: db_owner role in SQL 2k
    ... Windows login name. ... login that is the owner of a database and members of the sysadmin role. ... >> the username dbo" ... >> FULL permission to do anything and everything. ...
    (microsoft.public.sqlserver.programming)
  • Re: Change dbo
    ... I have a database where a user is defined as the dbo on a database. ... I tried using SQL Server Manger ... The login for this person maps to dbo. ...
    (microsoft.public.sqlserver.security)
  • Re: db_owner role in SQL 2k
    ... The owner of a database is a login, which is listed in the sysdatabases ... I try not to think of DBO as the Database Owner, but just as special, ... For anyone to use any database, their login name must have been given access ...
    (microsoft.public.sqlserver.programming)
  • Re: db_owner role in SQL 2k
    ... > The owner of a database is a login, which is listed in the sysdatabases ... > table in the master database as the owner of the database. ... and their user name will ALWAYS be DBO. ... > automatically members of the public role. ...
    (microsoft.public.sqlserver.programming)