Skip to content

Commit 8050df4

Browse files
authored
Merge pull request #19059 from MicrosoftDocs/master
4/08 AM Publish
2 parents 09122d0 + 014357f commit 8050df4

File tree

8 files changed

+241
-265
lines changed

8 files changed

+241
-265
lines changed

docs/linux/sql-server-linux-migrate-restore-database.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This tutorial shows how to take a SQL Server database backup on Win
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: vanto
7-
ms.date: 08/16/2017
7+
ms.date: 04/08/2021
88
ms.topic: conceptual
99
ms.prod: sql
1010
ms.technology: linux
@@ -97,7 +97,7 @@ To restore the database, you must first transfer the backup file from the Window
9797
9898
## Move the backup file before restoring
9999
100-
At this point, the backup file is on your Linux server in your user's home directory. Before restoring the database to SQL Server, you must place the backup in a subdirectory of **/var/opt/mssql**.
100+
At this point, the backup file is on your Linux server in your user's home directory. Before restoring the database to SQL Server, you must place the backup in a subdirectory of **/var/opt/mssql**, as this is owned by the user `mssql` and group `mssql`. If you are looking to change the default backup location, see the [Configure with mssql-conf](sql-server-linux-configure-mssql-conf.md#backupdir) article.
101101
102102
1. In the same Windows Bash session, connect remotely to your target Linux machine with **ssh**. The following example connects to the Linux machine **192.0.2.9** as user **user1**.
103103
@@ -229,4 +229,4 @@ In this tutorial, you learned how to back up a database on Windows and move it t
229229
Next, explore other migration scenarios for SQL Server on Linux.
230230
231231
> [!div class="nextstepaction"]
232-
>[Migrate databases to SQL Server on Linux](sql-server-linux-migrate-overview.md)
232+
>[Migrate databases to SQL Server on Linux](sql-server-linux-migrate-overview.md)

docs/relational-databases/performance/intelligent-query-processing.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,27 @@ The following table details all intelligent query processing features, along wit
4646
| [Table Variable Deferred Compilation](#table-variable-deferred-compilation) | Yes, under compatibility level 150| Yes, starting in [!INCLUDE[sql-server-2019](../../includes/sssql19-md.md)] under compatibility level 150|Use the actual cardinality of the table variable encountered on first compilation instead of a fixed guess.|
4747

4848
## Batch mode Adaptive joins
49+
50+
**Applies to:** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (Starting with [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)]), [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)]
51+
4952
The batch mode Adaptive Joins feature enables the choice of a [Hash Join or Nested Loops Join](../../relational-databases/performance/joins.md) method to be deferred until **after** the first input has been scanned, by using a single cached plan. The Adaptive Join operator defines a threshold that is used to decide when to switch to a Nested Loops plan. Your plan can therefore dynamically switch to a better join strategy during execution.
5053

5154
For more information, including how to disable Adaptive joins without changing the compatibility level, see [Understanding Adaptive joins](../../relational-databases/performance/joins.md#adaptive).
5255

5356
## Batch mode memory grant feedback
57+
58+
**Applies to:** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (Starting with [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)]), [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)]
59+
5460
A query's post-execution plan in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] includes the minimum required memory needed for execution and the ideal memory grant size to have all rows fit in memory. Performance suffers when memory grant sizes are incorrectly sized. Excessive grants result in wasted memory and reduced concurrency. Insufficient memory grants cause expensive spills to disk. By addressing repeating workloads, batch mode memory grant feedback recalculates the actual memory required for a query and then updates the grant value for the cached plan. When an identical query statement is executed, the query uses the revised memory grant size, reducing excessive memory grants that impact concurrency and fixing underestimated memory grants that cause expensive spills to disk.
5561
The following graph shows one example of using batch mode adaptive memory grant feedback. For the first execution of the query, duration was **88 seconds** due to high spills:
5662

5763
```sql
5864
DECLARE @EndTime datetime = '2016-09-22 00:00:00.000';
5965
DECLARE @StartTime datetime = '2016-09-15 00:00:00.000';
66+
6067
SELECT TOP 10 hash_unique_bigint_id
6168
FROM dbo.TelemetryDS
62-
WHERE Timestamp BETWEEN @StartTime and @EndTime
69+
WHERE Timestamp BETWEEN @StartTime AND @EndTime
6370
GROUP BY hash_unique_bigint_id
6471
ORDER BY MAX(max_elapsed_time_microsec) DESC;
6572
```
@@ -166,6 +173,9 @@ OPTION (USE HINT ('DISABLE_ROW_MODE_MEMORY_GRANT_FEEDBACK'));
166173
A USE HINT query hint takes precedence over a database scoped configuration or trace flag setting.
167174

