Top Banner
Azure PaaS Workshop Solution
31

Azure PaaS (WebApp & SQL Database) workshop solution

Apr 11, 2017

Download

Software

Gelis Wu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Azure PaaS (WebApp & SQL Database) workshop solution

Azure PaaS Workshop Solution

Page 2: Azure PaaS (WebApp & SQL Database) workshop solution

Agenda

• Job Scheduling on Azure PaaS.• SQL Service on Azure PaaS.• Pricing for Azure PaaS.

Page 3: Azure PaaS (WebApp & SQL Database) workshop solution

Job Scheduling on Azure PaaS.

Page 4: Azure PaaS (WebApp & SQL Database) workshop solution

Job Scheduling on Azure PaaS.

• Development in Visual Studio 2015 or Higher.• Base on Web App Service.• To deploy WebJobs by using the Azure Portal.• Use scheduler to Trigger your Web Job.

Page 5: Azure PaaS (WebApp & SQL Database) workshop solution

Acceptable file types for scripts or programs.

• The following file types are accepted:• .cmd, .bat, .exe (using windows cmd)• .ps1 (using powershell)• .sh (using bash)• .php (using php)• .py (using python)• .js (using node)• .jar (using java)

Page 6: Azure PaaS (WebApp & SQL Database) workshop solution

Create a scheduled WebJob using the Azure Scheduler

• All settings are done at Azure Portal.• Support job Type:– On-time Job.

• Now.• At a specific time.

– Recurring Job.• minutes.• Hours.• Days.• Weeks.• Months.

Page 7: Azure PaaS (WebApp & SQL Database) workshop solution

Create a scheduled WebJob using the Azure Scheduler

• Sign in to Azure Portal.– Click +New type Scheduler in the

search box select Scheduler in results click Create.

– Add a action settings (Default use HTTP and HTTPS job action type).

– Adjust schedule.• You may change the start date and time,

recurrence schedule, and the end date and time.

Page 8: Azure PaaS (WebApp & SQL Database) workshop solution

Monitoring for WebJob

• Use azure portal.• Use scm administration tool for WebApps.– Enable diagnostics logging.– Monitoring Quotas and Metrics in the Azure Portal.• Alert in WebApps.

• Application insights.• Troubleshooting using Visual Studio.

Page 9: Azure PaaS (WebApp & SQL Database) workshop solution
Page 10: Azure PaaS (WebApp & SQL Database) workshop solution

Pricing for Web App Service

By default use F1.

Page 11: Azure PaaS (WebApp & SQL Database) workshop solution

SQL Service on Azure PaaS.

Page 12: Azure PaaS (WebApp & SQL Database) workshop solution

SQL Service on Azure PaaS (SQL Database)

• Topic:– Understand what's available in each service tier.– DTU and eDTUs and DTU benchmark overview.– Pricing for SQL Database.– Migration Oracle database to Azure SQL Database.

Page 13: Azure PaaS (WebApp & SQL Database) workshop solution

Choosing a service tier

Page 14: Azure PaaS (WebApp & SQL Database) workshop solution

What are DTU?

• DTU = (Database Transaction Units)• A DTU is a blended measure of CPU, memory, and data I/O and

transaction log I/O in a ratio determined.

Page 15: Azure PaaS (WebApp & SQL Database) workshop solution

What are eDTUs

• eDTUs = (elastic Database Transaction Units).• An eDTU is a unit of measure of the set of resources (DTUs) that can

be shared between a set of databases on an Azure SQL server. – If has unpredictable resource requirements for memory, IO, and CPU. – called an elastic pool

Page 16: Azure PaaS (WebApp & SQL Database) workshop solution

What are eDTUs (2)

• Azure SQL Database elastic pools provide a simple cost effective solution to manage the have widely varying and unpredictable usage amount.– A pool can have multiple Database.– A pool allows these unused DTUs to be shared across multiple

