我正在尝试在 azure 中配置一个无服务器 sql 数据库,我将用它来进行开发。 到目前为止,我已经创建了一个数据库实例,但尚未连接到它,也没有代码调用它。 我唯一做的就是使用本地 SSMS 连接几分钟来创建一个测试表(id int(pk),测试名称 varchar(50)),并插入两条记录。
以下是规格:
{
"sku": {
"name": "GP_S_Gen5",
"tier": "GeneralPurpose",
"family": "Gen5",
"capacity": 1
},
"kind": "v12.0,user,vcore,serverless",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"maxSizeBytes": 1073741824,
"status": "Paused",
"databaseId": "___obfuscated___",
"creationDate": "2024-04-29T00:55:41.923Z",
"currentServiceObjectiveName": "GP_S_Gen5_1",
"requestedServiceObjectiveName": "GP_S_Gen5_1",
"defaultSecondaryLocation": "westus",
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
"zoneRedundant": false,
"maxLogSizeBytes": 193273528320,
"earliestRestoreDate": "2024-04-29T01:05:10Z",
"readScale": "Disabled",
"currentSku": {
"name": "GP_S_Gen5",
"tier": "GeneralPurpose",
"family": "Gen5",
"capacity": 1
},
"autoPauseDelay": 60,
"currentBackupStorageRedundancy": "Local",
"requestedBackupStorageRedundancy": "Local",
"minCapacity": 0.5,
"pausedDate": "2024-05-02T07:55:47.203Z",
"maintenanceConfigurationId": "___obfuscated___",
"isLedgerOn": false,
"isInfraEncryptionEnabled": false,
"availabilityZone": "NoPreference"
},
"location": "eastus",
"tags": {},
"id": "___obfuscated___",
"name": "___obfuscated___",
"type": "Microsoft.Sql/servers/databases"
}
The cost summary estimates shown by Azure:
General Purpose (GP_S_Gen5_1), Cost per GB (in USD)0.12
Max storage selected (in GB) x 1.3
ESTIMATED STORAGE COST / MONTH = 0.15 USD
COMPUTE COST / VCORE SECOND 1 = 0.000145 USD
问题...我每天被收取大约 1 美元(每天!),这比我预期的要多得多,特别是对于没有使用的数据库。
请让我知道我应该在设置中修改哪些内容,以使其作为开发数据库运行更便宜(或免费)。
Azure 现在提供一些免费资源,SQL 数据库就是其中之一,尽管有一些先决条件需要满足
还有每月限制
您可以在达到免费限制时的行为设置中设置两个选项:
此优惠适用于每个 Azure 订阅一个数据库。首先,请在 Azure SQL 数据库的配置页面上查找“应用优惠”横幅
免费的 Azure SQL 数据库产品目前处于预览阶段。