Sqlserver
 sql >> Base de données >  >> RDS >> Sqlserver

Restaurer plusieurs fichiers SQL Server .bak

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



Essayez quelque chose comme ça.