Dan Guzman
3/22/2007 1:15:00 PM
> Msg 15151, Level 16, State 1, Line 4
> Cannot find the principal 'Administrator', because it does not exist or
> you
> do not have permission.
If you want to change database ownership to the local Windows Administrator
account, try:
ALTER AUTHORIZATION ON DATABASE::MyDatabaseName TO
[MyServerName\Administrator];
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Sandy" <Sandy@discussions.microsoft.com> wrote in message
news:011AA8B4-41B0-4524-BDA1-F7CD99363F9E@microsoft.com...
> Thanks for your reply, Dan.
>
> I cut and pasted your suggestion, inserting the name of my database and
> received the following message:
>
> Msg 15151, Level 16, State 1, Line 4
> Cannot find the principal 'Administrator', because it does not exist or
> you
> do not have permission.
>
> Any other suggestions?
> --
> Sandy
>
>
> "Dan Guzman" wrote:
>
>> > What am I doing wrong?
>>
>> You need to specify 'DATABASE' as the entity type. Try
>>
>> ALTER AUTHORIZATION ON DATABASE::MyDatabaseName TO Administrator;
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Sandy" <Sandy@discussions.microsoft.com> wrote in message
>> news:698CCA0F-9BC4-413A-8A02-E29A6598918E@microsoft.com...
>> > Hello -
>> >
>> > I copied a database from work and attached it on my home computer.
>> > When I
>> > tried to access the diagram I received the following message:
>> >
>> > 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.
>> >
>> > I tried using the Files page and couldn't see what they were referring
>> > to.
>> > I then tried an Alter Authorization statement as follows
>> >
>> > ALTER AUTHORIZATION ON MyDatabaseName TO Administrator;
>> >
>> > Msg 15151, Level 16, State 1, Line 3
>> > Cannot find the object 'MyDatabaseName', because it does not exist or
>> > you
>> > do
>> > not have permission.
>> >
>> > Obviously, MyDatabaseName is the real DB name . . .
>> >
>> > What am I doing wrong?
>> >
>> > Any help will be greatly appreciated!
>> > --
>> > Sandy
>>
>>