< All Docs

Mssql database backup restore script

Create a Microhost account to try this guide with a $50 credit.

Table of Content

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;

Thank you!

Previous Installation and Configuration of IIS Web Server on Windows Server
Next Windows Server Backup feature (2012R2, 2016, 2019)
Table of Contents