microsoft / sql-server-samples

Azure Data SQL Samples - Official Microsoft GitHub Repository containing code samples for SQL Server, Azure SQL, Azure Synapse, and Azure SQL Edge
Other
9.99k stars 8.86k forks source link

Doesn't deploy to Azure #183

Closed EndUser2017 closed 7 years ago

EndUser2017 commented 7 years ago

The ones that say they work for Standalone SQL and AzureDB or Azure DW is inaccurate for Azure. You cannot deploy DW as a data warehouse component just a regular sql azure database. The History Tables and other pieces for Temporal requirements do not work either as the versioning does not exist which then breaks the helpful data generation sproc. Can this please get corrected as it is sort of hard to demo features in Azure if the sample which is supposed to be the newest to replace adventureworks does not work out of the box... if one thing is broken who knows what else is, that is not encouraging at all to new Dev's who expect to start with a working component

jodebrui commented 7 years ago

Which sample(s) are broken specifically?

From: EndUser2017 [mailto:notifications@github.com] Sent: Friday, February 3, 2017 2:51 PM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Microsoft/sql-server-samples] Doesn't deploy to Azure (#183)

The ones that say they work for Standalone SQL and AzureDB or Azure DW is inaccurate for Azure. You cannot deploy DW as a data warehouse component just a regular sql azure database. The History Tables and other pieces for Temporal requirements do not work either as the versioning does not exist which then breaks the helpful data generation sproc. Can this please get corrected as it is sort of hard to demo features in Azure if the sample which is supposed to be the newest to replace adventureworks does not work out of the box... if one thing is broken who knows what else is, that is not encouraging at all to new Dev's who expect to start with a working component

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F183&data=02%7C01%7Cjodebrui%40microsoft.com%7C266f4b64ca2046e278be08d44c871221%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217590391614709&sdata=NJ5AJk8YmH2cCx8Onz6g%2BpcVeGViZvWSVO5vnCXyoTw%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9nJZ0E2Pp9Ugs1dv2q_9VqwsESx0ks5rY687gaJpZM4L25cy&data=02%7C01%7Cjodebrui%40microsoft.com%7C266f4b64ca2046e278be08d44c871221%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217590391614709&sdata=miykEuVSZEIT4%2F59h1mpePgvg6mYmojJc3qCiqyFscI%3D&reserved=0.

EndUser2017 commented 7 years ago

From what I can tell the DataLoadSimulation sproc DataLoadSimulation.DeactivateTemporalTablesBeforeDataLoad, Line 25 [Batch Start Line 0] SYSTEM_VERSIONING is not turned ON for table Applicaiton.Cities ... I feel safe saying pretty much any table that has an associated Archive table should have its partner containing a temporal table if I am following this I will see if I can get a full list of the affected tables... standby

this is the full syntax I am running

EXECUTE DataLoadSimulation.PopulateDataToCurrentDate @AverageNumberOfCustomerOrdersPerDay = 60, @SaturdayPercentageOfNormalWorkDay = 50, @SundayPercentageOfNormalWorkDay = 0, @IsSilentMode = 1, @AreDatesPrinted = 1;

jodebrui commented 7 years ago

I assume you are referring to the WideWorldImporters sample database?

Could you include the repro steps? How did you deploy the database? Did you download the .bacpac?

From: EndUser2017 [mailto:notifications@github.com] Sent: Friday, February 3, 2017 3:03 PM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Jos de Bruijn jodebrui@microsoft.com; Comment comment@noreply.github.com Subject: Re: [Microsoft/sql-server-samples] Doesn't deploy to Azure (#183)

DataLoadSimulation sproc does not work ... this is from the lack of the system versioning being off and history tables not being present from what I can tell some parts need

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F183%23issuecomment-277386733&data=02%7C01%7Cjodebrui%40microsoft.com%7C2d66b34bcae74f86a44308d44c88d41b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217597935421694&sdata=0Qh%2BZYKwhZkngMyviLZU7pRQNE4ugDJeUjk%2FgqZ3Vv4%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9mC8FZn2Iu77wFngNn9pmajXbBg-ks5rY7IbgaJpZM4L25cy&data=02%7C01%7Cjodebrui%40microsoft.com%7C2d66b34bcae74f86a44308d44c88d41b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217597935421694&sdata=zFs7yO%2F1FfM3A9KTigQsm%2Fs%2FnYa5pXyYly48g8XnlsY%3D&reserved=0.

EndUser2017 commented 7 years ago

Place to focus

...I downloaded bacpac from the the linked file for a premier Azure tier the non-DW variant ... (dataloadsimulation does not exist for DW) ....I deployed via the bacpac file in azure storage... ...after those were created I executed the DataLoadSimulation sproc which broke down in the middle of the initial run ...

hold on I am doing a rebuild from scratch so I can get the first message I got ... that way we can be 1 for 1 on the same page.. I used P1 premier...

EndUser2017 commented 7 years ago

...Note during the Import of the DB from the backpac... the tables are flagged as temporal tables 'hourglass' icon then it disappears after the import is completed...

I initiated the dataload script below with this syntax

EXECUTE DataLoadSimulation.PopulateDataToCurrentDate @AverageNumberOfCustomerOrdersPerDay = 60, @SaturdayPercentageOfNormalWorkDay = 50, @SundayPercentageOfNormalWorkDay = 0, @IsSilentMode = 1, @AreDatesPrinted = 1;

I get this error after about 30 sec of runtime...

Successfully removed row level security Successfully applied row level security Successfully removed row level security Wed Jun 01, 2016

