问题标签 [azure-sql-managed-instance]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
592 浏览

azure - tempDB 是否包含在托管实例的存储限制中?

我正在尝试确定日志空间限制,似乎存储限制包括文档中的日志空间。系统数据库——特别是托管实例存储限制中包含的 tempdb 呢?

0 投票
1 回答
35 浏览

azure - 如何有条件地执行特定于 Azure SQL 托管实例的 SQL 代码?

我有一个 TSQL 代码,其中某些部分不适用于托管实例。有没有办法在 TSQL 代码中确定代码是否在托管实例上执行并仅在这种情况下运行代码?

0 投票
1 回答
615 浏览

azure-sql-managed-instance - 如何在 Azure SQL 托管实例上查找数据库的最早还原点

Azure SQL 数据库托管实例显示可以在 Azure 门户上还原数据库的最早时间。有没有办法使用 PowerShell 或 Azure CLI 以编程方式找到它?

0 投票
1 回答
222 浏览

azure-sql-managed-instance - SQL MI - 在启用加密的数据库上手动备份失败

最近有人在 SQL MI 上遇到失败的手动备份,因为昨天 TDE 启动并且创建的数据库已将加密设置为 ON?

解决方案:要将数据库显式备份到 blob 存储,您需要在触发手动备份之前将加密设置为 OFF

0 投票
2 回答
4700 浏览

azure-sql-managed-instance - Azure SQL 托管实例 Gen4 和 Gen5 硬件选择

Azure SQL 数据库托管实例可以在两个不同的硬件代 Gen5 和 Gen4 上创建,但有以下区别: https ://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-resource -limits#hardware-generation-characteristics

在什么场景下应该选择 Gen4 还是 Gen5 有什么指导方针吗?

0 投票
1 回答
117 浏览

azure-sql-managed-instance - 带有托管实例的 Service Broker 外部激活器

托管实例是否支持 Service Broker 外部激活器?如何通知 Webjob 或 Azure 函数等外部进程?我试图避免创建 CLR 来调用 Web 服务。

0 投票
2 回答
1360 浏览

sql-server - Create database using SSMS GUI fails for Azure SQL Managed Instance

I have spun up a new instance of Azure SQL Managed Instance which appears to be working. I have then created a Jumpbox virtual machine, as per the docs, to manage various components of the virtual network including the managed SQL instance.

I can connect to the Azure SQL Managed Instance (using the admin credentials I specified when spinning the service up) via SSMS on the Jumpbox but when I attempt to create a new database I get the exception below.

enter image description here

Does anyone have any idea why this is failing? I am logged into the instance using the admin credentials and the Jumpbox using the admin credentials. I have also tried running SSMS as admin in Windows with the same issue.

The error suggests there may be a missing dependancy as part of the installation of SSMS but I have not idea what that might be.

EDIT:

From looking around I was wondering if this can only be completed from a Powershell or Bash script. Anyone confirm this?

0 投票
1 回答
1255 浏览

.net - TSQL CREATE ASSEMBLY FROM varbinary 破坏了 class_name 参数

我已将我的本地 SQL Server 2008 R2 数据库迁移到 Azure SQL Server 托管实例 (SQL Server 2017)。一个数据库是存档(只读)数据库,一个是 OLTP 数据库,第三个是实用程序数据库,我在其中保存通用函数、存储过程和维护脚本。除了实用程序数据库中的 CLR 程序集外,所有三个数据库的一切都进行得非常顺利。该程序集在 TSQL 代码中提供正则表达式功能 - 非常有用!我基于此处的 Phil Factor 代码。最初,它是从已编译的 DLL 加载到本地数据库中的。它在那里像冠军一样工作。但在 SQL MI 上,运行使用 CLR 函数之一的 SP 时出现以下错误。

消息 10314,级别 16,状态 11,过程 dbo.globalSearch,第 22 行 [Batch Start Line 2]
Microsoft .NET Framework 在尝试加载程序集 id 65541 时发生错误。服务器可能资源不足,或者程序集可能不受信任。再次运行查询,或查看文档以了解如何解决程序集信任问题。有关此错误的更多信息:
System.IO.FileLoadException:无法加载文件或程序集“regexsqlclr,版本=0.0.0.0,文化=中性,PublicKeyToken=null”或其依赖项之一。发生与安全有关的错误。(来自 HRESULT 的异常:0x8013150A)
System.IO.FileLoadException:
在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblySecurityRef, Evidence assembly , RuntimeAssembly reqAssembly, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean for Introspection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean for Introspection)
在 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospection)
在 System.Reflection.Assembly.Load(String assemblyString)

