Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Ripristina più file .bak di SQL Server

RESTORE DATABASE [db1] FROM  DISK = N'C:\folder\db1.bak' WITH  FILE = 1,  MOVE N'DB_Data' TO N'C:\folder\db2.mdf',  MOVE N'DB_log' TO N'C:\folder\db1.LDF',  NOUNLOAD,  STATS = 10
GO
RESTORE DATABASE [db2] FROM  DISK = N'C:\folder\db2.bak' WITH  FILE = 1,  MOVE N'DB_Data' TO N'C:\folder\db2.mdf',  MOVE N'DB_Log' TO N'C:\folder\db2.LDF',  NOUNLOAD,  STATS = 10
GO



Prova qualcosa del genere.