Speak guys !!
New Year's Eve coming up, everyone getting ready for New Year's Eve and so I would like to share with you the “TOP 10 Technical Articles of 2019 that you liked the most”, that is, the articles I published in 2019 and which you most viewed . I hope you enjoy this short list and that some article may be helpful to you if you have not seen it before.
Not much wind and let's go to the list.
In this article, I demonstrated how brute force attacks occur on SQL Server and how to try to defend against such attacks.
Brute force attack is the simplest and most time-consuming technique to break into systems and databases. It consists of using password databases to test each of these passwords or systematically checking all possible keys and passwords until one can successfully log in to the destination.
This type of attack can be used when it is not possible to take advantage of other weaknesses in an encryption system (if any) that would make the task easier, as the time required to test all possible passwords can be more than a few seconds (3 characters) for thousands of years, depending on the number of characters in the password and the complexity of the characters used.
# 9 - SQL Server - How to Identify and Collect Time-consuming Query Information Using Extended Events (XE)
In this article I shared with you how to identify and collect time consuming query information using Extended Events (XE), in a very similar article to SQL Server - How to identify and collect time consuming query information using Trace (SQL Server Profiler), which uses the technology of Profiler (Trace).
What motivated me to write this article was that Profiler is a feature that has been marked as deprecated for a long time, it is a much older technology and the code is not friendly or readable. So, thinking about bringing you a more modern and intuitive solution, I decided to share this solution using XE.
In this article I would like to comment on a query performance issue that we encountered a lot here in our day to day Fabrício Lima - Comics Solutions, one of the best and most recognized Performance Tuning companies in Brazil. We are talking about something that is often terribly simple to solve and inexplicably and extremely common, implicit conversion.
Implicit conversion occurs when SQL Server needs to convert the value of one or more columns or variables to another data type for comparison, concatenation, or other operation with other columns or variables because SQL Server cannot compare a column of type varchar with another of type int, for example, if it did not convert one of the columns so that both have the same data type.
In this article, I shared with you when to use ORDER BY and when we shouldn't use it at all, because it has no effect on practice and just leaves our query taking longer and consuming more resources.
The main purpose of this article was to break the myth that data is physically ordered in the table when you do INSERT… FROM SELECT and ORDER BY, causing many programmers to insist on using ORDER BY in INSERT operations, a scenario I encounter. quite a lot in consulting clients and is far more common than I would like.
In this article, I was able to demonstrate in practice the use of 2 query hints widely used by developers to avoid data reading locks, which are NOLOCK and READPAST, and effectively demonstrate the effect of these hints on a query.
The idea of writing this article came through a question sent in the group “SQL Server - DBA”, from Telegram, and also an old desire to write about it whenever I see environments where almost every query has NOLOCK.
After reading this post, you will be able to understand exactly how these 2 hints work and will use them wisely and only when convenient. No more putting NOLOCK / READPAST on all your queries huh!
If your environment has a lot of competition and locks, blocks and deadlocks are frequent and a problem for you, I suggest thinking of a more complete approach than using these hints, which would be to use the Read Committed Snapshot (RCSI) isolation mode, which allows you to use Read Commited mode without locking readings when open transactions occur. Since not everything is flowers, there are some side effects when using this mode, such as possible performance degradation. If you want to know more about it, I suggest reading the article Read Committed Snapshot Isolation: Writers Block Writers (RCSI), by the great master Brent Ozar.
# 5 - SQL Server - How to Avoid and Protect Yourself from Ransomware Attacks Like WannaCry on Your Database Server
In this 350th article from the blog, I shared with you my experience during several tests I did about Ransomwares on SQL Server database servers, such as WannaCry, which I downloaded and "infected" my VM just to perform these tests, understand how it works and how we can protect ourselves against this kind of attack, which, strangely enough, is still common in the daily life of DBA's that work in consulting firms.
According to the Internet Security Booklet, Ransomware is a type of malicious code that makes data stored on a device inaccessible, usually using encryption, and requires ransom to re-establish user access, where payment of Rescue is usually done via bitcoins or another cryptocurrency.
The most well-known Ransomware to date is WannaCry, which was considered the largest attack of its kind to date, starting on 12 / 05 / 2017, attacking around 150 countries and infecting more than 230 thousand systems, although there are several others running over the network.
In this article, I was pleased to be able to share with you a number of useful DBA day-to-day scripts that you always have to look for on the Internet when you need to make a particular query. My idea in this article was to make your life easier and to have a multi-scripted article, for various purposes, for you to favor in your browser and always have the information you want in one place 🙂
# 3 - SQL Server - Security Checklist - An SP with over 70 security items to validate your database.
In this article, I shared with you a project that I've been developing since November 2018 and today has over 6.000 lines of code, which is a very complete (probably the most comprehensive and comprehensive) Security Checklist you'll find on the Internet, including with over 70 Security items to validate your database, including settings and parameters, permissions, programming objects, and more!
After so much watching companies, developers (and sometimes DBAs themselves) neglect the security part, where we see environments where the application uses the "sa" user, we find thousands of attempts to connect with the wrong password and nobody does anything , NO BACKUP environments and so many other nonsense, we decided to create a very practical and easy way to quickly get an overview of how instance security is doing, in a friendly format and with technical information at the same time, allowing to easily export to Excel and demonstrate to the customer the various problems encountered, the impact this can have on the environment and how to solve it.
Know in this article the ultimate solution to the vast majority of your SQL Server security issues.
In this article, I was able to address a very hot topic in the area of technology in general, which is the General Personal Data Protection Act (LGPDP or LGPD), a GDPR “cousin” that is in force in Europe, and should become a reality in Brazil from August 2020, bringing several changes in the way IT professionals act in their daily lives and the way products (software, databases, etc.) are developed.
LGPD stands for General Data Protection Law, which aims to increase the privacy of personal data and to prevent cases such as the massive leaks of information and scandals that involve the misuse of personal information that we have been following in recent years. The creation of this law places Brazil in the list of more than 100 countries that today can be considered adequate to protect privacy and data use in the global scenario.
Unlike everything I've ever read about material on this topic, the purpose of writing this article was to focus this analysis specifically on SQL Server databases, demonstrating how we can improve the security of our database and comply with it. new law.
In this article, I would like to share with you something I see a lot in everyday life when I am performing Tuning consulting, which are time consuming, I / O and CPU consuming queries that use WHERE or JOIN functions in tables with many records and how we can use a very simple calculated (or computed) column indexing technique to solve this problem.
As I comment in the article Understanding Index Functioning in SQL Server, when using functions in WHERE or JOINS clauses, we are hurting the concept of query SARGability, meaning that this query will no longer use Seek operations on indexes, since SQL Server needs to read the entire table. , apply the desired function and then compare the values and return the results.
What I want in this article is to show you this scenario going on, how to identify it and some possible solutions to improve query performance. So, come on!
I hope you enjoyed this short list, a big hug and until the next post!