azure paas (webapp & sql database) workshop solution

Post on 11-Apr-2017

28 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Azure PaaS Workshop Solution

Agenda

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

Job Scheduling on Azure PaaS.

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.

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)

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.

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.

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.

Pricing for Web App Service

By default use F1.

SQL Service on Azure PaaS.

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.

Choosing a service tier

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.

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

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.

Pricing for SQL Database.

Standard Service Tier

Premium Service Tier

Standard elastic pool limits

Standard elastic pool limits (2)

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.

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.

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.

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.

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]

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

Pricing for Azure PaaS.

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])

Azure pricing calculator

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

=sql-database

Q&A

top related