Re: DBO user missing in two databases

From: Hansde Bruin (hans_at_nl.invalid)
Date: 03/10/05


Date: Thu, 10 Mar 2005 18:56:08 +0100

Jasper Smith wrote:
> To change the owner of the databases simply use sp_changedbowner e.g.
>
> use <your db name>
> go
> exec sp_changedbowner 'sa','true'
> go
>

There is a small and totally insignificant danger in using sa as a database
owner. When cross database ownership chaining for the database or the server
is activated, and there are non sysadmins in the database with dbo_owner
rights, then the can create stored procedure which access sp's in the master
database like sp_addsrvrolemember.

-- 
Hans


Relevant Pages

  • RE: Truncated INSERT statements when using sp_generate_inserts by Vyas
    ... SET NOCOUNT ON ... This procedure is also useful to create a database setup, ... ALSO NOTE THAT THIS PROCEDURE IS NOT UPDATED TO WORK WITH NEW DATA TYPES INTRODUCED IN SQL SERVER 2005 / YUKON ... IF @owner IS NULL ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL2000 UserPermissions for Database
    ... EXECUTE permission denied on object 'usp_ListDatabasesForLogin', ... database 'databaseA', owner 'dbo'. ... GRANT EXEC ON dbo.usp_ListDatabasesForLogin TO userx ...
    (microsoft.public.sqlserver.security)
  • Re: SQL 2005 Express-Database does not have a valid owner?
    ... That means that the database's owner is MYDOMAIN\MyUserName ... My design machine is running Windows XP Pro. ... database diagram. ... Database diagram support objects cannot be installed because this ...
    (microsoft.public.sqlserver.security)
  • Re: conflicting object names in sql server 2000
    ... The owner of the object will depend on the user ... On the local database server when it does the select * from ... she must specify the owner: ...
    (microsoft.public.sqlserver.server)
  • Re: unknown database owner
    ... cleared for the 'Admin' user. ... the "owner is unknown" (you described ... An old database, ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.security)