How to change database owner from dbo

How to change database owner from dbo

Post by Peter Larsso » Fri, 20 Apr 2001 01:11:55



Hi,

Some of my tables that I create are assigned "dbo" as the owner, instead of
the username that I'm connected with. This is somewhat disturbing since a
table that I name e.g. Restaurants come out being called dbo.Restaurants.

Is there any way to change the owners of these tables, or make sure that
when I create a new table this won't happen?

Thank you in advance!

- Peter Larsson -

 
 
 

How to change database owner from dbo

Post by àì?ü? » Fri, 20 Apr 2001 10:14:25



Quote:> Hi,

> Some of my tables that I create are assigned "dbo" as the owner, instead
of
> the username that I'm connected with. This is somewhat disturbing since a
> table that I name e.g. Restaurants come out being called dbo.Restaurants.

> Is there any way to change the owners of these tables, or make sure that
> when I create a new table this won't happen?

> Thank you in advance!

> - Peter Larsson -


 
 
 

How to change database owner from dbo

Post by àì?ü? » Fri, 20 Apr 2001 10:15:16


Peter,

First, if this won't happen when you create a new table, you must change
user for the database.
  1) In Query Analyzer, login in sa.
  2) Choose the DB you want to change.
  3) sp_dropuser username        <--  this username is the username that you
are connected with
      go
      sp_changedbowner username  <-- same
      go
  4) Execute

Next, the way to change the owner of tables for dbo
  1) In Query Analyzer, login in the username.
  2) select  * from sysobjects
  3) Execute
  4) update uid    <-- Make a careful comparison of them and see which is
dbo.


Quote:> Hi,

> Some of my tables that I create are assigned "dbo" as the owner, instead
of
> the username that I'm connected with. This is somewhat disturbing since a
> table that I name e.g. Restaurants come out being called dbo.Restaurants.

> Is there any way to change the owners of these tables, or make sure that
> when I create a new table this won't happen?

> Thank you in advance!

> - Peter Larsson -

 
 
 

1. Help - Change Owner/dbo of Database

I'm new to this company and new to SQL Server DBA responsibilities.  The prior
DBA set up many databases (he is the owner 'dbo') and set up the backup processes
(thru Legato) for them.  Network admin has dropped his user ID and now the
backups fail with:

MESSAGES:       The job failed.  Unable to determine if the owner
(DOMINION\olddba) of job Portuguese backup has server access (reason: Could not
obtain information about Windows NT group/user 'DOMINION\olddba'. [SQLSTATE
42000] (Error 8198)).

All attempt to change the dbo result in refusal by SQL Server.

Any ideas???

2. Upgrading to 7.2 from 7.1

3. Changing all DB object owners to DBO

4. MS vs. Q+E ODBC

5. Changing owner beyond DBO

6. Ingres with C++ ?

7. user creating database object with dbo as owner

8. Comparing two databases

9. Truncate without Database Owner Authorization (dbo)

10. dbo versus database object owner

11. database owner (dbo)

12. Change DB owner/Table owner

13. A database owner is not reconized as a database owner