I am having pay as you go subscription and I am creating an Azure SQL server.
While adding server, on selection of location, I am getting this error:
This location is not available for subscriptions
Run Code Online (Sandbox Code Playgroud)
Please help.
在内部部署SQL数据库中,有一个维护计划可以偶尔重建索引,而不是那么多.
如何在Azure SQL DB中进行设置?
PS:我之前尝试过,但由于我找不到任何选项,我想也许他们自动这样做,直到我读完这篇文章并试过:
SELECT
DB_NAME() AS DBName
,OBJECT_NAME(ps.object_id) AS TableName
,i.name AS IndexName
,ips.index_type_desc
,ips.avg_fragmentation_in_percent
FROM sys.dm_db_partition_stats ps
INNER JOIN sys.indexes i
ON ps.object_id = i.object_id
AND ps.index_id = i.index_id
CROSS APPLY sys.dm_db_index_physical_stats(DB_ID(), ps.object_id, ps.index_id, null, 'LIMITED') ips
ORDER BY ps.object_id, ps.index_id
Run Code Online (Sandbox Code Playgroud)
我们正在将 Spring Batch 应用程序从 Oracle DB 迁移到 Azure SQL Server。
我在尝试同时执行两个不同的作业来更新不同的表时收到以下错误,但使用相同的通用 BATCH_ 表
导致:org.springframework.dao.DataAccessResourceFailureException:无法增加身份;嵌套异常是 com.microsoft.sqlserver.jdbc.SQLServerException:事务(进程 ID 167)在锁资源上与另一个进程发生死锁,并已被选为死锁受害者。重新运行事务。在 org.springframework.jdbc.support.incrementer.SqlServerMaxValueIncrementer.getNextKey(SqlServerMaxValueIncrementer.java:124) ~[bat-applybatch-jobs-2.2.12-SNAPSHOT.jar:?] 在 org.springframework.jdbc.support.incrementer。 AbstractDataFieldMaxValueIncrementer.nextLongValue(AbstractDataFieldMaxValueIncrementer.java:125)
我的作业存储库配置
<job-repository id="jobRepository" isolation-level-for-create="READ_COMMITED" />
Run Code Online (Sandbox Code Playgroud)
数据库死锁
<deadlock>
<victim-list>
<victimProcess id="process2a41675a4e8" />
</victim-list>
<process-list>
<process id="process2a41675a4e8" taskpriority="0" logused="280" waitresource="RID: 6:9:24682488:29" waittime="4984" ownerId="696000712" transactionname="implicit_transaction" lasttranstarted="2021-12-29T12:18:30.153" XDES="0x29a22bc4428" lockMode="U" schedulerid="4" kpid="52760" status="suspended" spid="173" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2021-12-29T12:18:30.157" lastbatchcompleted="2021-12-29T12:18:30.153" lastattention="1900-01-01T00:00:00.153" clientapp="Microsoft JDBC Driver for SQL Server" hostname="ServerName" hostpid="0" loginname="LoginName" isolationlevel="read committed (2)" xactid="696000712" currentdb="6" currentdbname="Database" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
<executionStack>
<frame …Run Code Online (Sandbox Code Playgroud) 是否可以将Active Directory管理员分配给ARM资源模板中的Azure SQL实例?我正在尝试自动部署数据库服务器,但我似乎只能指定本地服务器管理凭据.
"properties": {
"administratorLogin": "[parameters('databaseAdministratorLogin')]",
"administratorLoginPassword": "[parameters('databaseAdministratorPassword')]",
"version": "12.0"
},
Run Code Online (Sandbox Code Playgroud)
除此之外,似乎没有任何地方可以指定特定的Azure AD管理员.
azure azure-resource-manager azure-sql-database azure-sql-server
我想实现以下目标:
避免在 Azure 上对我的生产配置进行SQL 身份验证,并使用Active Directory 集成身份验证
当我转到 Azure 的连接字符串部分并复制以下连接字符串时:
Server=[my server name];Initial Catalog=[my db name];Persist Security Info=False;User ID=[my user name];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Integrated";
Run Code Online (Sandbox Code Playgroud)
并尝试使用它我得到以下异常:
异常消息:无法将“Authentication=Active Directory Integrated”与“用户 ID”、“UID”、“密码”或“PWD”连接字符串关键字一起使用。异常堆栈跟踪:位于 System.Data.SqlClient.SqlConnectionString..ctor(String ConnectionString)在System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(字符串connectionString,DbConnectionOptions之前)在System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey键,DbConnectionPoolGroupOptions poolOptions,DbConnectionOptions&userConnectionOptions)在System.Data.SqlClient.SqlConnection.ConnectionString_Set( DbConnectionPoolKey 键)
由于我的数据库管理/基础设施经验非常有限,我不知道为什么“用户 ID”在我在 Azure 上获得的连接字符串中明确列出时会破坏所有内容。
有几点需要注意:
azure azure-active-directory azure-sql-database azure-sql-server
我们有一个Azure SQL数据库.直到几周前,我们设置了10个DTU(S0).最近,我们得到了更多的SQL超时错误,促使我们将DTU增加到50(S2).我们不太频繁地得到错误,但仍然有时.当我们得到这些超时时,我们发现资源图上的峰值达到了100%.深入研究,通常是数据I/O操作使其飙升.但是当我们检查Query Performance Insight时,列出的查询中没有一个显示他们正在使用那么多资源.
另外需要注意的是,我们的数据库规模稳步增长.它现在大约是19 GB,其中大部分(18 GB)来自一个包含很多长JSON字符串的表.超时错误通常发生在具有多个连接的某个查询上,但它们不与具有长字符串的表交互.
我们测试了制作数据库的副本并删除了所有长字符串,并且它没有在10 DTU处获得任何超时,但执行与数据库相同,所有长字符串在50 DTU处加载时间.
我们已经重建了索引,尽管它有所帮助,但我们仍然会遇到超时错误.
鉴于获取超时的查询没有触及带有长字符串的表,具有长字符串的表是否仍然是DTU使用的罪魁祸首?它会与SQL缓存有关吗?长字符串是否会占用缓存并导致大量数据I/O?(它们也经常被访问.)
我已经通过 ARM 模板创建了我的 Azure SQL 服务器。要启用漏洞评估,我需要启用高级数据安全性。我在 SQL 服务器资源的资源括号内的 ARM 模板中使用以下代码来启用此功能。
{
"name": "vulnerabilityAssessments",
"type": "vulnerabilityAssessments",
"apiVersion": "2018-06-01-preview",
"dependsOn": [
"[concat('Microsoft.Sql/servers/', parameters('sqlServerName'))]"
],
"properties": {
"storageContainerPath": "[concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/vulnerability-assessment/')]",
"storageAccountAccessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value]",
"recurringScans": {
"isEnabled": true,
"emailSubscriptionAdmins": false,
"emails": "[parameters('emailaddresses')]"
}
}
},
Run Code Online (Sandbox Code Playgroud)
如您所见,我将存储帐户设置为漏洞评估,但是在部署此帐户时出现以下错误:
VulnerabilityAssessmentADSIsDisabled", "message": "Advanced Data Security should be enabled in order to use Vulnerability Assessment."
Run Code Online (Sandbox Code Playgroud)
当我查看 SQL 服务器的高级数据安全刀片时,我看到已设置:

