2018年11月6日 星期二

安裝WideWorldImporters範例資料庫


Tool:SQL Server Management Studio V17.3
DB:SQL Server 2014

OS:Windows 10

安裝WideWorldImporters範例資料庫筆記

1.先到此網址下載WideWorldImporters-Full.bak檔案,放到 C:\DB  資料夾

https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0

2.在SQL Server Management Studio 執行以下查詢

restore filelistonly from disk='C:\DB\WideWorldImporters-Full.bak'

--restore db
restore database WideWorldImporters from disk='C:\DB\WideWorldImporters-Full.bak'
with
move 'WWI_Primary' to 'C:\DB\WideWorldImporters.mdf',
move 'WWI_UserData' to 'C:\DB\WideWorldImporters_UserData.ndf',
move 'WWI_Log' to 'C:\DB\WideWorldImporters_Log.ldf',
move 'WWI_InMemory_Data_1' to 'C:\DB\WideWorldImporters_InMemory_Data_1',
stats=10,recovery,replace

image

沒有留言:

總瀏覽量