我尝试使用MSDN 帖子中的步骤解决程序集信任问题,特别是执行

成功了,但什么也没改变。然后我想,既然它暗示它不能从文件加载,这似乎是有道理的,因为我无法访问文件系统的 SQL MI 中不存在该文件,我应该尝试从varbinary. 我只是说这似乎是有道理的,因为除了我最初从中加载它的服务器之外,该文件也不存在于我的任何其他本地服务器上,并且它在所有服务器上都能完美运行。但是,我愿意尝试任何事情!因此,我使用 SSMS 将程序集编写为DROPand CREATE,它使用FROM BINARY语法,并同样编写了所有函数的脚本。CREATE ASSEMBLY成功了,所以我认为我在正确的轨道上。然后我尝试创建第一个函数和BAM,另一个错误!这次错误读取

消息 6505,级别 16,状态 2,过程 RegexIndex,第 2
行在程序集“RegexFunctions”中找不到类型“RegexSQLCLR.RegularExpressionFunctions”。

我已经在谷歌上搜索了几个小时,试图找到解决这个问题的方法,但运气却为零。尽管该EXTERNAL NAME子句的类部分的语法对于从文件加载的程序集非常有效。我验证varbinary了 SSMS 编写的脚本与原始 DLL 的二进制文件相同。Microsoft 论坛上的某个人建议我确保使用该Any CPU选项编译 DLL - 确实如此。作为健全性检查,我在其中一台本地服务器上执行了相同的过程,即DROPCREATE ASSEMBLY FROM BINARY,得到了完全相同的结果:我无法加载任何 CLR 函数!我已经尝试了我能想到的所有可能的类名排列,但无济于事。这是和的CREATE ASSEMBLY代码CREATE FUNCTION

RegexSQLCLR是原始 DLLRegularExpressionFunctions的名称,是类的名称。RegexSQLCLR也是after usingname列中指定的名称;否则,原始 DLL 的完整路径在列中。sys.assembly_filesCREATE ASSEMBLY FROM BINARYname

0 投票
2 回答
334 浏览

sql - 定位索引时的 Azure SQL 慢查询

我有一个用于物联网数据的相对较大的数据库,大约有 6000 万条记录。插入在流分析的批量插入中非常频繁地执行。

这是我的表架构:

执行查询时,我们总是在寻找设备的最新记录,所以我有以下聚集索引:

我还有一个非聚集索引,用于覆盖针对 ParameterTypeId、ParameterNumberId 和 InstanceId 的索引。

ParameterValue 作为键列包含在内,因为这是查询的最终结果,我很感兴趣。

但是,在针对我的非聚集索引执行查询时,可能需要 3-5 分钟才能返回一个结果,我不明白。根据我的执行计划,非聚集索引按预期与 Index Seek 一起使用。

这是执行计划的链接: https ://www.brentozar.com/pastetheplan/?id= r1NAwrRUN(查询完成时间为 03:32)。

我尝试重建索引以降低碎片率并更新统计信息,但到目前为止还没有运气。

谁能指出我的问题的方向?

提前致谢。

0 投票
1 回答
738 浏览

azure - Azure SQL 托管实例路由表

我创建了一个 Azure SQL 管理实例的新实例,该实例还创建了一个默认路由表,如本文档中所述。

我们的客户端试图实现的是通过 CheckPoint 防火墙路由所有流量,以便可以检查它,如下图所示。

在此处输入图像描述

为了实现这一点,我们需要添加一个覆盖现有路由的新路由,以强制所有流量进入防火墙负载均衡器。类似于以下内容。

DefaultRoute --> 0.0.0.0/0 --> 防火墙负载均衡器 IP 地址

这是否受支持,如果支持,我是否能够删除所有其他路由表条目而不会对托管实例产生不利影响?