Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Stellen Sie mehrere SQL Server-BAK-Dateien wieder her

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



Versuchen Sie so etwas.