/* ------------------------ My Meta Content Here SEO ------------------------ */

Pages

Main Menu

Wednesday, August 28, 2019

SQL Database Cloning (Clone an existing database to a new database) Create database replica

Duplicating SQL DatabaseI need to essentially copy all of these tables and the data and the constraints exactly from one database to another. The simplest backup command would be: BACKUP DATABASE [db-prod] TO DISK = 'D:\dbbackup\db-prod.bak' WITH INIT; Now to restore this as a different database, you need to know the file names because it will try to put the same files in the same place. So if you run the following: EXEC [db-prod].dbo.sp_helpfile;You should see output that contains the...
Read More »

My Blog List