Re: logins fail after re attaching Database

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


Date: Tue, 28 Oct 2003 17:02:54 -0500

Take a look here:

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
"TIm" <anonymous@discussions.microsoft.com> wrote in message
news:027401c39d96$b23922d0$a601280a@phx.gbl...
> I recently rebuilt my sql server then re attached
> databases that i had detached prior to the rebuild. I
> then ran scripts that i had generated to re created the
> users and roles. But now what happens is the users are
> there and under security\logins it shows them with no
> database access, and wont let me assign any stating that
> the user already exists in the database.
>
> Under the the database\users it shows the users with
> their appropriate role assignments. but the logins dont
> work.
>
> I also tried to delete one of the users from security
> then remove him from all the roles under the datase and
> recreate but i still get the "User already exists in the
> Database" message
>
> Any Idea how i can get my logins to work again with their
> appropriate roles?
>
> Thanks
>


Relevant Pages

  • Re: Error 15022: The specified user name is already aliased.
    ... Issues When a Database Is Moved Between SQL Servers ... > permit role it shows that the user has a dbo role. ...
    (microsoft.public.sqlserver.security)
  • Re: Disaster Recovery Planning
    ... The logins can be transferred with DTS packages. ... > transfer logins to different server with thier original SID, default database ... > and server role settings but not the database permission setting. ...
    (microsoft.public.sqlserver.server)
  • 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)