Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 3.56 KB

change-the-configuration-settings-for-a-database.md

File metadata and controls

74 lines (48 loc) · 3.56 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords monikerRange
Change the Configuration Settings for a Database
Learn how to change database-level options in SQL Server 2019 by using SQL Server Management Studio or Transact-SQL.
WilliamDAssafMSFT
wiassaf
03/14/2017
sql
configuration
how-to
database configuration [SQL Server]
configuration options [SQL Server], databases
modifying database configuration settings
=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current

Change the Configuration Settings for a Database

[!INCLUDE SQL Server Azure SQL Database] This topic describes how to change database-level options in [!INCLUDEssnoversion] by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql]. These options are unique to each database and do not affect other databases.

In This Topic

Before You Begin

Limitations and Restrictions

  • Only the system administrator, database owner, members of the sysadmin and dbcreator fixed server roles and db_owner fixed database roles can modify these options.

Security

Permissions

Requires ALTER permission on the database.

Using SQL Server Management Studio

To change the option settings for a database

  1. In Object Explorer, connect to a [!INCLUDEssDE] instance, expand the server, expand Databases, right-click a database, and then click Properties.

  2. In the Database Properties dialog box, click Options to access most of the configuration settings. File and filegroup configurations, mirroring and log shipping are on their respective pages.

Using Transact-SQL

To change the option settings for a database

  1. Connect to the [!INCLUDEssDE].

  2. From the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute. This example sets the recovery model and data page verification options for the [!INCLUDEssSampleDBobject] sample database.

:::code language="sql" source="codesnippet/tsql/change-the-configuration_1.sql":::

For more examples, see ALTER DATABASE SET Options (Transact-SQL).

See Also

ALTER DATABASE Compatibility Level (Transact-SQL)
ALTER DATABASE Database Mirroring (Transact-SQL)
ALTER DATABASE SET HADR (Transact-SQL)
Rename a Database
Shrink a Database