devxlogo

Copying SQL Server Databases From One Server to Another

Database backups from one MS SQL Server (server1) could be used to create a copy of the database on another MS SQL Server (server2). But existing user to login mappings are not restored correctly even if same logins exists on server2. The databases restored in this way could be made accessible again to these users by using the sp_addalias system stored procedure. This SQL statement should be executed after connecting to the restored database on server2 using ISQL/W or some other query tool.

      sp_addalias , 

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  How Engineering Leaders Spot Weak Proposals

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.