简体   繁体   English

Azure SQL 单数据库(无服务器)自动暂停与 SSMS(SQL Server Management Studio)

[英]Azure SQL Single DB (Serverless) Autopause vs SSMS (SQL Server Management Studio)

We're running Azure SQL Single Database (Serverless tier) and are having problems with our development environment SQL servers appearing not to pause despite the DBs being out of use and autopause being correctly configured.我们正在运行 Azure SQL 单一数据库(无服务器层),并且我们的开发环境出现问题 SQL 尽管配置正确,但服务器似乎没有暂停使用。

We've narrowed it down to SSMS running the following SQL query against the DB if it has a query window open but we have no idea how to prevent it.如果它有一个查询 window 打开但我们不知道如何防止它,我们已将其缩小到对 DB 运行以下 SQL 查询的 SSMS。

(@type int)SELECT file_id, name, size AS size_8KB, max_size AS max_size_8KB, ISNULL(FILEPROPERTY(name, 'SpaceUsed'), size) AS space_used_8KB
                        FROM sys.database_files
                        WHERE type = @type ORDER BY size DESC

This query is run every 5 - 7 minutes while SSMS is open.此查询在 SSMS 打开时每 5 到 7 分钟运行一次。 This is causing us considerable headache and cost.这给我们带来了相当大的头痛和成本。

Does anyone know what feature of SSMS is calling this query and how to turn it off?有谁知道 SSMS 的什么功能正在调用此查询以及如何将其关闭?

As I know about the serverless, when the database is inactive, it can be paused.正如我对无服务器的了解,当数据库处于非活动状态时,它可以暂停。 But when the SSMS or query editor opened, the connection to SQL database is open which means the database is always active., then the autopause congifuration won't work.但是当 SSMS 或查询编辑器打开时,与 SQL 数据库的连接是打开的,这意味着数据库始终处于活动状态。然后自动暂停配置将不起作用。

在此处输入图像描述

Ref this document: https://docs.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview#performance-configuration参考此文档: https://docs.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview#performance-configuration

HTH. HTH。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM