SQL saturday 623 TLV - SQL AZURE

20
Working with the SQL Azure DB @krisherpi www.sqlazure.co.il [email protected]

Transcript of SQL saturday 623 TLV - SQL AZURE

Page 1: SQL saturday 623 TLV - SQL AZURE

Working with the SQL Azure DB

@krisherpi

www.sqlazure.co.il

[email protected]

Page 2: SQL saturday 623 TLV - SQL AZURE

Azure and Me

Since late 2010 (worked with AWS RDS, and azure)

http://www.sqlserver.co.il/?p=2932

www.sqlazure.co.il

Geri’s blog from 1.2.2010 http://blogs.microsoft.co.il/gerireshef/2010/02/01/sql-azure-

%D7%AA%D7%9E%D7%95%D7%A0%D7%AA-%D7%9E%D7%A6%D7%91-

%D7%99%D7%A0%D7%95%D7%90%D7%A8-2010/

5/18/2017 Footer Goes Here2 |

Page 3: SQL saturday 623 TLV - SQL AZURE

Paul S. Randal and Azure

Paul Randal And AZURE:

2011 vs 2017:

2011 - https://www.sqlskills.com/blogs/paul/how-does-

dbcc-checkdb-with-estimateonly-work/

2017- http://us2.campaign-

archive1.com/?u=729526cc5ec7737666e0a1893&id=4

68aa6b799&e=27b4751b5f

5/18/2017 Footer Goes Here3 |

Page 4: SQL saturday 623 TLV - SQL AZURE

etoro.con

Social Data vs Regulations

5/18/2017 Footer Goes Here4 |

Page 5: SQL saturday 623 TLV - SQL AZURE

5/18/2017

|5 |

1. Hybrid infrastructure :1. Non critical DB’s – New DB’s

2. Critical DB’s

etoro.con

Page 6: SQL saturday 623 TLV - SQL AZURE

5/18/20176 |

Page 7: SQL saturday 623 TLV - SQL AZURE

5/18/20177 |

Page 8: SQL saturday 623 TLV - SQL AZURE

What is PAAS in DB world?

You can’t connect to the server or manage / control hardware

No Error Log, cluster admin / AO, Agent

You can’t change files in DB and TempDB

So…what can DBA DO? Short transaction ect…

Performance tuning (Recommendations, adding Indexes ect)

High queries by CPU ,IO ect

Test new features like : temporal tables

Manage DATA Flow!!!

5/18/20178 |

Page 9: SQL saturday 623 TLV - SQL AZURE

Azure SQL DB issues (not in scope)

What is server.

Geo Replication.

Elastic pools.

Backups.

Security.

5/18/20179 |

Page 10: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

SSMS :

Almost all actions you can do in SQL Server.

monthly updates.

SSMS 2016/2017.

Better then 2014\2012 because of the new

features.

5/18/201710 |

Page 11: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

VS2015

Gives you all your Azure DB’s

Execution plans.

Limited SSMS features.

Schema + Data compare.

5/18/201711 |

Page 12: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

Free tools:

SQL Azure Migration wizard

5/18/201712 |

Page 13: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

Azure Portal (Go over SQL DB blade):

Configurations

Restores

Geo-Replications

Alerts

RBAC

T-sql

5/18/201713 |

Page 14: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

PS (using in automation in Azure):

T-SQL queries (Changetier)

Azure commands (MonitoringSQLDB_PS)

5/18/201714 |

Page 15: SQL saturday 623 TLV - SQL AZURE

Connecting to SQL Azure

Function App (FAAS or the current buzzword – ‘Server less’):

C# code to run SQL

No monitoring

Less secure

Power BI templates

5/18/201715 |

Page 16: SQL saturday 623 TLV - SQL AZURE

Use Cases.

Replication Monitor.

SQL Tests.

Cold Data.

Moving data out of the company

Stand alone services when you work hybrid.

Almost everything with understating

limitations.

5/18/201716 |

Page 17: SQL saturday 623 TLV - SQL AZURE

Monitoring

Portal basic charts.

DTU

DTU – A [Database Transaction Unit] is a blended measure of CPU, memory, and

data I/O and transaction log I/O in a ratio determined by an OLTP benchmark

workload designed to be typical of real-world OLTP workloads.

DB level (sys.dm_db_resource_stats every 15 Seconds, for 1 hour)

Server Level - master DB (sys.resource_stats, all db’s every 5 minutes, form restart)

Tiers :

https://docs.microsoft.com/en-us/azure/sql-database/sql-

database-service-tiers#understanding-dtus

https://azure.microsoft.com/en-us/pricing/details/sql-database/

5/18/2017

|17 |

Page 18: SQL saturday 623 TLV - SQL AZURE

Monitoring

Data collected by PS.

OMS (Operation Management Suite)

Log Analytics Its index all logs from portal.

Can create dashboards.

Azure SQL Analytics: Run PS script to Enable Azure resource metrics logging.

Start collecting DATA

Can get in in log search, in portal or in OMS portal (can create alert or PowerBI)

Can create PowerBI report on it – its goes to Datasets

DMV’s

EE

Query Store – example on Rankings DB

5/18/201718 |

Page 19: SQL saturday 623 TLV - SQL AZURE

5/18/201719 |

What's Next?

Page 20: SQL saturday 623 TLV - SQL AZURE

Special thanks to our great sponsors!