- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试掌握使用 Windows Azure Sql Database Managment Libraries 的技巧
但是示例省略了如何创建数据库。我在最后一部分遇到问题,因为我不知道 ServiceObjectiveId
是什么。
DatabaseCreateParameters dbParams = new DatabaseCreateParameters();
//default sql azure collation is SQL_LATIN1_GENERAL_CP1_CI_AS
dbParams.CollationName = "SQL_LATIN1_GENERAL_CP1_CI_AS";
dbParams.Edition = "Web";
dbParams.MaximumDatabaseSizeInGB = 1;
dbParams.Name = Name;
dbParams.ServiceObjectiveId = "?????"
client.Databases.Create(Cache.ProgramSettings.DefaultServerConnection.ServerName
, dbParams);
我花了大约 2 个小时试图在网上查找有关这意味着什么以及如何获取它的信息,但我一生都找不到它。
引用 Shiva 的回答,我省略了 ServiceObjectiveId
,现在收到一条错误,指出找不到 uri 资源。如果我更深入地研究错误,我可以找到我的请求,看起来不错。
<ServiceResource xmlns="http://schemas.microsoft.com/windowsazure">
<Name>SQL Azure</Name>
<Edition>Web</Edition>
<MaxSizeGB>1</MaxSizeGB>
<CollationName>SQL_LATIN1_GENERAL_CP1_CI_AS</CollationName>
</ServiceResource>
我检查了请求 uri,看起来也完全没问题。
{https://management.core.windows.net//obscured#/services/sqlservers/servers/obscured#.database.windows.net/databases}
最佳答案
ServiceObjectiveId 是用于返回服务级别的 Azure 服务标识符的组成部分。
以下链接提供了一些引用信息:
http://msdn.microsoft.com/en-us/library/windowsazure/dn505709.aspx
注意请求 URL 中使用的 serviceObjectiveId 参数: https://management.core.windows.net:8443/ {subscriptionId}/services/sqlservers/servers/{serverName}/serviceobjectives/{serviceObjectiveId}
关于c# - 什么是 ServiceObjectiveId?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21170276/
我正在尝试掌握使用 Windows Azure Sql Database Managment Libraries 的技巧 但是示例省略了如何创建数据库。我在最后一部分遇到问题,因为我不知道 Servi
我是一名优秀的程序员,十分优秀!