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. WebinarsFree SQL Server virtual event from Redgate - Register now to confirm your attendance, and be the first to get access to Grant Fritchey’s new eBook, SQL Server Execution Plans, as soon as it's released in 2018....(more) Vendors/3rd Party ProductsHow you can improve your SQL with code analysis in SQL Prompt - You could think of the new code analysis in SQL Prompt as a machine-assisted code review. The rules that are used to check your code point out questionable areas that might be missed during regular testing....(more) What's new in the latest release of SQL Clone? - SQL Clone 2.4 incorporates a new T-SQL script runner that the team can use to mask sensitive or personal data, or to modify security and other configuration settings, prior to creating a clone....(more) Support for static data added to Source Control for Oracle - With the speed of software development increasing, more and more companies and organizations are recognizing that version controlling code is becoming as important for databases as it is for applications. In recognition of this, Source Control for Oracle has been upgraded so that it now version controls static data within databases as well as database schemas....(more) Would you like to see Redgate tools inside SQL Operations Studio? - You may already have heard about Microsoft’s new DevOps platform for database development, SQL Operations Studio. Related to this, Redgate is doing some research into cross-platform data tools. Read this blog post to find out more about what they're doing, and how you can get involved....(more) T-SQLSQL SERVER – Puzzle – Brain Teaser – Changing Data Type is Changing the Default Value - Today, we will see a very interesting puzzle about data types and default values. There are three important properties for any column – Datatype Default value Null-ability A column can be NULL or NOT NULL depending on the business requirements. Along ......(more) When to Use IDENT_CURRENT? – Interview Question of the Week #150 - Question: When to Use IDENT_CURRENT and SCOPE_IDENTITY()? Answer: Earliest this week when I was co-hosting Group By online conference, I have heard this question. This reason, I believe I should discuss this question is because I realized that not many ......(more) The Lighter SideVideo: See our full interview with Apollo 7 astronaut Walt Cunningham - Video shot by Joshua Ballinger, edited and produced by Jing Niu and David Minick. Transcript will be available shortly. (video link) Around NASA and its contractors, the phrase "Return to Flight" carries special meaning. It's used very seriously in very ......(more) The 2017 Ars Technica gadget gift guide: Office and desk tech edition - Enlarge (credit: Mark Walton) It’s the holidays, which means it’s once again time to rack your brain in search of the right gifts for the right people. If someone on your list is into tech, though, we’ve got your back. For this year’s edition of the ......(more) Lightweight and made for fun—Porsche brings out the 911T for us purists - Jonathan Gitlin It's OK to be a little confused by the dizzying array of Porsches to wear the 911 badge. The rear-engined sports car first appeared in 1963 and has been in production ever since. Considering that the 1,000,000th 911 came off the production ......(more) Microsoft Plans Multibillion-Dollar Campus Overhaul in Redmond - Microsoft Corp. plans a multibillion-dollar overhaul of its main campus in Redmond, Washington, adding space for 8,000 more workers. ...(more) Testing SoftwareTesting a Birthday Month Query - I ran across a post from a tester, wondering how to write a query for birthday months. This makes sense, as I’m sure some businesses want to notify or track customers that have birthdays this month and give them something. The post was good, with DDL ......(more) Tech News : General InterestThe Demise of Net Neutrality Will Harm Innovation in America - Congress needs to move fast to limit the damage. ...(more) SQL Server SecuritySecurity Architecture: Knowing the Adversary - When I present or teach on a security topic, I take the time to cover the mindset of the adversary. There are a lot of maxims out there to “know thine enemy,” but here’s a good recent one that explains why: “Unless you can think the way that an evil ......(more) Overview of Encryption Tools in SQL Server - More and more people are considering some level of encryption against their data stored in SQL Server. In many cases it might be considered that other measures such as firewalls, well defined access permissions and application code free of security flaws, ......(more) SQL Server NewsMicrosoft PHP Drivers 5.1.2 Preview for SQL Server Released! - Hi all, We are excited to announce the technical preview for SQLSRV and PDO_SQLSRV drivers. The driver now supports basic CRUD functionalities with the Always Encrypted feature. Notable items about 5.1.2-preview release: Added Support for non-UTF8 locales ......(more) Software DevelopmentUsing Signed Assemblies for SQLCLR: Doing the Safety Dance. - Originally posted on: http://blog.geekypedia.net/archive/2006/02/16/69762.aspxYou know that song. Yes, that song. The beeping. The arm flailing. The Safety Dance. I so wanted it stay in the 80s – along side the uncounted Wild Turkey inflicted hangovers. ...(more) Security news and thoughtsSecurity Vulnerabilities in Certificate Pinning - New research found that many banks offer certificate pinning as a security feature, but fail to authenticate the hostname. This leaves the systems open to man-in-the-middle attacks. From the paper: Abstract: Certificate verification is a crucial stage ......(more) The Trouble with Politicians Sharing Passwords - Presently sponsored by: Do you desire peace of mind? The hackers don't wait, secure your website and mobile apps with Gold Security today.Yesterday I had a bunch of people point me at a tweet from a politician in the UK named Nadine Dorries. As it turns ......(more) Ex-NSA Worker Pleads Guilty to Taking Classified Data - DAILY VIDEO: A former NSA employee pleads guilty to taking secret data home; a Senate bill proposes prison time for failure to report data breaches; Microsoft will modernize its Redmond headquarters campus in 2018; and there's more. ...(more) All Mac users should do this immediately - This post is a public service announcement for all users of macOS High Sierra (10.13). (Note: Apple has already released a fix, but if you do not have automatic updates enabled, this may still affect you.) If you didn’t hear about it already, a major ......(more) Product Upgrades and ReleasesSQL Prompt Gets Even Better - SQL Prompt v9 came out recently, and just when you thought they couldn’t make it better, they found a way. If you click the menu for SQL Prompt, you’ll see a couple new items. Code Analysis!!! Finally, a first step towards some sort of better analysis ......(more) Product Reviews and ArticlesVisual Studio Toolbox: Database DevOps with Redgate ReadyRoll - In this first of two episodes, I am joined by Steve Jones to discuss how you can use the Redgate Data Tools that are included in Visual Studio Enterprise 2017 to extend DevOps practices to SQL Server and Azure SQL databases. In this episode, Steve demonstrates ......(more) Live on Channel 9 with ReadyRoll - I was interviewed in Redmond a couple months ago and the video was just published. I show and demo some database migration work with ReadyRoll in this video: https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Database-DevOps-with-RedGate-ReadyRoll/playerFiled ......(more) Redgate and DLM Consultants: Working together to help data users become GDPR compliant - If you hold ‘personally identifiable information’ (PII) about EU citizens, the new General Data Protection Regulation (GDPR) applies to you. That’s true even if you aren’t in the EU, since this law is extra-territorial. This is significant for various ......(more) Automating SQL Clone Creation with PoSh - I think SQL Clone is one of the game changing products from Redgate. This product really fits into a DevOps mindset, allowing me to quickly and easily build (and rebuild) a dev database. While the agent web pages make this easy, they’re slightly cumbersome ......(more) Book Review – The Biml Book - After years of waiting, a book about Biml has been published! It’s conveniently titled “The Biml Book” (subtitled Business Intelligence and Data Warehouse Automation) and I can tell you immediately it’s the best Biml book I’ve ever read! (haha, it will ......(more) PowerShellMy Second Pester Test - I should write about my first one, but I just copied Rob’s test, so that’s not so exciting. Instead, I decided to take his advice and write some code, then decide how I test it. This isn’t really TDD, but I need to understand how Posh returns things, ......(more) System.ConsoleColor error while running powershell in SQL agent job step - Issue: While running powershell in SQL agent job step, I am getting below error: – A job step received an error at line 3 in a PowerShell script. The corresponding line is ‘$space.ForegroundColor = $host.ui.rawui.ForegroundColor’. Correct the script ......(more) What’s in the box? Validating SQL Server Scripts with PowerShell - Automating your database code deployments and data updates is good. Knowing what is actually being deployed or updated is even better. Here's something that might help. ...(more) PowerShell Functions for Reusability and Restartability in Azure - The key to efficient development is reusability. When developing scripts for administration, being able to restart a script where it left off is also important. Robert Cain shows you how to write functions in PowerShell that have these two qualities for administering Azure....(more) PowerPivot/PowerQuery/PowerBIThe Find An MVP Power BI Report: A Dynamic Way To Promote Your Work - Being presented with the MVP Award is a great achievement. It helps you to build your personal brand, make new connections, and bolster your reputation as an accessible community leader. Now, Data Platform MVP Gil Raviv has created a new, dynamic way ......(more) Power BI Custom Visuals Class (Module 80 – TreeViz) - In this module you will learn how to use the TreeViz Custom Visual. The TreeViz is a breakdown tree that allows you to expand or collapse levels of hierarchical data. Module 80 – TreeViz Downloads Power BI Custom Visual – TreeViz Dataset – Sales by ......(more) Making Sure All Columns Appear When You Combine Data From Multiple Files In Power BI/Power Query M - Here’s a really common problem that occurs when combining data from multiple files, or indeed any type of data source, in Power BI/Power Query/Excel Get&Transform. Imagine you have a folder with two Excel files in, and each Excel file contains a table ......(more) Performance Tuning SQL ServerUsing Diskspd To Test Storage - It's important to test your storage performance especially prior to installing or deploying a new SQL Server. ...(more) SQL Server Missing Indexes Feature and Trace Flag 2392 - Background Since the SQL Server 2005 release, SQL Server has had the default ability to collect metrics about what the query optimizer thinks are “missing” row store indexes, i.e. indexes that the query optimizer thinks would reduce the cost of particular ......(more) Index Maintenance Madness - When we look at a new server, we check out their database maintenance jobs, making sure their server is in a safe place before we dig into their pain points. We verify if their backups and DBCC CHECKDB jobs can meet their RPO/RTO goals. We also check ......(more) The Myth Of Tomorrow - “We’ll fix it in the mix.” “It’s good enough for right now.” “We’ll worry about that later.” “Your check is in the mail.” Of all the traits that make Homo Sapiens unique in the animal world, our capacity for self-deception may be the most amazing. I ......(more) NoSQLCurrent State of the NewSQL/NoSQL Cloud Arena - Choosing the right data platform is not an easy task. Warner Chaves compares the capabilities of the big three database as a service offerings, Microsoft’s Cosmos DB, Google’s Cloud Spanner, and Amazon’s DynamoDB, to help you make the right choice for your application....(more) Hardware NewsToshiba Announces 14 TB PMR MG07ACA HDD: 9 Platters, Helium-Filled, 260 MB/s - Toshiba is announcing its first family of helium-filled hard drives today. It includes the industry’s first 14 TB HDD with nine platters featuring perpendicular magnetic recording (PMR) technology without shingled platters. The drives are primarily aimed ......(more) New Intel, AMD Chips Drive Enterprise Server Growth - Cloud service providers have been the primary system buyers in recent quarters, but businesses are now getting back into the market, IDC says. ...(more) Always Connected PCs: Laptops with Long Battery Life - At a joint event yesterday, Qualcomm and Microsoft provided further details on the progress of their partnership that will deliver users Always Connected PCs that include a full featured experience, a device that is instantly on when you need it, and ......(more) HA/DR/Always On/ClusteringHow to Upgrade an AG Cluster to Windows 2016 - Starting in Windows Server 2012 R2 you now have a way to upgrade a cluster to Windows 2016. The best part is it's not an OS upgrade, but a rebuild. The magic is that you can join a Windows 2016 server to a Windows 2012 R2 cluster. You can upgrade ......(more) UNDERCOVER TOOLBOX: sp_AGReconfigure – Manage Always on Sync & Failover settings from a single stored procedure. - From time to time we need to make changes to Always on Availability group Synchronization mode settings , this also includes changes to the automatic failover partner. Most of the time the goto is to use the GUI which is a nice graphical way of doing ......(more) New in SSMS – Always On Availability Group Latency Reports - With SQL Server 2012 we introduced Always On Availability Groups, and the Always On Availability Group Dashboard in SQL Server Management Studio (SSMS). This dashboard can be utilized by database administrators to view the current health of an Availability ......(more) SQL SERVER – Msg 3743: The Database is Enabled for Database Mirroring. Database Mirroring Must be Removed Before you Drop the Database - One of my clients contacted me for quick assistance. They had Database Mirroring configured for a database. Due to some unknown issue their database mirroring went for a toss. Their end goal was to drop the database so that they can configure database ......(more) Graph DatabasesAn introduction to a SQL Server 2017 Graph database - What is a graph database? A graph is composed of two elements: a NODE (vertices) and an EDGE (relationship). Each node represents entities, and the nodes are connected to one another with edges; these provide details on the relationship between two nodes ......(more) ETL/SSIS/ELTSSIS Scale Out worker is not showing up in Worker Agents - Understanding of the issue: Adding the scale out worker to the master shows successful but this does not show up in the SQL Server integration services – Manage Scale Out (ISManager). Also, this will not be added in [SSISDB].[internal].[worker_agents] Adding ......(more) SSIS packages executed through SQL Agent Job scheduler fails while connecting to Azure File Storage Path - Recently we ran into an interesting scenario where we had a SSIS package that contained a script task and inside the script task, we were making connections to Azure File Storage and pulling the data from the file. While running this SSIS package from ......(more) DevOps and Continuous Delivery (CI/CD)DevOps for Data Science – Continuous Integration - In the previous post in this series on DevOps for Data Science, I covered the first the concept in a DevOps “Maturity Model” – a list of things you can do, in order, that will set you on the path for implementing DevOps in Data Science. The first thing ......(more) Database Design, Theory and DevelopmentThe top 10 considerations when designing a data platform - Designing a data platform for a new product or service is a fascinating and exciting challenge. It’s also a daunting one. Instead of plugging a new feature into an existing platform that is proven and reliable, the onus is on you. You have to start from scratch and create a platform that becomes just as proven and reliable....(more) Data ScienceStop the fights. Embrace data - Felipe Hoffa says data-based conclusions are possible when stakeholders can easily analyze all relevant data.Continue reading Stop the fights. Embrace data . ...(more) Machine learning at Spotify: You are what you stream - The O’Reilly Data Show Podcast: Christine Hung on using data to drive digital transformation and recommenders that increase user engagement.In this episode of the Data Show, I spoke with Christine Hung, head of data solutions at Spotify. Prior to joining ......(more) Data Mining/Data AnalysisA Neural Network for predicting Restaurant Reservations - In this blog post series, we will use a neural network for predicting restaurant reservations. This first post will describe how we can use a neural network for predicting the number of days between the reservation and the actual visit given a number ......(more) R versus Python: A comparison - In this blogpost, I will share my first experience in using R. I am using Python for quite a while now and I am open minded for other technologies. What is R? R is an open source programming language and software environment for statistical computing and ......(more) Decision Tree: Concepts- Part 1 - A decision tree is one of the main approaches to machine learning. it is a really powerful tool for the aim of prediction ...(more) Conferences and EventsSQL Bits: We’re Teaching Another Pre-Con! - Our Wednesday pre-con, Expert Performance Tuning for SQL Server 2016 & 2017, sold out pretty quickly after it was announced. So good news: SQL Bits added a repeat on Thursday! There’s only 100 seats available, so if you want one, you have to move fast. If ......(more) Live from Cambridge! - Every year, I present at eight or ten events plus user group meetings, either in person or remotely. Due to travel costs (yes, speakers pay their own way to events) and time, I’ve stayed in the US except for one event in Montreal almost ten years ago. ......(more) Webinar: Understanding SQL Injection and Its Consequences - On Thursday, December 14, at 3 PM Eastern, I will be giving a presentation on SQL injection. Registration is required but otherwise the webinar is free: Register for Webinar This is put on by the MSSQLTips folks and we hope you’ll find it informative. ...(more) GroupBy’s One Year Anniversary and What’s Next for 2018 - Last year, I unveiled GroupBy.org, a new free community event where anybody could submit a session on any topic, and the attendees would vote to see what sessions made the cut. I had a lot of questions when we started. Would people submit sessions? ......(more) Computing in the Cloud (Azure, Google , AWS)Running SQL Server in the Cloud: 2017 Edition - You have two basic options: Infrastructure as a Service (IaaS) is just VMs running in someone else’s data center – be it Amazon, Google, or Microsoft. Job duties for a DBA are the same as on-premises virtual machines: you manage HA, DR, patching, backups, ......(more) ARMED - Azure ARM VS Code extension - I have been working with ARM templates for a little while and have found it really annoying to test functions inside the templates, you see if you have an ARM template it is a JSON document made up of lots of key/values like: {"name": "a_name"} but it ......(more) AMD Epyc processors coming to Azure virtual machines - Enlarge / AMD's Ryzen die. Threadripper has two of these in a multi-chip module. Epyc has four of them. (credit: AMD) Microsoft will soon be offering virtual machines in its Azure cloud service based on AMD's Epyc processors. The growth of the cloud ......(more) Azure Virtual Machine + Premium Disk Throughput Calculator - I keep having to refer to the virtual machine size page and the disks pricing page to work out how best to stripe disks for whichever type of virtual maching in Azure to work out what sort of throughput we can get so I thought I would save myself some ......(more) Career GrowthT-SQL Tuesday #97 – Setting learning goals for 2018 - This is my first opportunity hosting a T-SQL Tuesday and am super excited!! T-SQL Tuesday is the brainchild of well respected SQL Guru and author of ‘sp_whois active’ – Adam Machanic (b|t). Adam rightly predicted that we all could benefit from ‘a recurring, ......(more) Azure SQL DatabaseMoving to an Azure SQL Database via Command Line - I have moved many databases to Azure via different methods but I recently came across a new way. Well technically it’s not new, I should say, newly found. The migration was done via the command line which is not exactly ground breaking but it’s nice ......(more) New Azure SQL Database Standard Tier Sizes - Azure SQL Database currently has three service tiers to choose from for your workload. These tiers consist of Basic, Standard, and Premium. Basic supports only one size of 5 DTUs. Premium starts at 125 DTUs and goes up to 4,000 DTUs. The Premium tier ......(more) Azure SQL Database – Using sp_BlitzIndex - I was doing some normal activities on one of my Azure SQL Databases, I went to make a cup of tea and returned to the following message: The statement has been terminated. Msg 40544, Level 17, State 12, Line 15 The database ‘TestDB’ has reached its size ......(more) Azure SQL Data Warehouse and Data LakeDiscover input/output paths of U-SQL jobs using Azure PowerShell - Do you use Azure Data Lake Analytics? Have you ever wanted to programmatically fetch the input and output paths of one of your U-SQL jobs? Now you can! This is especially useful for developers who want to quickly debug an input file, fetch the results ......(more) AI/Machine Learning/Cognitive ServicesHitchhiker’s guide to Used Car Prices Estimation - What is your car’s worth? This tutorial will guide you through the steps for estimating it’s value by using Machine Learning techniques. I will use my Peugeot 106 as an example!...(more) AI School: Microsoft R and SQL Server ML Services - If you'd like to learn how you use R to develop AI applications, the Microsoft AI School now features a learning path focused on Microsoft R and SQL Server ML Services. This learning path includes eight modules, each comprising detailed tutorials and ......(more) Identify Data Patterns with Natural Language Processing and Machine Learning - Discovering, extracting, and analyzing data patterns in textual data from the myriad data sources streaming into modern data-driven organizations is no easy task. Organizations must be equipped with state-of-the art techniques such as Natural Language ......(more) Administration of SQL Serversp_BlitzQueryStore: A Gentle Introduction - Odds and ends During the precon, we asked how many people were on 2016, how many people were aware of query store, how many people were using it, and how many people were using sp_BlitzQueryStore. About 1/3 of the hands went up at first, then for each ......(more) How to Update @@SERVERNAME to Actual Machine Name? - The @@SERVERNAME Global Variable The system global variable @@SERVERNAME can be used to return the name of the machine the SQL Server is hosted on. This variable is derived from the system table sysservers, from the record with the srvid column value ......(more) SQL SERVER – Fix the Error – Accessing this Server via SQL Management Objects (SMO) or Distributed Management Objects is Currently Not Permitted - Sometimes when we do some unexpected things with SQL Server, you would get messages as well which are never seen earlier. One of my client was trying to implement STIG for SQL 2016 and then someone reported below error in SSMS while connecting to SQL. ...(more) Why is the job duration a negative number? - About a month ago I noticed, on one of our clients’ server, a weird duration time for one of the jobs – the job duration was negative. As it turned out, this could happen due to daylight saving time. The job started at 01:15, we then changed the clock ......(more) SQL SERVER – Unable to Launch SSMS Error – Cannot Find One or More Components. Please Reinstall the Application - Recently, one of my virtual machines started behaving strangely. I had SSMS 17.1 installed on the machine and it was working fine. I don’t remember what I installed, but I started facing a SSMS error. As soon as I click on SQL Server Management Studio ......(more) 2012/2014 bug that can cause database or server to go offline - Over the years I’ve discussed log space reservation, which is when SQL Server automatically reserves some free space in the transaction log so that in-flight transactions can always be rolled back without the log having to grow. This is because rolling ......(more) Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - Quite often I see questions about DBCC CHECKDB error messages along the lines of: Msg 8909, Level 16, State 1, Line 2 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 72057594045726720 (type Unknown), page ID (16:1330467) contains ......(more) SQL Server Diagnostic Information Queries for December 2017 - This month, there are more minor updates to the all of the versions of the queries, primarily in the comments and documentation. There is also a new query for the SQL Server 2017 set of queries. I often make additional minor updates to the queries periodically ......(more) Still More SQL Server Features that Time Forgot - As the final entry in this series, Robert Sheldon leads you through a group of forgotten features that have been removed from recent versions of SQL Server. In some cases, the features were widely used and often loved, while others had lost their usefulness over the years or were replaced with something much better. In this article, he remembers Data Transformation Services (DTS), a handful of DBCC commands, a few utilities, Active Directory Helper Service, English Query, Web Assistant, SQL Mail, Native XML Web Services, Notification Services, SQL Distributed Management Objects, Surface Area Configuration Tool, and the Pubs and Northwind databases....(more) .NET Related ArticlesMSBuild: Targeting Your Needs - The Microsoft Build Engine (MSBuild) works seamlessly within Visual Studio, but it can also be used to build software where Visual Studio is not installed. It’s possible to create custom tasks that will run during the build process, saving time and decreasing the chances of error. Hubert Kuffel demonstrates how to create two useful tasks and how to easily is it to apply these to all your .NET projects....(more) Fixing Those Broken Windows: Dealing with Technical Debt - Problems that are not addressed up front are harder and more expensive to fix later. This is true for just about anything, but especially so for software. In this article, Pawel Lukasik explains technical debt and describes three tools that can help your team find issues in code while they are still easy to correct....(more) |