דילוג לתוכן הראשי

רשומות

מציג פוסטים מתאריך 2016

Compatibility Level in SQL Azure

שלום רב הפוסט היום מיועד ל  DBA's. מן הסתם אחרים פחות יבינו אולם פה אני אסביר לכם גם למה אני כל כך אוהב את הענן. ובמיוחד את SQL Azure. פשוט מדהים וכיף - אז ככה מי מה DBA's שקוראים פוסט זה לא יודע מהו Compatibility Level? 2 הצביעו - יפה. אז הנה הסבר קצר: לבסיס נתונים יש version שזה מספר הגירסה של בסיס הנתונים, אולם בכדי שתהיה תמיכה לאחרו הוסיפו החכמים את המימד של Compatibility Level. כלומר בסיס נתונים יכול להיות בגירסה מתקדמת אולם ה Compatibility Level יהיה מכוון לגירסה ישנה יותר ואז חלק מהשפה וחלק מהמנוע יעבוד על פי גירסה ישנה יותר. זו הטבלה המדוייקת שנלקחה מהלינק הזה https://msdn.microsoft.com/library/bb510680(SQL.130).aspx  :     אם קוראים בכתובים אפשר לראות למשל ש: Compatibility-level setting of 130 - The Insert in an Insert-select statement is multi-threaded or can have a parallel plan. Compatibility-level setting of 120 or lower  - The Insert in an Insert-select statement is single-threaded.    כלומר שגם אם תבצע Insert Select  ב SQL Server 201

Long Term Retention Backup in Azure SQL DB

ערב טוב לילה, בחירות, זמן - סוף סוף יש זמן לכתוב פוסט. והיום על פיצ'ר החדש הקרוי:  Long-Term Backup Retention אפשר לבצע פעולות אלו גם בפורטל וגם ב PS אני אציג בפוסט זה את הדרך לבצע גיבויים אלו דרך הפורטל. מצורפים 2 לינקים, ראשון ההכרזה עצמה, הלינק השני מכיל תיאור כיצד לבצע ב PS.   Announcement : https://azure.microsoft.com/en-us/blog/azure-sql-database-now-supporting-up-to-10-years-of-backup-retention-public-preview/   PS: https://azure.microsoft.com/en-us/documentation/articles/sql-database-long-term-retention/   אז קדימה בואו נצלול לעולם הגיבויים ארוכי הטווח. המפתח הוא להבין מה היה עד היום ומה מציעים עכשיו. עד היום היה ניתן לשחזר אחורה עד 35 ימים (לפי ה tier המתאים) לכל נקודה בזמן (PIT). עכשיו מציעים ללא קשר ל tier שמירה של עד 10 שנים של עותק של בסיס הנתונים. במענה לשאלה שלי ענו לי ככה:   The SQL Long term backup retention only saves the weekly backup to Recovery Service Vault.   כלומר הם שומרים רק Full backups. ואותם מעבירים ל Recovery

Performance Recommendations you DO NOT want to do in your Azure SQL DB

שלום לכולם בתקופה האחרונה אני רואה טרנד מאד חזק של בלוגים ומאמרים שאומרים "אל תהיה טיפש.... אל תעשה את זה.." או בלוגים בסגנון של "רעיונות ממש - אבל ממש רעים..". אז יילה גם אני ארחב על הגל הזה בהקשר של SQL Azure. והיום ה - "אל תהיה טיפש" מספר 1:   יש בפורטל מסך השייך לכל בסיס נתונים ובו פעולות אפשריות על בסיס הנתונים - החל בפתיחת קריאה - עבור לשינוי יכולות וביצועים וכלה בהמלצות. תחת הכותרת: "SUPPORT + TROUBLESHOOTING" יש 5 אפשרויות לחיצה הראשונה בודקת מצב כללי של בסיס הנתונים. האחרונה זו פתיחת קריאה ישר על בסיס הנתונים הזה - מאד נוח לשימוש וממליץ לפתוח קריאה מפה.        השניה מציגה סיכום קצר של נקודות 3 וארבע כלומר   Over view on Query insights - that is the same as query store and Overview on Performance Recommendations.   זהו המסך:          המסך מחולק ל 4 חלקים - למעלה זהו החלק שאחראי על    Overview on Performance Recommendations: Create & Drop indexes & Fix Schema issues

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 during time

Azure Audit Logs and DBA's

