c# - 为 P1 SQL 数据库创建 Azure ClusteredColumnStoreIndex 的 C# SMO 方法是什么

标签 c# sql-server azure azure-sql-database smo

在北欧使用 SQL Azure P1 Premium V12,我可以执行以下操作:

CREATE CLUSTERED COLUMNSTORE INDEX cci_Simple ON SimpleTable;

但不是这个:(使用 Microsoft.SqlServer.SqlEnum,Version=12.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91)

var t = new Table(db, "SimpleTable");
// ... Add Columns
t.Create()
var index = new Index(t, "cci_" + t.Name)
{
     IndexType = IndexType.ClusteredColumnStoreIndex,
};
index.Create();

我得到:

Microsoft.SqlServer.Management.Smo.FailedOperationExceptionCreate failed for Index 'cci_SimpleTable'. 
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.CreateImpl()
at Microsoft.SqlServer.Management.Smo.Index.Create()
at ...
Microsoft.SqlServer.Management.Smo.UnsupportedEngineTypeException

目标引擎类型不支持该对象或其属性之一。

引用文献;

https://msdn.microsoft.com/library/gg492153.aspx

http://www.nikoport.com/2014/12/12/azure-columnstore-1-the-initial-preview-offering/

最佳答案

不理想:

db.ExecuteNonQuery(string.Format("Create Clustered Columnstore Index CC_{0} on dbo.{0}", table.Name));    

sqlInjection 转义等

关于c# - 为 P1 SQL 数据库创建 Azure ClusteredColumnStoreIndex 的 C# SMO 方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31841775/

相关文章:

c# - 在 ASP.NET 应用程序中存储应用程序配置参数的正确方法是什么?

c# - WPF C# 从 App 调用窗口函数

c# - 使用 HAVING COUNT 对 NHibernate 的 SQL 查询

c# - 在 C# 和 WinForms 中将筛选框添加到 ListView 的列标题

sql - 使用 UDF 拆分值对和创建表

sql-server - SQL Server 为 xml 路径添加属性和值

java - 无法使用 SQuirrelSQL 连接到 SQL 数据库

c# - Azure Web 作业/队列 - DecoderFallbackException

mysql - 应用程序中的 Azure MySQL : "MySQL In App export operation is in progress..."

Azure 数据同步聚集索引错误