Re: SQL 2005 Express-Database does not have a valid owner?



You Windows account is probably sysadmin on the instance. As such, it is
mapped to the 'dbo' user in any database. But 'dbo' is mapped to the
original account that created the database. By changing the 'authorization'
on the database, you restore the 'dbo' to be mapped to a valid account.
By doing this you are not forced to use SQL authentication, this procedure
does no affect your login in any way. You already have a number of databases
owned by 'sa' in your instance anyway: master, model, msdb, tempb.
You could just as well use ALTER AUTHORIZATION ON DATABASE::<dbname> TO
[MYDOMAIN\MyUserAccount] if you feel like.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

HTH,
~ Remus Rusanu

SQL Service Broker
http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx


"news.sbcglobal.net" <groomeryNOSPAM@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OIHeg.102799$dW3.68019@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can you help me understand the reasoning a bit better? My database server
is set up to use Windows Authentication. I am already logged on as
'MYDOMAIN\MyUserAccount' and this account is (according to SQL Server)
already the owner of the database. Am I missing something? I don't want
to use SQL Server Authentication (which I would have to use if I create
the 'SA' account as you described).

I appreciate the help.
Thanks!

"Remus Rusanu [MSFT]" <Remus.Rusanu.NoSpam@xxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:OnZIGr0gGHA.1272@xxxxxxxxxxxxxxxxxxxxxxx
You have to change the database owner to a valid login account, e.g. SA:

ALTER AUTHORIZATION ON DATABASE::[dbname] TO [SA];

Also sp_changedbowner will do the trick, see
http://msdn2.microsoft.com/en-us/library/ms178630.aspx

--
This posting is provided "AS IS" with no warranties, and confers no
rights.

HTH,
~ Remus Rusanu

SQL Service Broker
http://msdn2.microsoft.com/en-us/library/ms166043(en-US,SQL.90).aspx


"news.sbcglobal.net" <groomeryNOSPAM@xxxxxxxxxxxxxxxxxxx> wrote in
message news:v4peg.35775$4L1.22992@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am having some difficulty creating database diagrams in SQL Server
Express 2005.

My design machine is running Windows XP Pro. This machine is a member
of a Windows 2000 domain that I will call MYDOMAIN. I am logged on the
design machine as MYDOMAIN\MyUserAccount. This account has local
administrator rights on the design machine.

Having said all that, here's a description of my problem:

I have created a database (MyDatabase) and I would like to create a
database diagram. I have checked to make sure that
MYDOMAIN\MyUserAccount is the database owner. However, when I click on
MyDatabase/Database Diagrams in SQL Server Management Studio Express, I
receive the following error message (following a fairly lengthy wait):

---------------------------------
Database diagram support objects cannot be installed because this
database does not have a valid owner. To continue, first user 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
diagram support object.
---------------------------------

As I said, I have ensured that my user account is the database owner. I
have not run the ALTER AUTHORIZATION statement (because I don't yet know
what, if anything, this will do considering the fact that I am already
designated as database owner). Going further through the database
properties (under Permissions/View Server Permissions), I receive the
following error message:

---------------------------------
Cannot show requested dialog.

Additional Information:
Could not load file or assembly 'file:///C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\SQLManagerUi.dll' or one of its
dependencies. The system cannot find the file specified. (mscorlib)
---------------------------------

I don't know whether this error is related to the first, however it
seemed relevant to me in that it pertains to permissions.

Hopefully this is enough information to work with. I'd appreciate any
help you can offer to resolve this problem.

Thanks!











.



Relevant Pages

  • Re: Beginner security questions
    ... Since you've installed with "Windows Only" you may have a few steps to take ... You could try to create a user account on the SQL ... Reinstall sql server in mixed mode (remember to back up your database ...
    (microsoft.public.sqlserver.security)
  • RESTORING CRASHED SITE WEBS
    ... I reformatted and reinstalled Windows 2003. ... access using Windows Security the account returned in the failed login ... RESTORE ALL SQL AND WSS DATABASES ... I put in the database server name and existing ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Hard Drive Crash, Restoring to Original Registered User
    ... programs work except a database I use which is locked, ... Probably doesn't matter what name is used for your Windows account. ... Everytime a new user account is created, and new SID is assigned to it. ... The "registered to" isn't used by your database. ...
    (microsoft.public.windowsxp.general)
  • Re: RESTORING CRASHED SITE WEBS
    ... I reformatted and reinstalled Windows 2003. ... > access using Windows Security the account returned in the failed login ... INSTALL WINDOWS SP1 ... I put in the database server name and existing ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Please! Doesnt anyone know a better way to do this?
    ... account, they need to automatically be directed to the page to enter data ... session variable on the Account page. ... I assume here that you're checking a database when the user attempts to ... When a new user attempts to login or clicks to register, ...
    (microsoft.public.dotnet.framework.aspnet)