שלום רב כבר מעל חודשיים מעל הפוסט האחרון, הסיבה המרכזית היא שעברנו בחברה שלנו ל Storage חדש, בסביבת ה On Premise. עברנו לסביבת All Flash של Kaminario הישראלית. אבל מה לנו בפוסט על הענן ועל Storage.... היום נדבר על שליטה - אנו ה DBA הרי ידועים כ Control freaks. הרי למי אין איזה ג'וב שמתריע לו שיש DB חדש לגבות ? למי אין ג'וב שמתריע על כל שינוי? ובכן ב Azure אפשר לשנות בסיסי נתונים על ידי פקודות T-SQL או PS, ורוב פקודות אלו מתועדות. אבל יש דברים שעושים דרך הפורטל ואז זה לא מתועד בבסיסי הנתונים עצמם. ולכך יש את ה Audit logs. זהו מנגנון המתעד כל מה שקורה בפורטל - החל ברמת יצירות שרתים מכונות וכלה מאילו אלרטים קפצו. יש 2 דרכים לראות את הלוגים הללו מהפורטל עצמו ומ POWER BI. פורטל עצמו: לוחצים על הכפתור של הלוגים,   לאחר שלחצתם על הכפתור מגיעים למסך חיפוש, זהו מסך יחסית חדש (עד לפני שבועיים זה הייתה רשימה וכיום מסך חיפוש, שבטח עוד יעבור שיפוץ). ניתן לפלטר לפי מספר קריטריונים - אני חיפשתי פעולות אדמינסטטיביות שקשורות לבסיסי נתונים כמו יצירת בסיס נתונים, שרתים, ה

Geo-Replications Types in SQL Azure - New features

שלום רב והיום לשם שינוי פוסט בעיברית. בתאריך 2015-02-19 כתבתי פוסט בנושא Geo-Replications Types in SQL Azure. http://www.sqlazure.co.il/2015/02/geo-replications-types-in-sql-azure.html שם הצגתי את 2  האפשרויות שקיימות ב Azure SQL בנושא זה: Standard Geo-Replication. Active Geo-Replication.  כאשר ההבדלים המרכזיים היו בתחום של Readable / NON Readable, מיקום הרפליקות ועוד. בתאריך 2015-11-23 הצגתי בפוסט נוסף את החידוש של Fail Over - כלומר שאפשר לשחק בין Primary and Secondary. http://www.sqlazure.co.il/2015/11/failover-in-sql-azure-db-with-geo.html והיום אציג את הצעד השלישי בהתפתחות עולם ה - DR ב SQL Azure. וזה מה שמעניין בענן - צריך חזון - ואז האפשרויות בלתי מוגבלות - ולנו המשתמשים הכל תלוי בעומק הכיס.... השינוי הכי מהותי לדעתי הוא זה: The performance objectives can be different between primary and secondary.   כלומר ניתן יהיה לעבוד עם קונפיגורציה כזו שה Primary יהיה בעלות למשל של S3, ואילו ה Secondary יהיה S0. וכך יורדו עלויות בצורה דרמטית. חייבים לקחת בחשבון שאם

Dashboards in Azure Portal

Hi   Today I will be reviewing the Azure Portal Dashboard. We have seen lots of improvements in that field. It has developed to include a variety of options, and lot of use cases:   Monitoring, with full screen and charts. Shortcuts to the most usable apps. Share dashboards between users. You can have multi Dashboards, like Dashboard for DB's, for Storage or VM's or per application or resource group. I find these new features very useful and very easy to implement. Here are some screenshots showing the uses.   Image 1 - shows what options we have for the Dashboards     : We can add new, edit an exiting one, share to other users, clone and delete.     Image 2 - shows the options when clicking on the arrow near the Dashboard, we see the list of my dashboards, and the dashboards that was shared with me.       Image 3 - shows the screen after clicking on "Share", we can share to a subscription, and put it in a loc

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 last 10 Minutes per Sha

Cross Database Queries in SQL Azure DB - Part 1

Hi   I wanted to write this post a long time ago but have not had the chance, so now with the new year - this will be the first post for 2016.   Cross Database Queries in SQL Azure DB was a key feature that was missing from day 1 on SQL Azure DB. Finally we have this  key feature, and no, it is not the same as in the regular SQL Server. We have a new way to do this. It is bases on the new key feature  in SQL Server 2016 called "External Tables" ( https://msdn.microsoft.com/en-us/library/dn935021.aspx ). Also known as " PolyBase ".   The logic behind the feature is that you can query tables with-in your DB (like you are doing today) and also at any other DATA source like it is a table within the DB.   From one SQL Azure DB to another we can not connect to it via linked server. However a second SQL Azure DB is referenced like any other external data source. Microsoft thinking is that SQL Azure DB is another DATA sources for External tables (