how to create a user without a login name

  • I found my existing SQL Server database (called it A) has user (who is the db_owner) with <None> login name. I try to create a new user by defining its login name as <None> in the same database, but I got "Error 15007: The login '<None>' does not exist. Any advise? How to acheive this goal?

  • Logins are stored in master..syslogins. Users are stored in the db in the sysusers table. They are mapped together. If you have a "none", then the user-> login mapping is broken. See BOL for sp_change_users_login to fix this mapping.

    Steve Jones

    steve@dkranch.net

  • The only user I know of that would have none as the login name is guest account. Where exactly are you finding this?

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • I find the users with <None> as their login names in some of our SQL Server databases. They seems to work fine. The SQL Server does not complain it at all. In fact, one of these users is "dbo". I just can't figure out how they were created myself.

  • dbo is the only one by deafult which should look that way. If you see others then Steves statement on sp_change_users_login to fix this mapping is what you need. You should not be able to connect to those databases in most cases with those usernames.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply