导入的Azure SQL数据库大小始终为250GB [英] Imported Azure SQL Database always sizes at 250GB

查看:69
本文介绍了导入的Azure SQL数据库大小始终为250GB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,即设置新的SQL DB bacpac导入(S3标准)的最大大小始终为250 GB-就像省略了参数"DatabaseMaxSizeBytes"一样.这里的代码:

I have the issue that setting up a new SQL DB bacpac import (S3 Standard) always has a max size of 250 GB - just as if the parameter 'DatabaseMaxSizeBytes' gets omitted. Here the code:

$sdvobjDbImport = New-AzureRmSqlDatabaseImport `
                    -ResourceGroupName $sdvstrSqlsResourceGroupName `
                    -ServerName $sdvstrSqlsName `
                    -AdministratorLogin $sdvstrAdminLI `
                    -AdministratorLoginPassword $sdvsstrAdminPW `
                    -DatabaseName $sdvstrDatabaseName `
                    -Edition $sdvstrDbEditionAtImport `
                    -ServiceObjectiveName $sdvstrServiceObjectiveAtImport `
                    -DatabaseMaxSizeBytes 262144000 `
                    -StorageKey $sdvstrStorageKey `
                    -StorageKeyType 'StorageAccessKey' `
                    -StorageUri $sdvstrStorageUri `
                    -EA Stop

应该为250 MB,但不能为GB.我不需要这样的怪物.之后进行缩减(从250 GB到250 MB)会导致DB上的操作时间长的问题.知道我的代码有什么问题吗?Google也没有给出答案.

It should be 250 MB, but not GB. I don't need such a monster; scaling down afterwards (from 250 GB to 250 MB) gives problems with long operations times on the DB. Any idea what is wrong in my code? Google does not give an answer, either.

推荐答案

我测试了同样的问题:参数 -DatabaseMaxSizeBytes 不起作用.无论我们使用哪个值,都将创建最大存储量为250G(DTU标准S2)的数据库.

I tested and have the same problem: the parameter -DatabaseMaxSizeBytes doesn't works. No matter which value we use, it will all create the database with the max storage 250G (DTU Standard S2).

我测试过,Azure文档使用的 -DatabaseMaxSizeBytes 5000000 ,它也不起作用.

The Azure Document use -DatabaseMaxSizeBytes 5000000, I tested and it also doesn't works.

解决方案:

导入完成后,我们必须手动设置数据库大小,这是示例命令:

After the import completed, We must set the database size manually, here's the sample command:

Set-AzSqlDatabase -DatabaseName "TestDB" -ServerName "sqlservername" -ResourceGroupName "resourcegroup" -MaxSizeBytes "104857600"

注意:

-MaxSizeBytes 的值必须为:100M,500m,1GB,2GB,5GB,10GB,20GB,30GB,40GB,50GB,100GB,150GB,200GB,250GB.

The value of -MaxSizeBytes must be: 100M, 500m, 1GB, 2GB, 5GB, 10GB, 20GB, 30GB, 40GB, 50GB,100GB, 150GB, 200GB, 250GB.

您还可以测试

您可以从Portal获得此值:

You can get this value from Portal:

我使用希望这会有所帮助.

这篇关于导入的Azure SQL数据库大小始终为250GB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