dbup for Azure sql datawarehouse?

0

Does Dbup support the azure datawarehouse DB? When i tried to run the c# console project, even for select statement, i am getting the below error, any advice appreciated? is there any alternative sql automation version like dbup, apart from dacpac.

[error]Script block number: -1; Message: Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.

[error]System.Data.SqlClient.SqlException (0x80131904): Enforced unique constraints are not supported in Azure SQL Data Warehouse. To create an unenforced unique constraint you must include the NOT ENFORCED syntax as part of your statement.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
program.cs
``
using DbUp;
using System;``
using System.Configuration;
using System.Reflection;

namespace  MIReport.Warehouse
{
    class Program
    {
        static int Main(string[] args)
        {
            var connectionString = @"Server=tcp:" + args[0] + ",1433;Initial Catalog=" + args[1] + ";Persist Security Info=False;User ID=" + args[2] + ";Password=" + args[3] + ";MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication='Active Directory Password';";

            var upgrader = DeployChanges.To
                .SqlDatabase(connectionString)
                .WithScriptsEmbeddedInAssembly(Assembly.GetExecutingAssembly())
                .LogToConsole()
                .LogScriptOutput()
                .Build();

            var result = upgrader.PerformUpgrade();

            if (!result.Successful)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(result.Error);
                Console.ResetColor();
                return -1;
            }

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Success!");
            Console.ResetColor();
            return 0;
        }
    }
}
azure
azure-sql-data-warehouse
dbup
asked on Stack Overflow Mar 24, 2020 by baba • edited Mar 25, 2020 by baba

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0