CommandTimeout – How to handle it properly – code example

Properly closing a connection to Sql Server in DotNet is more challenging than one might think. Classic code looks something like this MSDN example:

Or a mixture of “using” and “try-catch” constructs like in this nice example. But, none

Posted in Sql Client Code Tagged with: , ,

CommandTimeout – How to handle it properly?

ADO.Net Data Provider for SQL Server (System.Data.SqlClient namespace in System.Data.dll assembly) has two common classes we often use: SqlConnection and SqlCommand. SqlCommand class has CommandTimeout property (do not mix it with the ConnectionTimeout which stops long login process). But, do

Posted in Sql Client Code Tagged with: ,

Speaking at SQL Saturday Vienna conference

I am pleased that I will speak at SQL Saturday conference in Vienna, 28th of February 2015 about how to solve the “recovery impossible” situation. It is quite advanced topic, but everyone who listens will be able to save the

Posted in Uncategorized

CHECKPOINT vs LAZY WRITER

Checkpoint and Lazy Writer are somewhat similar: they both write pages from buffer pool memory to the disk. So, what is the difference?

Posted in Uncategorized

Transaction Log Backups – How long to keep them?

Introduction In this post I will give you a tip on how long it would be good to keep transaction logs. To understand why, basics of point-in-time recovery from backups are explained. If you are in a hurry: keep transaction

Posted in Transaction log

Sort records without ORDER BY?

How often you see some smartie “optimizes” the query by removing ORDER BY, justifying that query always goes by that index, and index is in desired order for the result? Or they say: “I executed this query thousands of times

Posted in Uncategorized

Do you measure query IO with SET STATISTICS IO ON ?

Introduction In our tuning work and often in presentations we see people use SET STATISTICS IO ON as a handy way to measure IO, especially logical reads. But, not many people know that it skips measuring IO from certain types

Posted in Uncategorized

READ COMMITTED sucks!

Are you still using READ COMMITTED transaction isolation level? Default transaction isolation level on all SQL Server versions (2000-2014) has serious inconsistency problems, by design. Not many people are familiar how and why is it happening. I am writing this

Posted in Uncategorized

Disk failure probability on a large number of disks

Introduction We either have or will experience a drive failure. Doesn’t matter if we talk about HDD, SSD, or PCIe disks, any storage disk drive will fail eventually. But how probable it really is, especially if we have many drives?

Posted in Storage

Transaction log myths

There are some myths widely spread about transaction log that are to be debunked here: Full/diff backup will clear the transaction log FALSE. Only transaction log backup in full and bulk_logged recovery model, or checkpoint in simple recovery model will

Posted in Transaction log

Database Consultant Vedran Kesegić M.Sc.

Database Consultant Vedran Kesegić M.Sc.

Will make your SQL:

- faster
- more reliable
- train your experts

A Random Thought

If you want to master something, teach it. I want to remind you that one of the best ways to learn something is to teach it. (Yogi Bhajan)

Visit Us On TwitterVisit Us On FacebookVisit Us On LinkedinVisit Us On YoutubeVisit Us On Google Plus