microsoft / microsoft/sql-server-samples

Cannot restore WideWorldImporters on SQL Server running on Linux

Open
#740 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Description

When I try to restore WideWorldImporters on Linux (Debian 10, SquirrelSql), I get the following errors:

Error: Directory lookup for the file "D:\Data\WideWorldImporters.mdf" failed with the operating system error 2(The system cannot find the file specified.).
SQLState: S1000
ErrorCode: 5133
Error: File 'WWI_Primary' cannot be restored to 'D:\Data\WideWorldImporters.mdf'. Use WITH MOVE to identify a valid location for the file.
SQLState: S1000
ErrorCode: 3156
Error: Directory lookup for the file "D:\Data\WideWorldImporters_UserData.ndf" failed with the operating system error 2(The system cannot find the file specified.).
SQLState: S1000
ErrorCode: 5133
Error: File 'WWI_UserData' cannot be restored to 'D:\Data\WideWorldImporters_UserData.ndf'. Use WITH MOVE to identify a valid location for the file.
SQLState: S1000
ErrorCode: 3156
Error: Directory lookup for the file "E:\Log\WideWorldImporters.ldf" failed with the operating system error 2(The system cannot find the file specified.).
SQLState: S1000
ErrorCode: 5133
Error: File 'WWI_Log' cannot be restored to 'E:\Log\WideWorldImporters.ldf'. Use WITH MOVE to identify a valid location for the file.
SQLState: S1000
ErrorCode: 3156
Error: The path specified by "D:\Data\WideWorldImporters_InMemory_Data_1" is not in a valid directory.
SQLState: S1000
ErrorCode: 5121
Error: File 'WWI_InMemory_Data_1' cannot be restored to 'D:\Data\WideWorldImporters_InMemory_Data_1'. Use WITH MOVE to identify a valid location for the file.
SQLState: S1000
ErrorCode: 3156
Error: Problems were identified while planning for the RESTORE statement. Previous messages provide details.
SQLState: S1000
ErrorCode: 3119
Error: RESTORE DATABASE is terminating abnormally.
SQLState: S1000
ErrorCode: 3013

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WideWorldImporters restore instructions and the RESTORE DATABASE command used for the sample. Reproduce the failure on SQL Server running on Linux, then inspect how the referenced Windows drive paths are supplied. Done means the sample can be restored using valid Linux paths and the documented steps no longer produce these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, sql
Domain
databases, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.