-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathsetup.bigdatabases.restore.sql
More file actions
23 lines (19 loc) · 951 Bytes
/
setup.bigdatabases.restore.sql
File metadata and controls
23 lines (19 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- Enrique Catalá:
-- Web: https://www.clouddataninjas.com
-- Linkedin: https://www.linkedin.com/in/enriquecatala/
-- Support: https://github.com/sponsors/enriquecatala
-- NOTE: Since there is a bug with WSL2 on Windows10, we can´t restore databases directly and first require a deploy of empty data, thats the reason for the CREATE DATABASE commands
-- AdventureworksDW2017
--
RESTORE DATABASE [AdventureWorksDW2017] FROM
DISK = N'/var/opt/mssql/backup/AdventureWorksDW2017.bak' WITH
FILE = 1, MOVE N'AdventureWorksDW2017' TO N'/var/opt/mssql/data/AdventureWorksDW2017.mdf',
MOVE N'AdventureWorksDW2017_log' TO N'/var/opt/mssql/data/AdventureWorksDW2017_log.ldf',
REPLACE, NOUNLOAD, STATS = 2;
-- -- StackOverflow2010
-- --
-- CREATE DATABASE [StackOverflow2010] ON
-- ( FILENAME = N'/var/opt/mssql/data/StackOverflow2010.mdf' ),
-- ( FILENAME = N'/var/opt/mssql/data/StackOverflow2010_log.ldf' )
-- FOR ATTACH
-- GO