Default owner using ALTER AUTHORIZATION

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rico

    #1

    Default owner using ALTER AUTHORIZATION

    Hello,

    I have an SQL Server 2005 database that I'm trying to create using script.
    Everything works fine, but when I click on "Database Diagrams" I get an
    error message that there is no database owner, and of course when I show the
    Database Properties, the database was created without one. Is there any way
    to ALTER AUTHORIZATION to a default owner or system administrator, something
    valid?

    Any direction would be appreciated.

    Thanks!
    Rick


  • Marcin A. Guzowski

    #2
    Re: Default owner using ALTER AUTHORIZATION

    Rico wrote:
    Hello,
    >
    I have an SQL Server 2005 database that I'm trying to create using script.
    Everything works fine, but when I click on "Database Diagrams" I get an
    error message that there is no database owner, and of course when I show the
    Database Properties, the database was created without one. Is there any way
    to ALTER AUTHORIZATION to a default owner or system administrator, something
    valid?
    >
    Any direction would be appreciated.
    I'm not sure if I understood you correctly, but please refer to
    sp_changedbowne r stored procedure. Actually ALTER AUTHORIZATION
    statement is also valid.

    Try:

    EXEC sp_changedbowne r 'sa'

    or

    ALTER AUTHORIZATION ON DATABASE::datab ase_name TO sa


    --
    Best regards,
    Marcin Guzowski

    Comment

    Working...