SQL Server中的哪些配置更改需要重新启动?


SQL Server是一个复杂的野兽,具有许多配置选项,范围从建议到完全避免。

自SQL Server 2016发布以来,建议在安装后使用的几个选项已纳入默认安装选项中,并且不再需要执行,并且对SQL Server 2017进行了类似更改。即使如此,我们仍在进行配置更改数据专业人员需要在安装后,维护时段甚至有时是在工作时间内进行更改,因此这里有一些方便的更改列表,这些更改需要且不需要重启操作系统或SQL Server实例。

不需要重新启动的配置设置 这些是您可以在SQL Server中更改的配置选项,而无需重新启动服务或操作系统。它们将立即生效。在某些情况下,它们可能会刷新计划缓存和/或缓冲池。

注意:如果需要更改这些设置中的任何一个,最好使用Transact-SQL(T-SQL)对其进行脚本编写,以便您还可以对更改的撤销进行脚本编写。

Instance-level settings:

  • Minimum Server Memory (in MB)
  • Maximum Server Memory (in MB)
  • Index creation in memory (in KB)
  • Minimum memory per query (in KB)
  • Processor affinity mask
  • Server authentication
  • Login auditing
  • Default connection options
  • Remote server connections
  • Backup compression
  • Backup checksum
  • Recovery interval

* Database-level settings:

  • Enabling or disabling the Query Store
  • Enabling or disabling Accelerated Database Recovery
  • Modifying database files and file groups
  • Auto-close database
  • Auto-shrink database
  • Auto create and update statistics
  • Database scoped configurations
  • FILESTREAM settings
  • ANSI settings
  • Snapshot isolation and Read-committed snapshot isolation (RCSI)
  • Delayed durability
  • Parameterization
  • Page verification
  • Service broker
  • Read-only and single-user access

使用DBCC TRACEON和的非持久跟踪标志选项DBCC TRACEOFF 尽管先前的设置出现在SQL Server Management Studio中的服务器和数据库的性能,其中不少是采用控制sp_configure与'show advanced options'启用,而另一些则SET选择。所有这些设置都可以在不重新启动SQL Server服务的情况下进行修改,但是有些设置可能要求您运行RECONFIGURE WITH OVERRIDE以使用配置的值覆盖运行值。

高级sp_configure选项(可能需要RECONFIGURE WITH OVERRIDE)

  • locks
  • nested triggers
  • default language
  • network packet size (B)
  • default full-text language
  • two digit year cutoff
  • priority boost
  • remote login timeout (s)
  • cursor threshold
  • max text repl size (B)
  • cost threshold for parallelism
  • max degree of parallelism
  • query wait (s)
  • lightweight pooling
  • scan for startup procs
  • blocked process threshold (s)
  • filestream access level
  • optimize for ad hoc workloads
  • contained database authentication

需要重新启动SQL Server服务的设置 需要重新启动SQL Server服务的配置选项与数据库位置和持久的跟踪标志有关:

实例级别的设置:

  • 数据库默认位置
  • 即时文件初始化

移动系统数据库的物理位置

  • master
  • msdb
  • tempdb

使用SQL Server Configuration Managermssql-conf在Linux上的持久跟踪标记 需要重新启动操作系统的设置 这些是需要重新启动操作系统的配置选项:

在BIOS中修改省电设置


原文链接:https://codingdict.com/