Msg 41359, Level 16, State 0, Procedure DataLoadSimulation.RecordColdRoomTemperatures, Line 33 [Batch Start Line 0] A query that accesses memory optimized tables using the READ COMMITTED isolation level, cannot access disk based tables when the database option READ_COMMITTED_SNAPSHOT is set to ON. Provide a supported isolation level for the memory optimized table using a table hint, such as WITH (SNAPSHOT).

I know OLTP tables require some playing with the hints mentioned above but I this is the first break... I am new to development so knowing how I should change the insert portion with the right hint is not readily apparent to me

Ofcourse this sproc does not fail gracefully so all the changes it starts with leaves me with a broken sample db unless I can fully follow the order of this and manually correct the breaks it started with... for someone new like myself obviously easier said than done ... learning via pain is one thing but still come on... right from step 1... have a heart =)

jodebrui commented 7 years ago

The following database option needs to be configured: ALTER DATABASE CURRENT SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT=ON

I’ll follow up to make sure this is configured correctly in the bacpac.

From: EndUser2017 [mailto:notifications@github.com] Sent: Friday, February 3, 2017 3:34 PM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Jos de Bruijn jodebrui@microsoft.com; Comment comment@noreply.github.com Subject: Re: [Microsoft/sql-server-samples] Doesn't deploy to Azure (#183)

...Note during the Import of the DB from the backpac... the tables are flagged as temporal tables 'hourglass' icon then it disappears after the import is completed...

I initiated the dataload script below with this syntax

EXECUTE DataLoadSimulation.PopulateDataToCurrentDate @AverageNumberOfCustomerOrdersPerDay = 60, @SaturdayPercentageOfNormalWorkDay = 50, @SundayPercentageOfNormalWorkDay = 0, @IsSilentMode = 1, @AreDatesPrinted = 1;

I get this error after about 30 sec of runtime...

Successfully removed row level security Successfully applied row level security Successfully removed row level security Wed Jun 01, 2016

Msg 41359, Level 16, State 0, Procedure DataLoadSimulation.RecordColdRoomTemperatures, Line 33 [Batch Start Line 0] A query that accesses memory optimized tables using the READ COMMITTED isolation level, cannot access disk based tables when the database option READ_COMMITTED_SNAPSHOT is set to ON. Provide a supported isolation level for the memory optimized table using a table hint, such as WITH (SNAPSHOT).

I know OLTP tables require some playing with the hints mentioned above but I this is the first break...

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F183%23issuecomment-277391938&data=02%7C01%7Cjodebrui%40microsoft.com%7Caffc80cc888040d9c14408d44c8d19dc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217616289900331&sdata=ETt3eHX3Uv0Xp%2BaY4Bh9gabujFiAv5K7eaDbRIbzLw8%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9tmCCAXl6G_3uz55ZcuqfWA2ygvXks5rY7lYgaJpZM4L25cy&data=02%7C01%7Cjodebrui%40microsoft.com%7Caffc80cc888040d9c14408d44c8d19dc%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217616289900331&sdata=5zOWnl7aQQn0r%2F4LJv3O5qyId6B7MplWOL4fn81NNuo%3D&reserved=0.

EndUser2017 commented 7 years ago

Awesome... Sproc is building the sample data now... now how about the Datawarehouse variant... is our only choice to load the sample as a standard Sql Azure DB... I have had no luck doing it as a Data warehouse since the bacpac does not restore the same way a stand db does ... least I cannot simply click import Database in Azure and select the file to have it created as a data warehouse ... doing so from Sql ssms even selecting datawarehouse from it results in a unknown edition error ... Am I missing something here as well? ... SSMS is version 2016

Microsoft SQL Server Management Studio 13.0.16106.4 Microsoft Analysis Services Client Tools 13.0.1700.441 Microsoft Data Access Components (MDAC) 10.0.14393.0 Microsoft MSXML 3.0 6.0 Microsoft Internet Explorer 9.11.14393.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 6.3.14393

jodebrui commented 7 years ago

Are you trying to load the bacpac in Azure SQL DW? That will not work. The sample DB only supports SQL Server and Azure SQL DB.

For an Azure SQL DW sample, you can take a look at this one: https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/contoso-data-warehouse

From: EndUser2017 [mailto:notifications@github.com] Sent: Friday, February 3, 2017 4:02 PM To: Microsoft/sql-server-samples sql-server-samples@noreply.github.com Cc: Jos de Bruijn jodebrui@microsoft.com; Comment comment@noreply.github.com Subject: Re: [Microsoft/sql-server-samples] Doesn't deploy to Azure (#183)

Awesome... Sproc is building the sample data now... now how about the Datawarehouse variant... is our only choice to load the sample as a standard Sql Azure DB... I have had no luck doing it as a Data warehouse since the bacpac does not restore the same way a stand db does ... least I cannot simply click import Database in Azure and select the file to have it created as a data warehouse ... doing so from Sql ssms even selecting datawarehouse from it results in a unknown edition error ... Am I missing something here as well?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fsql-server-samples%2Fissues%2F183%23issuecomment-277396382&data=02%7C01%7Cjodebrui%40microsoft.com%7C6c39dac8a75447f9335f08d44c911b8f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217633495803046&sdata=HJ9aOQ1be4VVqRU6SheZZF14ePkmwf36CBMLkWau3mQ%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMuA9tPnrD5oT9MuNNIy0IfUJAEb8bUAks5rY8ASgaJpZM4L25cy&data=02%7C01%7Cjodebrui%40microsoft.com%7C6c39dac8a75447f9335f08d44c911b8f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636217633495803046&sdata=Agdyk6p8O7tE6GePmX0hbkP289O3gSkcgoYTz5PESSA%3D&reserved=0.

EndUser2017 commented 7 years ago

...Well that would do it... Thank you...