databases, and so reduces the DTUs needed and overall cost.

Page 17: Azure PaaS (WebApp & SQL Database) workshop solution

Pricing for SQL Database.

Page 18: Azure PaaS (WebApp & SQL Database) workshop solution

Standard Service Tier

Page 19: Azure PaaS (WebApp & SQL Database) workshop solution

Premium Service Tier

Page 20: Azure PaaS (WebApp & SQL Database) workshop solution

Standard elastic pool limits

Page 21: Azure PaaS (WebApp & SQL Database) workshop solution

Standard elastic pool limits (2)

Page 22: Azure PaaS (WebApp & SQL Database) workshop solution

How to determine the number of DTUs required

• You want to migrate an existing on-premises or SQL Server virtual machine workload to the Azure SQL Database– you can use the DTU calculator to estimate the amount of DTU

required.– Use the SQL Database Advice or use Load Test Tool to queries limits

are reached.

Page 23: Azure PaaS (WebApp & SQL Database) workshop solution

What happens when the DTU limits is reached.

• If your workload reaches one of the (CPU / data) (IO / log IO) limits are reached.– You may experience a longer query delay– But these restrictions do not cause any errors

• But during peak loads when the application either sends too many requests or the database reaches its resource limits and starts piling up worker threads due to longer running queries, errors can be encountered.

Page 24: Azure PaaS (WebApp & SQL Database) workshop solution

Migration Oracle database to Azure SQL Database.

• Recommended migration process:– Use SSMA (SQL Server Migration Assistant)• Create a new SSMA Project.

– For information about GUI settings, see Project Settings (GUI) (OracleToSQL).• Mapping Oracle and SQL Server Data Types (OracleToSQL)• Convert Oracle database schemas into SQL Server schemas.• Load the converted database objects into SQL Server.

– Save a script and run it in SQL Server .– Synchronize the database objects.

• Migrate data to SQL Server.

Page 25: Azure PaaS (WebApp & SQL Database) workshop solution

Migration SQL Server to Azure SQL Database

• Use Data Migration Assistant.• Create a database snapshot.– Ensure no further changes.

• Export the database copy to a .BACPAC.• Import the .BACPAC file as a new Azure SQL database.

Page 26: Azure PaaS (WebApp & SQL Database) workshop solution

Use (import/Export) tool SqlPackage.exe1. 匯出資料sqlpackage /Action:Export /ssn:GELISMAC\MSSQLSERVER2016 /sdn:[DatabaseName]/tf:"D:\bacbupFile.bacpac" /su:sa /sp:[yourpassword]

2. 匯入資料sqlpackage /Action:Import /tsn:cxclab.database.windows.net /tdn:[DatabaseName] /sf:"D:\backupFile.bacpac" /tu:cxclab /tp:[yourpassword]

Page 27: Azure PaaS (WebApp & SQL Database) workshop solution

References:• https://docs.microsoft.com/en-us/sql/ssma/oracle/migrating-oracle-databases-to-sql-server-oracletosql• http://beyondrelational.com/modules/2/blogs/82/posts/13177/ssma-sql-server-migration-assistant.aspx

Page 28: Azure PaaS (WebApp & SQL Database) workshop solution

Pricing for Azure PaaS.

Page 29: Azure PaaS (WebApp & SQL Database) workshop solution

Pricing for Azure PaaS.

• If you expect a lower traffic load, you can use the shared service (F1, D1 free and shared pricing layer)

• If the loading is high, you can select from a number of special services (basic [B1 ~ B2], standard [S1 ~ S3] and advanced [P1 ~ P3])

Page 30: Azure PaaS (WebApp & SQL Database) workshop solution

Azure pricing calculator

• Price and configure Azure features for your scenarios.• https://azure.microsoft.com/zh-tw/pricing/calculator/?service

=sql-database

Page 31: Azure PaaS (WebApp & SQL Database) workshop solution

Q&A