Skip to main content

Posts

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...