Home Forums SQL Server 2008 Security (SS2K8) I'm baffled - Msg 15022 The specified user name is already aliased RE: I'm baffled - Msg 15022 The specified user name is already aliased

  • the issue here is an orphaned user: that is, you have a SQL login [sw] , but you restored the DATABASE from another server....that local.sw <> restoreddb.sw , based on the sids stored in sys.server_principals and the databases database_principals.

    the database user sw DOES exist, but it's the"wrong" sw;

    it's like my "bob" in my office is not the same "bob" in your office.

    the easy fix is this command to fix the orphan:

    ALTER USER swWITH LOGIN = sw;

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!