Importing a database with the same user as already on system.

Posted on 2011-04-18
Last Modified: 2012-06-22
Hi, my SQL install has a user called 'sitecore' with password '123'.
When I import a database (another MDF) from another machine that also had the user 'sitecore' but with a different password of 'oldpass' I cannot login.

On the imported machine trying both sitecore/123 or sitecore/oldpass does not work.

One solution I found was deleting the 'sitecore' user from the imported database and creating it again, but I don't want to do that. Is there a way to match these usernames up so I can login?
Question by:dazkraz
    LVL 29

    Accepted Solution

    yes :

    EXEC sp_change_users_login 'Auto_Fix', 'user'


    Author Closing Comment

    Yes, but needs to be run on each database.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
    SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now