You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/sql-server-linux-migrate-restore-database.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,44 @@ To restore the database backup, you can use the **RESTORE DATABASE** Transact-SQ
159
159
160
160
You should get a message the database is successfully restored.
161
161
162
+
`RESTORE DATABASE` may return an error like the following example:
163
+
164
+
```bash
165
+
File 'YourDB_Product' cannot be restored to 'Z:\Microsoft SQL Server\MSSQL11.GLOBAL\MSSQL\Data\YourDB\YourDB_Product.ndf'. Use WITH MOVE to identify a valid location for the file.
166
+
Msg 5133, Level 16, State 1, Server servername, Line 1
167
+
Directory lookup for the file "Z:\Microsoft SQL Server\MSSQL11.GLOBAL\MSSQL\Data\YourDB\YourDB_Product.ndf" failed with the operating system error 2(The system cannot find the file specified.).
168
+
```
169
+
170
+
In this case, the database contains secondary files. If these files are not specified in the `MOVE` clause of `RESTORE DATABASE`, the restore procedure will try to create them in the same pathas the original server.
171
+
172
+
You can list all files included in the backup:
173
+
```sql
174
+
RESTORE FILELISTONLY FROM DISK = '/var/opt/mssql/backup/YourDB.bak'
175
+
GO
176
+
```
177
+
You should get a list like the one below (listing only the two first columns):
0 commit comments