Reply to Re: Default owner using ALTER AUTHORIZATION

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация