Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312

    Unanswered: Database Owner Problems 2005

    I am using SQL Server 2005 and I was having a problem with the owner of a particular database. When I go into Database Diagrams for the database I get:

    "Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

    So I tried some different things (assigning different users as the owner) I was only able to assign one user as the owner (someone that is no longer working here), then I deleted that user (oops.). Now I still don't have an owner assigned AND I can't get into the database properties because I don't have permissions.

    Any help would be appreciated.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You can set sa as the owner of a db:

    Code:
    USE Mydb
    GO
     
    EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
    GO
    
    It does sound, though, like you don't have eleveated permissions. You might need to log in as sa or get a sysadmin in to run this.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    That worked. Thanks. The thing that was killing me is that I have the permissions to do it. I am the administrator, user, etc. It is mne and another person that have complete access to the database. We are migrating to SQL Sever 2005 from Access.

    If you don't mind answering another question regarding SQL Server security. For this particular database, I try to transfer ownership to my login (which is mapped to my network login, Windows Authentication) and I get the following error:

    "The proposed new database owner CORE_PROCESS\dkunkle is mapped as user CORE_PROCESS\dkunkle in this database. Parameter name: CORE_PROCESS\dkunkle"

    Any thoughts on this error? My login is the owner of another database. This database was created/developed on another system, then moved to the server.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by DCKunkle
    If you don't mind answering another question regarding SQL Server security.
    omg - what a liberty

    I think this means that you are trying to map the owner to a login which is already mapped to a user in the database.

    Not certain though. What are you executing?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Poots has got it ... here's the pertinent section from 2005 BOL

    Code:
    sp_changedbowner [ @loginame = ] 'login'     [ , [ @map= ] remap_alias_flag ]
    http://www.dbforums.com/ms-help://MS...l/collapse.gif</IMG>Arguments
     
    [ @loginame = ] 'login' Is the login ID of the new owner of the current database. login is sysname, with no default. login must be an already existing SQL Server login or Microsoft Windows user. login cannot become the owner of the current database if it already has access to the database through an existing alias or user security account within the database. To avoid this, drop the alias or user within the current database first.
    [ @map = ] remap_alias_flag Is the value true or false, which indicates whether existing aliases assigned to the old database owner (dbo) are mapped to the new owner of the current database or dropped. remap_alias_flag is varchar(5), with a default of NULL. This indicates that any existing aliases to the old dbo are mapped to the new owner of the current database. false indicates that existing aliases to the old database owner are dropped.
    

    -- This is all just a Figment of my Imagination --

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •