SQL Server Logins - Migration

Posted on 2011-10-18
Last Modified: 2012-05-12
Hi All,

I am in the process of migrating some databases from one server to a new build.

Is there a way I can script all of my server login accounts onto the new server?

(both servers are SQL 2008 R2)


Question by:techmiss
    LVL 9

    Accepted Solution

    Try this Generate Sql Login script for all users

    Author Closing Comment

    That was almost too easy...thanks!

    LVL 9

    Expert Comment

    Press F7 in sqlserver Managment studio
    Object Explorer Details screen appears
    click on SqlserverInstance>>Security>>Logins

    Logins will appear

    select multiple logins
    Right click>>Script Login as>>Drop and Create to>>New Query Editor Window

    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

    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    761 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

    7 Experts available now in Live!

    Get 1:1 Help Now