Skip to content

Commit c0baab5

Browse files
Add Explanation SQL Server on Linux to document.
Add Explanation SQL Server on Linux. If SQL Server on Linux user follow this document,he will get error. Error detail is written "Restore your database on Linux" in [Migrate a SQL Server database from Windows to Linux using backup and restore](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-restore-database?view=sql-server-ver15) . I suggest modify this document.
1 parent e120899 commit c0baab5

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

docs/samples/adventureworks-install-configure.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ You can restore your sample database using Transact-SQL (T-SQL). An example to r
8888

8989
To restore AdventureWorks2019, modify values as appropriate to your environment and then run the following Transact-SQL (T-SQL) command:
9090

91+
## Windows
92+
9193
```sql
9294
USE [master]
9395
RESTORE DATABASE [AdventureWorks2019]
@@ -97,6 +99,21 @@ GO
9799

98100
```
99101

102+
## SQL Server on Linux
103+
104+
You need to chagen Windows filesystem path to Linux file system path.
105+
106+
```sql
107+
USE [master]
108+
RESTORE DATABASE [AdventureWorks2019]
109+
FROM DISK = '/var/opt/mssql/backup/AdventureWorks2019.bak'
110+
WITH MOVE 'AdventureWorks2017' TO '/var/opt/mssql/data/AdventureWorks2019.mdf',
111+
MOVE 'AdventureWorks2017_log' TO '/var/opt/mssql/data/AdventureWorks2019_log.ldf',
112+
FILE = 1, NOUNLOAD, STATS = 5
113+
GO
114+
115+
```
116+
100117
# [Azure Data Studio](#tab/data-studio)
101118

102119
If you're not familiar using [Azure Data Studio Studio](../azure-data-studio/download-azure-data-studio.md), you can see [connect & query](../azure-data-studio/quickstart-sql-server.md) to get started
@@ -189,4 +206,4 @@ Once you've restored your sample database, using the following tutorials to get
189206

190207
[Tutorials for SQL Server database engine](../relational-databases/database-engine-tutorials.md)
191208
[Connect and query with SQL Server Management Studio (SSMS)](../ssms/quickstarts/connect-query-sql-server.md)
192-
[Connect and query with Azure Data Studio](../ssms/quickstarts/connect-query-sql-server.md)
209+
[Connect and query with Azure Data Studio](../ssms/quickstarts/connect-query-sql-server.md)

0 commit comments

Comments
 (0)