如果我手动设置存储帐户。漏洞评估已启用.... 我尝试更改数据库级别的漏洞评估括号并尝试调试属性中的存储帐户引用,但似乎看不到我做错了什么或我一直忘记了什么?有没有人已经尝试过这样做了?
PS:就像您在图像中看到的那样,定期重复扫描已关闭,而我已在漏洞评估的重复扫描数组中启用了此功能。
我有 Azure DevOpe 管道,它工作得很好,但昨天我突然出现了 showstopper 错误。管道没有给出错误,但没有创建 SQL 逻辑服务器。我删除了资源组中的所有资源。然后我再次执行管道。我收到“正在进行的逻辑服务器请求已在进行中,请稍后重试您的请求”错误。我已经 24 小时无法创建逻辑服务器了。
我以为我可以从 Azure 门户取消部署,但我没有看到任何部署有错误。我能做什么?
Azure DevOps 上的错误:
C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -
ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\43a1dcab-bbff-4fd8-8cc7-5773945858fa.ps1'"
Import-Module -Name C:\Modules\az_4.3.0\Az.Accounts\1.9.1\Az.Accounts.psd1 -Global
Clear-AzContext -Scope Process
Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Connect-AzAccount -ServicePrincipal -Tenant *** -Credential System.Management.Automation.PSCredential
-Environment AzureCloud @processScope
Set-AzContext -SubscriptionId 0000000000000000000 -TenantId ***
strtempdigiopsdev
##[error]9:15:12 AM - The deployment 'TemplateMasterDeployment' failed with error(s). Showing 2 out
of 2 error(s).
Status Message: The resource operation completed with terminal provisioning state 'Failed'. …Run Code Online (Sandbox Code Playgroud) 我们将一些文档存储在 SQL Server 数据库VarBinary(Max)列中。大多数文档只有几 KB,但有时可能有几 MB。
当文件大于 4MB 左右时,我们会遇到问题。
VarBinary在本地 SQL Server 中更新列时,速度非常快(8MB 文件只需 0.6 秒)。
在 SQL Azure 上的相同数据库上执行相同的语句时,需要超过 15 秒!
此外,如果代码从 Azure 应用服务运行,速度会非常慢。所以问题不是我们的互联网连接。
我知道在 SQL Server 中存储文件不是首选的存储方式,Blob 存储通常是最佳解决方案,但我们有特殊原因需要这样做,所以我想将其排除在讨论之外;-)
在调查执行计划时,我看到“Table Spool”一直在占用时间,但我不确定为什么。以下是本地和 Azure 的执行计划。
相同的数据库和数据。如果有人可以提供帮助,那就太好了。
谢谢克里斯
t-sql sql-server query-performance azure-sql-database azure-sql-server
我有一个到我的 Azure 云的 VPN 连接。连接后,我可以看到大部分网络设备,例如虚拟机。但是,我看不到 Azure SQL 数据库。我联系了支持人员,他们解释说,这是不受支持的,并且如果我打开某些 ip 的端口,我只能访问云外部的 Azure SQL。对我来说,这似乎是一个主要的安全问题和不便,因为支持人员可能会不时从不同的位置和不同的 IP 进行连接。我想知道其他人是如何解决这个问题的。
azure-sql-server ×10
azure ×7
sql-server ×4
azure-devops ×1
java ×1
powershell ×1
spring ×1
spring-batch ×1
t-sql ×1
vpn ×1