I would like to know how to copy all the data from a database X1 into a database X2 on SQL Server please.

2 Answers 2


Some options are:

  1. Create a backup and restore as a different name (if on same server): https://www.nucleustechnologies.com/blog/restore-sql-database-with-a-different-name/

  2. Script a database by using the Generate Scripts option using Types of data to script set to Schema and Data;

  3. Use the Import and Export Data with the SQL Server Import and Export Wizard.


I think JShark's answer covers the simplest ways to tackle this, but if you want something very quick and PS-based check out DBATools. Even if you're not too familiar with PowerShell, the Copy-DbaDatabase command in the link is pretty easy to use depending on your se

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.