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