(332) 331-8677

RESTORE (Transact-SQL) - MS SQL Server - Ubuntu

SELECT physical_name FROM sys.master_files;
USE master;
RESTORE DATABASE NameDb FROM  DISK = '/home/username/NameDb.bak' WITH  FILE = 2,  NOUNLOAD,  REPLACE,  STATS = 5,
MOVE 'NameDb' TO '/var/opt/mssql/data/NameDb.mdf',
MOVE 'NameDb_log' TO '/var/opt/mssql/data/NameDb_log.ldf'
GO