I need to redo some data types in a lot of tables in my SQL database and it says I need to rebuild the table, but I am very cautious on doing this because I am not certain on how to do it and dont wanna loose all the data. So I decided to try to copy the database and use it as a testing playground. The problem is I can not find how to do it or if I do its a solution form 2006 and the software interface has changed a lot since then.
On sqlexpress, we can backup database to another on MSSMS (Microsoft SQL Server Management Studio) like this:
Right-Click on Databases\Restore Database...

Then choose Source and Destination databases to copy.

In MS SQL Server, the easiest way to copy your DB with another name is the copy data wizard which is available under task menu.
Right-click on DB you want to copy --> Tasks --> Copy database
It will ask basic info like source and destination server, login credential etc and will copy the DB.

If you using Azure SQL DB, then below command will copy any database on same server.
Create Database New_database_name as copy of Database_you_want_To_Copy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With