Re: User Mapping question



So apparently SSMS attempts to create the specified user in the specified databases -- when I wanted a mapping.

The mapping for the 'dbo' user is determined by database ownership. You can specify the database owner with:

USE MyDatabase
EXEC sp_changedbowner 'SomeLogin'

--
Hope this helps.

Dan Guzman
SQL Server MVP

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message news:uzDZZ259GHA.1220@xxxxxxxxxxxxxxxxxxxxxxx
SS05/SSMS

I select Login Properties for a domain account and select User Mapping.

I'd like to map this login to the dbo user on a couple of dbs. However, if I check the "Map" checkbox and enter "dbo" for the User column and then click "OK" I receive the error :

"Create failed for User 'dbo' (Microsoft.SqlServer.Smo)
Additional information:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
User, group, or role 'dbo' already exists in the current database. (Microsoft SQL Server, Error: 15023)

So apparently SSMS attempts to create the specified user in the specified databases -- when I wanted a mapping.


.



Relevant Pages

  • Re: Developer design Best Practices
    ... The database owner login is a special case and is not specified like a ... You can execute sp_changedbowner to specify the owner or ... > and then I move them, and the owner is dbo. ... > There is NO DBO User in our dev database!! ...
    (microsoft.public.sqlserver.server)
  • Re: Change dbo
    ... I have a database where a user is defined as the dbo on a database. ... I tried using SQL Server Manger ... The login for this person maps to dbo. ...
    (microsoft.public.sqlserver.security)
  • Re: Groups for dbo
    ... Thanks for the instructions on changing the database owner...I suspect ... While dbo is SUPPOSED to be a special user that's not used for routine ... It's probably safer to change the database owner in any event, ... >> I'm still fairly new to SQL Server, and I'm trying to figure something ...
    (microsoft.public.sqlserver.security)
  • Re: Change UDF Owner
    ... system_function_schema -especially in the master database. ... Most good judgment comes from experience. ... dbo is in the context of a database, and can be the schema owner for the ... Users can be put in the dbo role, ...
    (microsoft.public.sqlserver.security)
  • Re: Change dbo
    ... I have a database where a user is defined as the dbo on a database. ... I tried using SQL Server Manger ... The login for this person maps to dbo. ...
    (microsoft.public.sqlserver.security)