Forum Discussion
Data Warehouse - SQL Database Projects Issues + 'ALTER TABLE' are not supported in Fabric
Hi esobrino
Is this behavior specific to DW or is it across SQL projects? and is this script a post deployment script?
Can you give the above details esobrino ?
Thanks
- Anonymous2 years agoNot applicable
Hi esobrino
We haven’t heard from you on the last response and was just checking back to see if you can provide the details asked above.
Thanks- Anonymous2 years agoNot applicable
Hi @esobrino
We haven’t heard from you on the last response and was just checking back to see if you can provide the details asked above.
Thanks- esobrino2 years agoHelper II
Hi,
As stated above, I have (lets say) this script with one batch:
DECLARE dt DATETIME2(6) = getutcdate() INSERT INTO [Code].[StatuteTitleCode] (CodeID, Description, UpdatedDate) VALUES ('AB', 'Alcoholic Breverages', dt) GOWhen I "publish" to deploy the model it complained about having 2 statements (1 - the declare, and the 2nd the insert) and say that each should be in a separate batch implying that a GO should be in between.
I commented the above and try to deploy ("publish") it and have other issues stating that it can't drop "exec_request_history" and others that are not even my objects. I should not had those issues since I guess I suppose to supress or ignore those default objects using the following profile:
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TargetDatabaseName>DwStructured</TargetDatabaseName> <TargetConnectionString>Data Source=txttshydoloejkit7jdka6ptg4-rfn4od4lgaduto2fljvpzsg4tu.datawarehouse.fabric.microsoft.com;Initial Catalog=DwStructured;User ID="Eduardo Sobrino - [email protected]";Password=******;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False;Authentication=ActiveDirectoryInteractive;Application Name=azdata;Command Timeout=30</TargetConnectionString> <AllowIncompatiblePlatform>True</AllowIncompatiblePlatform> <DropConstraintsNotInSource>False</DropConstraintsNotInSource> <DropDmlTriggersNotInSource>False</DropDmlTriggersNotInSource> <DropExtendedPropertiesNotInSource>False</DropExtendedPropertiesNotInSource> <DropIndexesNotInSource>False</DropIndexesNotInSource> <DropPermissionsNotInSource>True</DropPermissionsNotInSource> <DropObjectsNotInSource>True</DropObjectsNotInSource> <DropRoleMembersNotInSource>True</DropRoleMembersNotInSource> <DropStatisticsNotInSource>False</DropStatisticsNotInSource> <IgnoreKeywordCasing>False</IgnoreKeywordCasing> <IgnoreSemicolonBetweenStatements>False</IgnoreSemicolonBetweenStatements> <AllowDropBlockingAssemblies>True</AllowDropBlockingAssemblies> <ProfileVersionNumber>1</ProfileVersionNumber> </PropertyGroup> </Project>My guess is that those default objects should not be touched and that by setting "DropXXXNotInSource" those should not be managed. Still when I generate the script I got:
PRINT N'Dropping View [queryinsights].[exec_requests_history]...'; GO DROP VIEW [queryinsights].[exec_requests_history]; GO PRINT N'Dropping View [queryinsights].[long_running_queries]...'; GO DROP VIEW [queryinsights].[long_running_queries]; GO PRINT N'Dropping View [queryinsights].[frequently_run_queries]...'; GO DROP VIEW [queryinsights].[frequently_run_queries]; GO PRINT N'Dropping Schema [_rsc]...'; GO DROP SCHEMA [_rsc]; GO PRINT N'Dropping Schema [queryinsights]...'; GO DROP SCHEMA [queryinsights];That I want to avoid being dropted or even managed.
Sorry to show another issue while explaining the original found issue with the 2 statements batch.
If I could have any existing documentation to perform a successful publish that will be nice, else if you help me prepare such documentation it will also be OK.
Hope to hear from you soon...