|
2 | 2 | title: "ALTER DATABASE SET Options (Transact-SQL) | Microsoft Docs" |
3 | 3 | description: Learn about how to set database options such as automatic tuning, encryption, query store in a SQL Server and Azure SQL Database |
4 | 4 | ms.custom: "" |
5 | | -ms.date: "12/20/2017" |
| 5 | +ms.date: "6/01/2018" |
6 | 6 | ms.prod: sql |
7 | 7 | ms.prod_service: "database-engine, sql-database" |
8 | 8 | ms.component: "t-sql|statements" |
@@ -35,9 +35,9 @@ ms.author: edmaca |
35 | 35 | manager: craigg |
36 | 36 | --- |
37 | 37 | # ALTER DATABASE SET Options (Transact-SQL) |
38 | | -[!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] |
| 38 | +[!INCLUDE[tsql-appliesto-ss2008-asdb-asdw-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-asdw-xxx-md.md)] |
39 | 39 |
|
40 | | - This topic contains the ALTER DATABASE syntax that is related to setting database options in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For other ALTER DATABASE syntax, see the following topics. |
| 40 | + This article contains the ALTER DATABASE syntax that is related to setting database options in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For other ALTER DATABASE syntax, see the following topics. |
41 | 41 |
|
42 | 42 | - [ALTER DATABASE (Transact-SQL)](../../t-sql/statements/alter-database-transact-sql.md) |
43 | 43 |
|
|
269 | 269 |
|
270 | 270 | `CURRENT` performs the action in the current database. `CURRENT` is not supported for all options in all contexts. If `CURRENT` fails, provide the database name. |
271 | 271 |
|
272 | | - **\<auto_option> ::=** |
| 272 | + **\<auto_option> ::=** |
273 | 273 |
|
274 | 274 | Controls automatic options. |
275 | 275 | <a name="auto_close"></a> AUTO_CLOSE { ON | OFF } |
|
433 | 433 | OFF |
434 | 434 | Cursors remain open when a transaction is committed; rolling back a transaction closes any cursors except those defined as INSENSITIVE or STATIC. |
435 | 435 |
|
436 | | - Connection-level settings that are set by using the SET statement override the default database setting for CURSOR_CLOSE_ON_COMMIT. By default, ODBC and OLE DB clients issue a connection-level SET statement setting CURSOR_CLOSE_ON_COMMIT to OFF for the session when connecting to an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For more information, see [SET CURSOR_CLOSE_ON_COMMIT (Transact-SQL)](../../t-sql/statements/set-cursor-close-on-commit-transact-sql.md). |
| 436 | + Connection-level settings that are set by using the SET statement override the default database setting for CURSOR_CLOSE_ON_COMMIT. By default, ODBC, and OLE DB clients issue a connection-level SET statement setting CURSOR_CLOSE_ON_COMMIT to OFF for the session when connecting to an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For more information, see [SET CURSOR_CLOSE_ON_COMMIT (Transact-SQL)](../../t-sql/statements/set-cursor-close-on-commit-transact-sql.md). |
437 | 437 |
|
438 | 438 | The status of this option can be determined by examining the is_cursor_close_on_commit_on column in the sys.databases catalog view or the IsCloseCursorsOnCommitEnabled property of the DATABASEPROPERTYEX function. |
439 | 439 |
|
|
533 | 533 | SINGLE_USER |
534 | 534 | **Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Not available in [!INCLUDE[ssSDS](../../includes/sssds-md.md)]. |
535 | 535 |
|
536 | | - Specifies that only one user at a time can access the database. If SINGLE_USER is specified and there are other users connected to the database the ALTER DATABASE statement will be blocked until all users disconnect from the specified database. To override this behavior, see the WITH \<termination> clause. |
| 536 | + Specifies that only one user at a time can access the database. If SINGLE_USER is specified and there are other users connected to the database, the ALTER DATABASE statement will be blocked until all users disconnect from the specified database. To override this behavior, see the WITH \<termination> clause. |
537 | 537 |
|
538 | 538 | The database remains in SINGLE_USER mode even if the user that set the option logs off. At that point, a different user, but only one, can connect to the database. |
539 | 539 |
|
|
0 commit comments