1. Home
  2. Windows
  3. Mssql database backup restore script

Mssql database backup restore script

USE [master]
RESTORE DATABASE [Algeria]
FROM DISK = N’C:\db\db\Algeria_FULL_05282021_131711.BAK’ WITH FILE = 1,
     MOVE N’Algeria’ TO N’C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\Algeria.mdf’,
     MOVE N’Algeria_log’ TO N’C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\Algeria_log.ldf’,
NOUNLOAD,
REPLACE,
STATS = 5;

Was this article helpful?

Related Articles

footer shape