All the headlines and interesting SQL Server information that we've collected over the past week, and sometimes even a few repeats if we think they fit. These headlines are gathered throughout the week and are posted in real time at the website. Check there for information throughout the week or enjoy this weekly summary of the SQL Server world. Vendors/3rd Party ProductsDriving up database coding standards using SQL Prompt - This article demonstrates how a team can use SQL Prompt to establish and share coding standards, through code analysis rules, formatting styles and code snippets....(more) Monitoring and Troubleshooting Deadlocks with SQL Monitor - This article will discuss why deadlocks occur, why they require immediate investigation by the DBA, and the diagnostic data required to troubleshoot them....(more) T-SQLSQL SERVER – Creating Temporary and Global Temporary Stored Procedures - During recent Comprehensive Database Performance Health Check, I had a very interesting situation I encountered where we found a stored procedure which was a root cause of the slowness. What we needed to do is to change the code and test if our new stored ......(more) Dates and Times in SQL Server: TIME - This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the previous DATETIME and SMALLDATETIME types that we looked at previously. What ......(more) The Case of MAX() Requiring an Index Scan, While TOP(1)/ORDER BY DESC Does Not - This is told as a story about query tuning. If you just want the answer to why the MAX() query was slow, scroll to the end for a recap. Most of the time in SQL Server, the MAX() function and a TOP(1) ORDER BY DESC will behave very similarly. If you give ......(more) When DISTINCT GROUP BY - I wrote a post recently about DISTINCT and GROUP BY. It was a comparison that showed that GROUP BY is generally a better option than DISTINCT. It's on a different site, but be sure to come back to sqlperformance.com right after.. One of the query comparisons ......(more) An Easier Way of Transposing Query Result in SQL Server - I like Phil Factor’s articles. The latest one, An Easier Way of Pivoting Data in SQL Server, inspired me to start exploring another option to transpose a result from a query. There are many situations in which the results of a query look better when ......(more) What is Alternative to CASE Statement in SQL Server? – IIF Function – Interview Question of the Week #164 - Question: What is Alternative to CASE Statement in SQL Server? Answer: IIF Function. Honestly, when I write this blog post I feel a bit sad that IIF Function has not received necessary adoption since its release in the year 2012. When I am writing this ......(more) Revisiting catch-all queries - I originally wrote about catch-all queries early in 2009, just as something that I’d seen several times in client code. It turned into the 3rd most popular post ever on my blog. A lot’s changed since 2009. When I wrote the original post, most production ......(more) The Lighter SidePorsche and Bugatti turn to 3D printing for complex or rare parts - The last time we looked at 3D printing in the automotive world, it was still a technique limited to startups like Divergent 3D or Local Motors. But in the last few months, there's been growing evidence that the big OEMs are waking up to the ......(more) New York commits $1.4 billion to renewable energy projects - Enlarge / MADISON, New York - 2015/10/11: Wind farm with autumn color. (credit: John Greim/LightRocket via Getty Images) On Friday, New York Governor Andrew Cuomo announced that his state would commit $1.4 billion to 26 renewable projects, including ......(more) T-SQL Tuesday #100: What’s New With Scalability Groups in SQL Server 2026 - Welcome to T-SQL Tuesday #100. In a community filled with ADD people like the SQL community (myself included), who would have guessed that T-SQL Tuesday would still be going strong years later? Other attempts at similar recurring themed posts have been ......(more) SQL Server 2026: BAGI Edition (#TSQL2SDAY 100!) - It’s T-SQL Tuesday’s 8 year birthday (or close enough), and Adam Machanic has challenged us with the question: what will the world be like when T-SQLTuesday turns 16? Not familiar with T-SQL Tuesday? It’s a monthly event where you’re invited to join ......(more) Databases Eight Years from Today, 2018 Edition #TSQL2sday - Almost exactly five years ago today, back in March of 2013, I wrote a post called Databases Five Years from Today. In it, I predicted: You’d still be supporting 2005 and 2008 – while the number of 7% of servers are still 2005 and 2008 might seem small, ......(more) Testing SoftwareData-driven unit testing for data scientists and quant developers alike - Often overlooked, testing is a critical process that saves time over the long term and enables building complex systems. Unit tests for model (descriptive, predictive, or prescriptive analytics) systems differ from standard software. Effective unit testing ......(more) Tech NewsCalif. weighs toughest net neutrality law in US—with ban on paid zero-rating - Enlarge / California State Capitol building in Sacramento. (credit: Getty Images | joe chan photography) A proposed net neutrality law in California would replace the repealed federal regulations, going beyond the federal rules by banning payments for ......(more) Blockchain Demystified: The Next Database Management Evolution - Prepare for Blockchain technology to revolutionize business, society, and almost everything in between. Blockchain, also known as Distributed Ledger Technology, has the “potential to deliver disruptive outcomes and reshape digital business in 2018.” ......(more) Software DevelopmentThinking about microservices? You need DevOps first - With the rise of new virtualization technologies using containers, people are starting to think more and more about using microservices in their organizations. They’ve been getting a lot of attention and companies like Netflix, Amazon, Uber, and Spotify ......(more) Security news and thoughtsU.S. Accuses Russia of Hacking Energy Grid, Critical Infrastructure - The Trump administration accused Russia on Thursday of a concerted operation to hack the U.S. energy grid and other critical infrastructure including aviation, and separately imposed sanctions on a raft of Russian officials for alleged high-tech interference ......(more) Artificial Intelligence and the Attack/Defense Balance - Artificial intelligence technologies have the potential to upend the longstanding advantage that attack has over defense on the Internet. This has to do with the relative strengths and weaknesses of people and computers, how those all interplay in Internet ......(more) SEC Accuses Former Equifax Executive of Insider Trading - A former Equifax executive has been accused of insider trading by federal regulators for allegedly dumping thousands of shares of the company's stock after a massive data breach at the credit reporting firm last year. In a lawsuit filed Wednesday, the ......(more) Judge Will Allow Yahoo Users To Sue Over Massive Data Breach - Yahoo users in the United States can sue the company over the former tech giant's massive, record-setting data breach. On Friday in San Jose, U.S. District Judge Lucy Koh rejected the bid by Verizon, Yahoo's owner, to dismiss many claims, such as negligence, ......(more) Intel Publishes Spectre & Meltdown Hardware Plans: Fixed Gear Later This Year - Since the public revelation of the Meltdown and Spectre CPU vulnerabilities early this year, Intel has spent virtually the entire time in a reactionary mode, starting from the moment the vulnerabilities were revealed ahead of schedule. Since then the ......(more) Creating Wildcard SSL Certificates with Let’s Encrypt - One of my favorite services is Let's Encrypt. They issue free SSL certificates. I have written about how to generate a certificate for a Web App using their service. They have just started issuing wildcard certificates, and in this blog post I will show ......(more) Two New Papers on the Encryption Debate - Seems like everyone is writing about encryption and backdoors this season. "Policy Approaches to the Encryption Debate," R Street Policy Study #133, by Charles Duan, Arthur Rizer, Zach Graves and Mike Godwin. "Encryption Policy in Democratic Regimes," ......(more) E-Mailing Private HTTPS Keys - I don't know what to make of this story: The email was sent on Tuesday by the CEO of Trustico, a UK-based reseller of TLS certificates issued by the browser-trusted certificate authorities Comodo and, until recently, Symantec. It was sent to Jeremy Rowley, ......(more) A raft of flaws in AMD chips makes bad hacks much, much worse - Enlarge (credit: AMD) Secure enclaves like the one found in iPhones are intended to be impenetrable fortresses that handle tasks too sensitive for the main CPUs they work with. AMD's version of that co-processor contains a raft of critical flaws that ......(more) R LanguageData experiments with salary survey – I - As someone who just crossed three decades of working in technology – I have a sudden renewed interest in understanding how careers in technology evolve with age or years of experience. Those of us older in this industry are among the first generation ......(more) Getting Started With R In SQL Server 2017 - Prior to SQL Server 2016, running R on Microsoft platform required an installation of the R Language and its environment and an external IDE to write R codes. Then came the Microsoft R Server and its own flavor of R, the Microsoft R Open. With SQL Server ......(more) Product Upgrades and ReleasesReleased: Public Preview for SQL Server Management Packs Update (7.0.3.0) - We are getting ready to update the SQL Server Management Packs. Please install and use this public preview and send us your feedback (sqlmpsfeedback@microsoft.com)! We appreciate the time and effort you spend on these previews which make the final product ......(more) Product Reviews and ArticlesWhat is the ROI of a SQL Server Monitoring Tool? - The increasing size of SQL Server databases, alongside the growing complexity of SQL Server estates, is making more organizations realize the need for a tool that enables proactive monitoring. Let us try to answer a question – What is the ROI of a SQL ......(more) PowerShellEasily Splatting PowerShell with VS Code - So I always like to show splatting PowerShell commands when I am presenting sessions or workshops and realised that I had not really blogged about it. (This blog is for @dbafromthecold who asked me to ) What is Splatting? Well you will know that when ......(more) PowerPivot/PowerQuery/PowerBIPower BI Administrator Tenant Settings; Configuration You Don’t Dare to Miss - In the world of Power BI, there are many configurations in the Desktop tool, and some on the website. None of these configurations are as critical as the Tenant Settings of the Power BI administrator panel. Tenant settings have a list of highly important ......(more) Usage Metrics or Do It Yourself Power BI Monitoring Report - One of the features of Power BI Service is usage metrics report on a dashboard or report. The usage metrics report will give you an analysis of how many times the content is viewed or share, through which platforms, and by which users. You can also create ......(more) Four Easy Things You Can Do Now To Make Your Power BI Reports More Accessible - Accessibility is often overlooked or ignored when it comes to reporting and data visualization. I think there are two reasons why: We often don’t consider user scenarios with which we aren’t familiar. If we don’t know someone with color blindness/low ......(more) Power BI Custom Visuals Class (Module 93 – Mapbox Visual) - In this module you will learn how to use the Mapbox Visual. The Mapbox Visual allows you to visualize geographical data while including multiple layers and custom overlays. Module 93 – Mapbox Visual Downloads Power BI Custom Visual – Mapbox Visual Dataset ......(more) Performance Tuning SQL ServerWhy sp_prepare Isn’t as “Good” as sp_executesql for Performance - sp_prepare For Mediocre You may remember me from movies like Optimize for… Mediocre? and Why You’re Tuning Stored Procedures Wrong (the Problem with Local Variables)! Great posts, Kendra! Following the same theme, we found this issue while looking at ......(more) Using Stored Procedures in SQL Server For Better Performance - Intoduction to Stored Procedures in SQL ServerSQL Server uses Different types of stored procedures. They are the quickest method of accessing and manipulating database on the server. SPs are codes and scripts that are predefined for repetitive tasks ......(more) What is a “Morally Equivalent Execution Plan,” and Why Is It Good? - I recently wrote a fairly complicated post, called “Forced Plan Confusion: Is_Forced vs Use Plan = True.” You do NOT need to go read that post to understand this one. I think I’ve found simpler way to explain the most important part of that post – and ......(more) Microsoft NewsHow to use RANKX in DAX (Part 2 of 3 – Calculated Measures) - The first article in this series looked at to use the RANKX function in a calculated column to apply ranking to your data. This article will show how you can use the RANKX function in a calculated measure. I will use the same 10-row data-set and provide ......(more) “Women at Microsoft are sexualized by their male managers,” lawsuit alleges - According to a newly unsealed court filing, women at Microsoft who work in technical jobs filed 238 internal complaints pertaining to gender discrimination or sexual harassment from 2010 through 2016. The ......(more) Hardware NewsIntel Patches All Recent CPUs, Promises Hardware Fixes For Upcoming 8th Gen Chips - Intel announced today in a blog post that it has made Spectre and Meltdown patches available for all processors it has launched in the last five years. ...(more) Raspberry Pi 3 B+ has faster CPU, Wi-Fi, and easier compliance testing - The Raspberry Pi Foundation has announced a new version of its modular compute platform: the Raspberry Pi 3 Model B+. The B+ has the same form factor and dimensions as the Pi 2 B and Pi 3 B, making it a drop-in replacement but ......(more) ADATA Announces XPG SX950U SATA SSD - ADATA has announced a replacement for their top SATA SSD, finally moving their SATA lineup entirely to 3D TLC NAND flash memory. The outgoing XPG SX950 (based on Micron 32-layer 3D MLC) is being replaced by the new XPG SX950U with 64-layer 3D TLC. ADATA ......(more) Intel, Micron Develop Faster Storage for Data Centers - DAILY VIDEO: Faster, more durable solid-state storage is coming to data centers, and memcached DDoS attacks slow down as patching ramps up. ...(more) HA/DR/Always On/ClusteringHow to Use Conditional SQL Agent Job Flows with AlwaysOn Availability Groups - To most effectively leverage high-availability capabilities, database administrators must have an understanding of the key issues involved with working with SQL Server Agent and AlwaysOn Availability Groups. Here's what you need to know (including code). ...(more) ETL/SSIS/ELTThe 7 Data Migration Mistakes You’re Probably Making - We’ve all been there, sitting in our cubicle, trying to migrate data from one server to another. Most of the time everything works as expected. But sometimes data migrations don’t work at all. That’s because there is more to a data migration than just ......(more) DevOps and Continuous Delivery (CI/CD)Thinking about microservices? You need DevOps first - With the rise of new virtualization technologies using containers, people are starting to think more and more about using microservices in their organizations. They’ve been getting a lot of attention and companies like Netflix, Amazon, Uber, and Spotify have attributed some of their recent success to using them. ...(more) Database Design, Theory and DevelopmentPhysical Independence Part 2: Logical-physical Confusion - Note: This is a rewrite of older posts (which now link here), to bring them into line with the McGoveran formalization and interpretation [1] of Codd's true RDM.(Continued from Part 1)This is the second part of my today's response to an old DBDebunk ......(more) Data VisualisationWe Need To Talk About Dashboards - Hey everyone, gather ’round. We need to talk about dashboards. For C-level executives, dashboard reports are essential. Executives don’t have time to review details for every decision they make, they just want to consume a report that has red, yellow, ......(more) Data ScienceWhat Comes After Go-Live? - This is part eight of a series on launching a data science project. At this point in the data science process, we’ve launched a product into production. Now it’s time to kick back and hibernate for two months, right? Yeah, about that… Just because ......(more) How Much Can We Earn? Implementing A Model - This is part six of a series on launching a data science project. Last time around, we walked through the idea of what building a model entails. We built a clean(er) data set and did some analysis earlier, and in this post, I’m going to build on that. Modeling Because ......(more) Data Processing: An Example - This is part four of a series on launching a data science project. An Example Of Data Processing Last time around, I spent a lot of time talking about data acquisition, data cleansing, and basic data analysis. Today, we’re going to walk through a little ......(more) Data Privacy and GDPRComplying with General Data Protection Regulation (GDPR) on Microsoft Data Platform technologies - This post is authored by Frederico Pravatta Rezende, Senior Product Marketing Manager, CADD & AI. Is your organization prepared for the General Data Protection Regulation (GDPR)? If your company does business in Europe, you’ll need to be aware of this ......(more) Data Governance Readiness: The Five Pillars - In light of the General Data Protection Regulation (GDPR) taking effect in just three months, an understanding of data governance readiness has become paramount. Organizations need to make sure they’re ready to meet the world’s most comprehensive data privacy law’s requirements:...(more) The 600+ Companies PayPal Shares Your Data With - One of the effects of GDPR -- the new EU General Data Protection Regulation -- is that we're all going to be learning a lot more about who collects our data and what they do with it. Consider PayPal, that just released a list of over 600 companies they ......(more) GDPR Violations Are Hiding In Your Database – Here’s How To Find Them - Today I was attending the Microsoft Virtual Security Summit, and they posted this poll: As you can see, 22% of the respondents believe that their organization is not impacted by the GDPR. I think that many of that 22% have their head in the sand, something I’ve ......(more) Execution Plans and the GDPR - What? Execution plans and the GDPR? Is this it? Have I completely lost it? Well, no, not on this topic, keep reading so I can defend myself. GDPR and Protected Data The core of the GDPR is to ensure the privacy and protection of a “natural person’s” ......(more) A Practical Guide for GDPR Compliance - The General Data Protection Regulation (GDPR) comes into force in May 2018. It demands data protection safeguards to be implemented by organizations. Download this guide to learn how to get adequately prepared for compliance with the GDPR, as well as ......(more) Conferences, Classes, and EventsThe SQL Privacy Summit - This May 18th, Redgate is putting on a SQL Privacy Summit for people that are looking for solutions to help them comply with the GDPR regulations. I’ll be heading over to participate, and I’m looking forward to hearing from customers and attendees about ......(more) New Course: Why Table Partitioning Does Not Speed Up Query Performance – With One Exception - Table Partitioning is Tricky Business Learn why SQL Server’s table partitioning feature won’t make your queries against disk-based rowstore indexes faster– and may even make them slower. Table partitioning can absolutely be worth implementing, but it ......(more) [Exclusive] Practical Real World Performance Tuning – Live Training Session for Limited Time - I am happy to announce that the new course Practical Real-World Performance Tuning, along with Brent Ozar (blog) is now live. We are accepting the registration for a limited time. This is very unique opportunity to learn Performance Tuning with real-world ......(more) Announcing 2 New Online Classes: Database DevOps and Practical Real-World Performance Tuning - We’re proud to announce that in addition to our existing summer lineup: Always On Availability Groups: The Senior DBA’s Field Guide with Edwin Sarmiento, 3 days $2,995 Data Science Fundamentals with R with Steph Locke, 2 days, $1,995 PowerShell for ......(more) Backup and RecoveryHow to Back Up SQL Server to Azure Blob Storage - When you’re planning for disaster recovery, offsite backups in the cloud are an attractive option. SQL Server Management Studio makes it easy to back up to the cloud inside the GUI, and you can learn how in just 90 seconds: Update March 12 – if you ......(more) Azure SQL Managed InstanceHow to Restore a SQL Server Database into Azure SQL DB Managed Instances - You’ve built your first Managed Instance, and now you wanna play around with real live data. You’re going to need a backup in the cloud to do it – SSMS doesn’t have a drag-and-drop option. Big picture, here’s what we’re going to do: Set up a container ......(more) Azure SQL DB Managed Instances: New Wait Stats - Incidental This is a long list that I haven’t had a change to dig through yet — all I did was compare them to which waits were occurring on my 2017 CU4 instance. There are about 174 of them that I found, though some may just be generated by Hekaton that ......(more) How to configure tempdb in Azure SQL Managed Instance(preview) - Azure SQL Database Managed Instance (public preview) is a fully-managed SQL Server instance in Azure cloud. In the current public preview there are some known issues and bugs that will be fixed during public preview period. One of the potential issues ......(more) Demo – Azure SQL Database Managed Instance in action - Azure SQL Database Managed Instance is new data service in Azure cloud that exposes fully-managed SQL Server Instance that is hosted in Azure cloud and placed in customer VNET. Here you can see some of the key new features that are available in Managed ......(more) How to configure network for Azure SQL Managed Instance - Azure SQL Managed Instance is fully managed SQL Server instance hosted in Azure cloud and placed in your Azure Virtual Network. In this post, I will explain how you can prepare network environment for Managed Instance. Azure SQL Database Managed Instance ......(more) Azure SQL DatabaseUnderstanding DBCC FLUSHAUTHCACHE - This command only applies to Azure SQL Database, at a high level it empties the database authentication cache for logins and firewall rules for the current USER database. In Azure SQL Database the authentication cache makes a copy of logins and server ......(more) Using SMO on Azure App Service (Web Apps) with Azure SQL DB - SQL server management object SMO) is one of the widely used way to interact with SQL server due to its feature for directly able to execute mass operation as well as management operation on SQL server, instead of old school way of using queries. However ......(more) Allowing Azure Service to Connect to your Azure SQL server. - Allowing Azure Service to Connect to your Azure SQL server.In this video David will look at the impact of allowing you Azure SQL databases to work with other Azure services and the knock of effect of setting the option "Allow Access to Other Azure Services".In ......(more) Azure CosmosDBBuild Your First Planet-Scale App With Azure Cosmos DB - Editor's note: The following post was written by Data Platform MVP Johan Åhlén as part of our Technical Tuesday series. Daron Yondem of the Technical Committee served as the Technical Reviewer of this piece. Azure Cosmos DB is Microsoft’s distributed, ......(more) AI/Machine Learning/Cognitive ServicesThree Tips for Successfully Adopting Machine Learning Technologies - Click to learn more about author Scott Parker. It’s no surprise that Machine Learning, Natural Language Processing (NLP) and Cognitive Search technologies are being adopted at high rates. As organizations strive to create value, enhance customer experiences, ......(more) Microsoft researchers match human levels in translating news from Chinese to English - Microsoft researchers are making progress in translating text using deep neural networks AI training techniques. ...(more) Azure Cognitive Services API’s with SQL Integration Services Packages (SSIS) - Blog: Azure Cognitive Services API’s with SQL Integration Services Packages (SSIS) I had a recent requirement to integrate multi-language support into a SQL DW via a SQL SSIS ETL solution. Specifically the SQL DW platform currently only supported English ......(more) Administration of SQL ServerSSMS Output Window - In my experience, there have been occasions where SQL Server Management Studio (SSMS) becomes unresponsive for a length of time. In one particular case, this occurred while I was expanding the list of databases. SSMS just sat there and waited for some ......(more) “Failed to initialize deadlock control, Key cannot be null” When Viewing Deadlock Graphs - I recently got this error in Management Studio when trying to view a deadlock graph that was collected with an extended events session: Failed to initialize deadlock control. Key cannot be null. Parameter name: key I found this error in a session ......(more) SQL Server Diagnostic Information Queries for March 2018 - This month, there are more minor updates to the all of the versions of the queries, primarily in the comments and documentation. I have made the most changes to the SQL Server 2017 version this month. I have also developed a T-SQL script that you can ......(more) Importance of Memory Setting in SQL Server - Memory is one among the resources forming the performance triangle—CPU and storage being the other two. If one is hit, the other two take the load to try to bring the performance to acceptable levels, but there’s always the trade-off. Whatever transactions ......(more) “Last Known Good” or why after instance restart CHECKDB ends so fast? - After every restart of SQL server instance, we can find in the error log messages like: CHECKDB for database ‘AdventureWorks2017’ finished without errors on … (local time). Usually, we wait hours for the maintenance DBCC CHECKDB to end, but after instance ......(more) |