168175
## Interleaved execution for MSTVFs
176+
177+
**Applies to:** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (Starting with [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)]), [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)]
178+
169179
With interleaved execution, the actual row counts from the function are used to make better-informed downstream query plan decisions. For more information on multi-statement table-valued functions (MSTVFs), see [Table-valued functions](../../relational-databases/user-defined-functions/create-user-defined-functions-database-engine.md#TVF).
170180

171181
Interleaved execution changes the unidirectional boundary between the optimization and execution phases for a single-query execution and enables plans to adapt based on the revised cardinality estimates. During optimization if we encounter a candidate for interleaved execution, which is currently **multi-statement table-valued functions (MSTVFs)**, we will pause optimization, execute the applicable subtree, capture accurate cardinality estimates, and then resume optimization for downstream operations.

docs/relational-databases/security/encryption/rotate-always-encrypted-keys-using-powershell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ You can rotate a column encryption key using an offline or an online approach. T
293293
|Step 3. Authenticate to Azure, if your column master key (protecting the column encryption key, to be rotated), is stored in Azure Key Vault. | [Add-SqlAzureAuthenticationContext](/powershell/sqlserver/sqlserver/vlatest/add-sqlazureauthenticationcontext) | Yes | No
294294
|Step 4. Generate a new column encryption key, encrypt it with the column master key and create column encryption key metadata in the database. | [New-SqlColumnEncryptionKey](/powershell/sqlserver/sqlserver/vlatest/new-sqlcolumnencryptionkey)<br><br>**Note:** Use a variation of the cmdlet that internally generates and encrypts a column encryption key.<br>Under the covers this cmdlet issues the [CREATE COLUMN ENCRYPTION KEY (Transact-SQL)](../../../t-sql/statements/create-column-encryption-key-transact-sql.md) statement to create the key metadata. | Yes | Yes
295295
|Step 5. Find all columns encrypted with the old column encryption key. | [SQL Server Management Objects (SMO) Programming Guide](../../../relational-databases/server-management-objects-smo/sql-server-management-objects-smo-programming-guide.md) | No | Yes
296-
|Step 6. Create a *SqlColumnEncryptionSettings* object for each impacted column. SqlColumnMasterKeySettings is an object that exists in memory (in PowerShell). It specifies the target encryption scheme for a column. In this case, the object should specify the impacted column should be encrypted using the new column encryption key. | [New-SqlColumnEncryptionSettings](/powershell/sqlserver/sqlserver/vlatest/new-sqlcolumnencryptionsettings) | No | No
296+
|Step 6. Create a *SqlColumnEncryptionSettings* object for each impacted column. SqlColumnEncryptionSettings is an object that exists in memory (in PowerShell). It specifies the target encryption scheme for a column. In this case, the object should specify the impacted column should be encrypted using the new column encryption key. | [New-SqlColumnEncryptionSettings](/powershell/sqlserver/sqlserver/vlatest/new-sqlcolumnencryptionsettings) | No | No
297297
|Step 7. Re-encrypt the columns, identified in step 5, using the new column encryption key. | [Set-SqlColumnEncryption](/powershell/sqlserver/sqlserver/vlatest/set-sqlcolumnencryption)<br><br>**Note:** This step may take a long time. Your applications won't be able to access the tables through the entire operation or a portion of it, depending on the approach (online vs. offline), you select. | Yes | Yes
298298
|Step 8. Remove the metadata for the old column encryption key. | [Remove-SqlColumnEncryptionKey](/powershell/sqlserver/sqlserver/vlatest/remove-sqlcolumnencryptionkey) | No | Yes
299299

@@ -355,4 +355,4 @@ Remove-SqlColumnEncryptionKey -Name $oldCekName -InputObject $database
355355
- [ALTER COLUMN ENCRYPTION KEY (Transact-SQL)](../../../t-sql/statements/alter-column-encryption-key-transact-sql.md)
356356
- [DROP COLUMN ENCRYPTION KEY (Transact-SQL)](../../../t-sql/statements/drop-column-encryption-key-transact-sql.md)
357357
- [sys.column_master_keys (Transact-SQL)](../../../relational-databases/system-catalog-views/sys-column-master-keys-transact-sql.md)
358-
- [sys.column_encryption_keys (Transact-SQL)](../../../relational-databases/system-catalog-views/sys-column-encryption-keys-transact-sql.md)
358+
- [sys.column_encryption_keys (Transact-SQL)](../../../relational-databases/system-catalog-views/sys-column-encryption-keys-transact-sql.md)

docs/relational-databases/system-functions/changetable-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CHANGETABLE (
6868
Is the value of the primary key. If there are multiple primary key columns, the values must be specified in the same order as the columns appear in the *column_name* list.
6969

7070
[ FORCESEEK ]
71-
**Applies to:** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (Starting with [!INCLUDE[sssql16-md](../../includes/sssql16-md.md)] SP2 CU16 and [!INCLUDE[sssql19-md](../../includes/sssql19-md.md)]), [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)], and [!INCLUDE[ssSDSMIfull](../../includes/sssdsmifull-md.md)]
71+
**Applies to:** [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (Starting with [!INCLUDE[sssql16-md](../../includes/sssql16-md.md)] SP2 CU16 and [!INCLUDE[sssql19-md](../../includes/sssql19-md.md)] CU9), [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)], and [!INCLUDE[ssSDSMIfull](../../includes/sssdsmifull-md.md)]
7272

7373
Optional parameter that forces a seek operation to be used to access the *table_name*. In some cases where very few rows have changed, a scan operation may still be used to access the *table_name*. If a scan operation this introduces a performance issue, use the `FORCESEEK` parameter.
7474

docs/relational-databases/user-defined-functions/scalar-udf-inlining.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Depending upon the complexity of the logic in the UDF, the resulting query plan
134134
- `DECLARE`, `SET`: Variable declaration and assignments.
135135
- `SELECT`: SQL query with single/multiple variable assignments <sup>1</sup>.
136136
- `IF`/`ELSE`: Branching with arbitrary levels of nesting.
137-
- `RETURN`: Single or multiple return statements.
137+
- `RETURN`: Single or multiple return statements. Starting with [!INCLUDE[sql-server-2019](../../includes/sssql19-md.md)] CU5, the UDF can only contain a single RETURN statement to be considered for inlining <sup>6</sup>.
138138
- `UDF`: Nested/recursive function calls <sup>2</sup>.
139139
- Others: Relational operations such as `EXISTS`, `ISNULL`.
140140
- The UDF does not invoke any intrinsic function that is either time-dependent (such as `GETDATE()`) or has side effects <sup>3</sup> (such as `NEWSEQUENTIALID()`).

0 commit comments

Comments
 (0)