Re: Error 15022: The specified user name is already aliased.

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 10/16/03


Date: Thu, 16 Oct 2003 14:44:05 -0400

You can use sp_change_users_login to fix this. See this for more info:

http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers

-- 
Andrew J. Kelly
SQL Server MVP
"Ata John" <anonymous@discussions.microsoft.com> wrote in message
news:02d501c39412$7738f710$a301280a@phx.gbl...
> Hi,
>
> I am getting this error message after I restored a
> database backup from Production to a test box: error
> 15022: The specified user name is already aliased.
> However when you go to security > logins > and you go the
> properties tab of the userID, the database access tab
> doesn't show that the database has been checked. Under the
> permit role it shows that the user has a dbo role. Tried
> to checked the database and it turns out with this error.
>
> Any idea folks?
>
> Thanks
>
> Ata John


Relevant Pages

  • Re: logins fail after re attaching Database
    ... http://www.support.microsoft.com/?id=168001 User Logon and/or Permission ... Issues When a Database Is Moved Between SQL Servers ...
    (microsoft.public.sqlserver.security)
  • RE: moving/copying database
    ... Here are links to some articles that should help you resolve your problem. ... When a Database Is Moved Between SQL Servers ...
    (microsoft.public.sqlserver.server)
  • Re: Preserve Logins and Users
    ... How To Transfer Logins and Passwords Between SQL Servers ... Q240872 How to Resolve Permission Issues When a Database Is Moved Between ...
    (microsoft.public.sqlserver.security)
  • Re: Logging in irrespective of database access
    ... Try connecting using Query Analyzer with one of the problem logins and run ... the following in the context of your demodata and accounts databases: ... This will return the security context used to access the database. ... SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: Logging in irrespective of database access
    ... Try connecting using Query Analyzer with one of the problem logins and run ... the following in the context of your demodata and accounts databases: ... This will return the security context used to access the database. ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)