SQL Server 2017 announcement and quick hello from vacation

We are always thinking about you, sometimes even on vacation! Here is a quick hello video from the island of Brac:

Read more ›

PowerBI for SQL DBA – Investigating Perfmon Counters

Introduction

PowerBI Desktop is a free tool from Microsoft you can download here. Paid versions also exist for Cloud and on premise (your servers), to easily share reports and view them on any device, not just PC. It is used for graphical analysis of any data, by clicking at the beautiful graphs and digging useful information out of it. This demonstration is analyzing Perfmon Counters data needed for SQL Server or Windows performance investigation, but similar process can be used on any data. It is intended for learning and get feeling what PowerBI is and how useful can it be.

This video is intended for PowerBI beginners, Windows administrators, SQL Server DBAs, Techical managers, and anyone who wants to make informed decisions based on investigating data using PowerBI. Enjoy!

Read more ›

Tagged with: , , ,

Crypto-virus resistent backup

Introduction

Crypto-viruses encrypt your data. If it asks money (a ransom) to decrypt, we call them “ransomware”. They cannot encypt your SQL Server databases because sql data and log files are in use by sqlservr.exe process, but they can encrypt your DB backups and other files. You DO have a backup? Normal backup will NOT protect you from cryptovirus. Because we care for your data and security, we will show you how to protect yourself using free tools. It might take more then a few steps to configure, but it needs to be done only once and it pays off in every way. Read on.

Read more ›

Tagged with: , , , , ,

Query with optional filters (catch-all query)

Introduction

In almost every database we have a process that filters the same data with different filters. Typically, query is within a stored procedure that has many optional filtering parameters. That is, only filters that have a value should be applied, and the NULL filters should be ignored in the WHERE clause. The problem is – a query optimizer builds only ONE plan that will handle every filter combination you throw at it. For example, we have index on NAME and another index on ID column. If compiled plan goes by NAME it is not efficient plan to reuse when we execute the procedure with filter on ID in the next procedure call, isn’t it? We get the plan that is occasionally slow, and looks like a random performance problem, giving headache to DBAs. Or to be more precise, it depends on parameter values that proc was executed with while it was (re)compiled. And we do not want our systems to depend on luck or random stuff, like a russion rulet with query plans. We want the best possible performance and consistent response time, without random slowness that drains DBA’s time, company’s money and user’s nervs. Can we achieve that? Yes we can! Read on…

Read more ›

Tagged with: , , ,

Max Memory in SQL Server 2016 Standard Edition

What is the memory limit for Standard edition of SQL 2016?

The answer you will most often get is 128 GB. But that answer is not correct, or very partially correct at best case. When you plan a new SQL machine, virtual or phisical, it is really important to know true maximum SQL Standard can use, to properly size the machine if you want to go to the limits.

Read more ›

Table and Index Compression

Compression feature was reserved for Enterprise Edition of SQL Server. With SQL 2016 SP1 we get it in all editions, e.g. Standard Edition. But, it is not always easy to say will we benefit from compressing certain table/index/partition or not. Here we will discuss that.

Read more ›

Speaking at SQL Saturday Ljubljana

sqlsatslo

I am honored to be selected to enjoy SQL Saturday in Ljubljana, Slovenia, as a speaker.

http://www.sqlsaturday.com/567/Sessions/Details.aspx?sid=54373

It is a free event, so if you want to mingle and learn about SQL, this is the great place!

Registration is mandatory, and possible only if all the seats are not taken yet.

Speaking at Advanced Technology Days 2016

atd12
Congratulations! Your session Show me the cache! has been accepted for Advanced Technology Days 12!
http://atd.mscommunity.hr/predavanja/#session_61

It will be interesting exploration of SQL Server’s caches, especially the most important ones: plan cache and buffer pool cache, Memory Optimized tables and Columnstore Indexes.

Come, mingle, learn. It will be fun and you will increase your knowledge and value.

Database Recovery from RAM

Introduction

Recently I had a client who basically lost his SQL Server databases. I decided to share this experience with you, so you can use it if you ever find yourself in so tough situation. The client found out that backup job was failing and it was failing undiscovered for quite some time. The moment they found that out was the moment when their RAID array failed and corrupted the database files. Application started to throw IO errors at users. Storage failed, files unreadable and no backups – time for me to do my magic! Read more ›

Formatting TSQL code

How do I format my TSQL code?

Everybody has it’s own preferences on formatting SQL or TSQL code. I follow few very simple rules to achieve better readability, less bugs and  – you wont’ believe – faster code execution! Code that is not using two-part names will compile a separate execution plan for each user. Therefore taking more memory than it would when using two-part names. More compiles means more wasted CPU, more latches and compile locks. Latches and locks are serialization mechanisms. They make things execute one-by-one (not in parallel), making your 100 core monster perform like a poor single core machine.

Read more ›

Top
Visit Us On TwitterVisit Us On FacebookVisit Us On LinkedinVisit Us On YoutubeVisit Us On Google PlusCheck Our Feed