|
Posted by Marcin A. Guzowski on 01/08/07 20:12
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_changedbowner stored procedure. Actually ALTER AUTHORIZATION
statement is also valid.
Try:
EXEC sp_changedbowner 'sa'
or
ALTER AUTHORIZATION ON DATABASE::database_name TO sa
--
Best regards,
Marcin Guzowski
http://guzowski.info
Navigation:
[Reply to this message]
|