-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
setup.other_databases.restore.sql
21 lines (16 loc) · 1.14 KB
/
setup.other_databases.restore.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- Enrique Catalá:
-- Web: https://www.clouddataninjas.com
-- Linkedin: https://www.linkedin.com/in/enriquecatala/
-- Support: https://github.com/sponsors/enriquecatala
RESTORE DATABASE [AdventureWorks2016] FROM DISK = N'/var/opt/mssql/backup/AdventureWorks2016.bak' WITH
FILE = 1, MOVE N'AdventureWorks2016_Data' TO N'/var/opt/mssql/data/AdventureWorks2016_Data.mdf',
MOVE N'AdventureWorks2016_Log' TO N'/var/opt/mssql/data/AdventureWorks2016_Log.ldf',
REPLACE, NOUNLOAD, STATS = 2
RESTORE DATABASE [AdventureWorks2014] FROM DISK = N'/var/opt/mssql/backup/AdventureWorks2014.bak' WITH
FILE = 1, MOVE N'AdventureWorks2014_Data' TO N'/var/opt/mssql/data/AdventureWorks2014_Data.mdf',
MOVE N'AdventureWorks2014_Log' TO N'/var/opt/mssql/data/AdventureWorks2014_Log.ldf',
REPLACE, NOUNLOAD, STATS = 2;
RESTORE DATABASE [AdventureWorks2012] FROM DISK = N'/var/opt/mssql/backup/AdventureWorks2012.bak' WITH
FILE = 1, MOVE N'AdventureWorks2012' TO N'/var/opt/mssql/data/AdventureWorks2012.mdf',
MOVE N'AdventureWorks2012_log' TO N'/var/opt/mssql/data/AdventureWorks2012_log.ldf',
REPLACE, NOUNLOAD, STATS = 2