Skip to content

Commit c1feefa

Browse files
authored
Merge pull request #6707 from MicrosoftDocs/FromPublicRepo
Confirm merge from FromPublicRepo to master to sync with https://github.com/MicrosoftDocs/sql-docs (branch live)
2 parents 492d54b + 0b476fe commit c1feefa

4 files changed

Lines changed: 48 additions & 9 deletions

File tree

docs/linux/sql-server-linux-active-directory-authentication.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ For more information, see the Red Hat documentation for [Discovering and Joining
200200
kvno MSSQLSvc/**<fully qualified domain name of host machine>**:**<tcp port>**
201201
```
202202

203+
> [!NOTE]
204+
> SPNs can take several minutes to propagate through your domain, especially if the domain is large. If you receive the error, "kvno: Server not found in Kerberos database while getting credentials for MSSQLSvc/\*\*\<fully qualified domain name of host machine\>\*\*:\*\*\<tcp port\>\*\*\@CONTOSO.COM", please wait a few minutes and try again.
205+
203206
2. Create a keytab file with **[ktutil](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html)** for the AD user you created in the previous step. When prompted, enter the password for that AD account.
204207

205208
```bash
@@ -217,20 +220,56 @@ For more information, see the Red Hat documentation for [Discovering and Joining
217220
> [!NOTE]
218221
> The ktutil tool does not validate the password, so make sure you enter it correctly.
219222
220-
3. Anyone with access to this `keytab` file can impersonate [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] on the domain, so make sure you restrict access to the file such that only the `mssql` account has read access:
223+
3. Add the machine account to your keytab with **[ktutil](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html)**. The machine account (also called a UPN) is present in `/etc/krb5.keytab` in the form "\<hostname\>$\@\<realm.com\>" (e.g. sqlhost$\@CONTOSO.COM). We will copy these entries from `/etc/krb5.keytab` to `mssql.keytab`.
224+
225+
```bash
226+
sudo ktutil
227+
228+
# Read all entries from /etc/krb5.keytab
229+
ktutil: rkt /etc/krb5.keytab
230+
231+
# List all entries
232+
ktutil: list
233+
234+
# Delete all entries by their slot number which are not the UPN one at a
235+
# time.
236+
# Warning: when an entry is deleted (e.g. slot 1), all values slide up by
237+
# one to take its place (e.g. the entry in slot 2 moves to slot 1 when slot
238+
# 1's entry is deleted)
239+
ktutil: delent <slot num>
240+
ktutil: delent <slot num>
241+
...
242+
243+
# List all entries to ensure only UPN entries are left
244+
ktutil: list
245+
246+
# When only UPN entries are left, append these values to mssql.keytab
247+
ktutil: wkt /var/opt/mssql/secrets/mssql.keytab
248+
249+
quit
250+
```
251+
252+
4. Anyone with access to this `keytab` file can impersonate [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] on the domain, so make sure you restrict access to the file such that only the `mssql` account has read access:
221253

222254
```bash
223255
sudo chown mssql:mssql /var/opt/mssql/secrets/mssql.keytab
224256
sudo chmod 400 /var/opt/mssql/secrets/mssql.keytab
225257
```
226258

227-
4. Configure [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] to use this `keytab` file for Kerberos authentication:
259+
5. Configure [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] to use this `keytab` file for Kerberos authentication:
228260

229261
```bash
230262
sudo /opt/mssql/bin/mssql-conf set network.kerberoskeytabfile /var/opt/mssql/secrets/mssql.keytab
231263
sudo systemctl restart mssql-server
232264
```
233265

266+
6. Optional: Disable UDP connections to the domain controller to improve performance. In many cases, UDP connections will always fail when connecting to a domain controller, so you can set config options in `/etc/krb5.conf` to skip UDP calls. Edit `/etc/krb5.conf` and set the following options:
267+
268+
```/etc/krb5.conf
269+
[libdefaults]
270+
udp_preference_limit=0
271+
```
272+
234273
## <a id="createsqllogins"></a> Create AD-based logins in Transact-SQL
235274

236275
1. Connect to [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] and create a new, AD-based login:
@@ -274,7 +313,7 @@ The specific connection string parameter for clients to use AD Authentication de
274313
* JDBC: [Using Kerberos Integrated Authentication to Connect SQL Server](https://docs.microsoft.com/sql/connect/jdbc/using-kerberos-integrated-authentication-to-connect-to-sql-server)
275314
* ODBC: [Using Integrated Authentication](https://docs.microsoft.com/sql/connect/odbc/linux/using-integrated-authentication)
276315
* ADO.NET: [Connection String Syntax](https://msdn.microsoft.com/library/system.data.sqlclient.sqlauthenticationmethod(v=vs.110).aspx)
277-
316+
278317
## Next steps
279318

280319
In this tutorial, we walked through how to set up Active Directory authentication with SQL Server on Linux. You learned how to:

docs/relational-databases/security/encryption/encrypt-a-column-of-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PASSWORD = '<some strong password>';
5858
```
5959
Always backup your database master key. For more information on database master keys, see [CREATE MASTER KEY &#40;Transact-SQL&#41;](../../../t-sql/statements/create-master-key-transact-sql.md).
6060

61-
#### To encrypt a column of data using a simple symmetric encryption
61+
#### To encrypt a column of data using symmetric encryption that includes an authenticator
6262

6363
1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../../includes/ssde-md.md)].
6464

@@ -117,7 +117,7 @@ Always backup your database master key. For more information on database master
117117
GO
118118
```
119119
120-
#### To encrypt a column of data using symmetric encryption that includes an authenticator
120+
#### To encrypt a column of data using a simple symmetric encryption
121121
122122
1. In **Object Explorer**, connect to an instance of [!INCLUDE[ssDE](../../../includes/ssde-md.md)].
123123

docs/relational-databases/triggers/ddl-triggers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: "DDL Triggers | Microsoft Docs"
33
ms.custom: ""
44
ms.date: "03/14/2017"
@@ -32,10 +32,10 @@ monikerRange: "= azuresqldb-current || >= sql-server-2016 || = sqlallproducts-al
3232
> Test your DDL triggers to determine their responses to system stored procedures that are run. For example, the CREATE TYPE statement and the **sp_addtype** stored procedure will both fire a DDL trigger that is created on a CREATE_TYPE event.
3333
3434
## Types of DDL Triggers
35-
Transact-SQL DDL Trigger
35+
### Transact-SQL DDL Trigger
3636
A special type of [!INCLUDE[tsql](../../includes/tsql-md.md)] stored procedure that executes one more more [!INCLUDE[tsql](../../includes/tsql-md.md)] statements in response to a server-scoped or database-scoped event. For example, a DDL Trigger may fire if a statement such as ALTER SERVER CONFIGURATION is executed or if a table is deleted by using DROP TABLE.
3737

38-
CLR DDL Trigger
38+
### CLR DDL Trigger
3939
Instead of executing a [!INCLUDE[tsql](../../includes/tsql-md.md)] stored procedure, a CLR trigger executes one or more methods written in managed code that are members of an assembly created in the .NET Framework and uploaded in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
4040

4141
DDL triggers fire only after the DDL statements that trigger them are run. DDL triggers cannot be used as INSTEAD OF triggers. DDL triggers do not fire in response to events that affect local or global temporary tables and stored procedures.

docs/t-sql/statements/set-implicit-transactions-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SET IMPLICIT_TRANSACTIONS { ON | OFF }
5555

5656
When OFF, each of the preceding T-SQL statements is bounded by an unseen BEGIN TRANSACTION and an unseen COMMIT TRANSACTION statement. When OFF, we say the transaction mode is *autocommit*. If your T-SQL code visibly issues a BEGIN TRANSACTION, we say the transaction mode is *explicit*.
5757

58-
There are several clarifying point to understand:
58+
There are several clarifying points to understand:
5959

6060
- When the transaction mode is implicit, no unseen BEGIN TRANSACTION is issued if @@trancount > 0 already. However, any explicit BEGIN TRANSACTION statements still increment @@TRANCOUNT.
6161

0 commit comments

Comments
 (0)