Skip to main content

Posts

Showing posts with the label v12

DBCC CHECKDB on SQL Azure to do or not to do?

שלום רב עד לפני זמן DBCC CHECKDB  לא היה יכול לרוץ על SQL Azure . לפני מעל שנה איפשרו את זה, ואז עלתה השאלה - להריץ או לא להריץ? הרי ממילא גם אם נגלה דברים חצי מסוגי הפתרונות לא נוכל לעשות- אין restore . רגיל. כשבדקתי את זה על SQL Azure - עלה שבכל הרצה ובכל tier - זה העלה את ניצול המשאבים של בסיס הנתונים ל 100%.לכן בזמנו החלטתי לא להריץ וחשבתי וקיוותי שמיקרוסופט עושים עבורנו את העבודה - הלא זהו שירות PAAS? ובכן בזמן האחרון יצאו 2 מאמרים אחד של בלוגר חביב והשני של בחור ממיקרוסופט שהסביר בדיוק איך ומה הם עודים ומה הפעולות שלהם במידה ומתגלית בעיה. הלינק של הבלוגר החביב ששמו הוא Arun Sirpal, בו הוא מתאר את מה שתיארתי עכשיו :-) : https://blobeater.blog/2017/09/04/dbcc-checkdb-azure-sql-database/ זהו הלינק למאמר מבית היוצר של מיקרוסופט שמתארים מה הם עושים ומה הם מריצים - מאמר מאד חשוב וקריטי למי שיש לו Prodaction on SQL Azure. How we manage data integrity for Azure SQL Database  

Azure SQL DB - Service Tiers

Hi All Since we got change in Azure SQL DB tiers last week - and have now P15 tier, I have collected some data about the tiers and put it all in 1 table. I collected data from 3 sources: Prices from MSFT link: https://azure.microsoft.com/en-us/pricing/details/sql-database/ All other details documented by MSFT : https://azure.microsoft.com/en-us/documentation/articles/sql-database-service-tiers/?rnd=1 RAM and CPU by query some DMV's, I took the idea from Tomas Zuber: http://www.tomaszuber.com/2015/09/02/azure-sql-database-p11-and-p4-utilization/  and from Dimitri Furman : https://blogs.msdn.microsoft.com/dfurman/2015/04/02/collecting-performance-counter-values-from-a-sql-azure-database/   Please note - all the DATA is not relevant to: Elastic DB pools - collections few Azure SQL DB to a one pool. Stretch DB - Migrated Tables from SQL Serve 2016 to Azure SQL DB. SQL DWH - DB for DWH in Azure that can be stopped.   Changes can happened d...

Cross Database Queries in SQL Azure DB - Part 2

Hi All   So After a month of using Cross Database Queries in SQL Azure DB, I can say that we have a very useful tool.   We can use in many scenarios, I will show today one.   We are using 10 shards DB's to balance read operations to many DB's. The write operations goes to the DB's as well.   I' as a DBA wants to know the status of all DB's, so instead of creating PowerShell that connect to all of the DB's I have created external tables in 1 DB that reads the     sys . dm_db_resource_stats     from all DB's' so I have now 1 real table and 9 external tables.   I have created a view that reads from al 10 tables' and now I see all data from all shards.   I also put it in PowerBI and I see it in a visual way - and also in my Mobile.   Here I have in the first line DTU AVG value for each shard in the last 10 minutes, 1 clock that avg all shards.   The second line is the DTU real value in the ...

All about Security in SQL Azure DB

Hi All   Since this is become more and more important for SQL Azure DB I am writing about 'Security Features in SQL Azure DB'.   I will put everything in a list and links for all features. 1)    Azure SQL Database security guidelines and limitations:   a) Link: https://azure.microsoft.com/en-us/documentation/articles/sql-database-security-guidelines/ .   b) This link explain about: Firewall, Connection encryption and certificate validation, and some best Practices. 2)    Connecting to SQL Database: Best Practices and Design Guidelines:   a) Link: https://azure.microsoft.com/en-us/documentation/articles/sql-database-connect-central-recommendations/   b) This link bring few other links of the FW issue and connection Ports. 3)    Connecting to SQL Database By Using Azure Active Directory Authentication   a) Link: https://azure.microsoft.com/en-us/documentation/articles/sql-databa...

Extended Events in SQL Azure

Hi Everybody   Today an English post about 'Extended Events in SQL Azure', some of you shorten the name to 'EE' and some to 'XEvent'. I Love EE so this is how I will call it in this post.   This feature was introduce in SQL Server 2008 and its should help collecting DATA about what is running in the Server.   More Details about this SQL Server feature can be found in this Link: https://msdn.microsoft.com/library/bb630282.aspx?f=255&MSPPError=-2147217396   There are a few differences between EE in SQL Azure and regular SQL Server: In SQL Server versions the EE are on the Server level and therefore you create sessions on Server. In SQL Azure the server is a virtual entity - so the EE is in DB level and you create the session on DataBase. In SQL Server versions the EE can write to files on the server. SQL Azure does not have drives for files (SQL Azure is PAAS.....:-)). There is an option to write to blob storage, for this we need t...

Deadlocks in SQL Azure V12

Hi All   Today I want to explain how to find and troubleshoot Deadlocks in SQL Azure V12.    At V2 we had this query to run and find our deadlocks:   SELECT * FROM sys . event_log WHERE event_type = 'deadlock'   This query return XML, and we could have change it to XDL and see the deadlock Chart.   You can see this in the 2 links by Thomas Larock ( @ SQLRockstar ):     http://thomaslarock.com/2013/05/how-to-troubleshoot-deadlocks-in-windows-azure-sql-database-wasd/ & https://www.youtube.com/watch?v=RlKCe05WDOw   Now in V12 this feature is not supported - so how do you get the deadlock data?   MSFT Gave us this query (Running on Master DB):     SELECT top 100 *, CAST ( event_data as XML ). value ( '(/event/@timestamp)[1]' , 'datetime2' ) AS timestamp , CAST ( event_data as XML ). value ( '(/event/data[@name="erro...

Managing Versions in SQL Azure

שלום לכולם והיום על versions. קיימים שלושה מספרים המייצגים את version של ה sql שלך: Select @@version -->  Microsoft SQL Azure (RTM) - 12.0.2000.8   Sep  2 2015 20:51:51   Copyright (c) Microsoft Corporation  select  DATABASEPROPERTYEX(db_name(), 'Version')  --> number like 826 or any other The Performance tier שלושה מספרים אלו מייצגים את מספר גרסת ה sql ברמת בסיס נתונים כאשר ייתכן שתהיה אותה ורסיה אולם מספר שונה - ואפילו באותו שרת ייתכנו שינויים בין בסיס נתונים. למה זה חשוב? לא באמת זה חשוב ולא באמת זה מועיל - אבל יש פה כמה היבטים - ראשית אפשר ללמוד הרבה מהגלגולים ופריסת הגרסאות הרבה ויחד עם זאת אפס אחוז  downtime. שנית כאשר ישנה תקלה יותר נוח למסור ישר את 3 המספרים אלו ואז הטיפול יהיה ממש מהיר - הם יוכלו לזהות במהירות מצי נפרסה הגרסה וכך לזהות בעיות שיכלו להתרחש. ועכשיו ארחיב לגבי הנקודה השלישית. אם תיראו בפוסט הקודם הזכרתי את 3 הגרסאות שקיימות היום ב SQL Azu...