Database recovery IMPORTANT rule
Recently, I had a case with a customer in a really difficult situation. They accidentally deleted important data and didn’ know how to recover, a sad story. Here is how it went (I’m paraphrasing the dialog):
Recently, I had a case with a customer in a really difficult situation. They accidentally deleted important data and didn’ know how to recover, a sad story. Here is how it went (I’m paraphrasing the dialog):
Recently I had a customer case with a “suspect” database. In that state database is not accessible (not online), and users could not work. First thing to look is the SQL error log. There we could see a time when …
Introduction For one customer I just transferred a troubled 2TB table (2 billion rows) into a monthly-partitioned table in just 2.5 hours and no downtime! To make things more difficult, within that time additional deduplication had to be performed, as …
You always wanted to know how to pass arrays to SQL Server? Watch this Ultimate Guide to Table-Valued Parameters! Hello and welcome! My name is Vedran Kesegić and this video is an absolute “must” for database developers. Fast performing database …
How to pass arrays to SQL? TVP – The Ultimate Guide Read more »
Want to learn SQL and need some guidance? SQL is the language you communicate with most of databases today, including SQL Server.
There are ways to greatly improve performance and power of your SQL Server databases in Azure. Even better, monthly costs are reduced at the same time! How is that even possible? I routinely do that for my customers and will …
OUTER APPLY(SELECT TOP 1) pattern is widespread, even baked into some frameworks like Entity Framework. But is it a good practice? This demo will show. Based on a real-world optimization problem and solved with great success. The demo shows it …
There is no official information (that I am aware of) on how to calculate maximum capacity one can get from physical disks of different sizes in Storage Spaces. Based on partial documentation and logic, I got the formula that all …
If you still leave your databases at default settings, namely default isolation (READ COMMITTED – does it suck?), you are risking three things: increased blockage and deadlocks NOLOCK hints or READ UNCOMMITTED transaction isolation in the code, exposing users to …
Did you know that SUM() aggregate can be used together with OVER() clause? A short intro to windowing functions:
1 2 |
SELECT SUM(Amount) OVER() -- What!? FROM dbo.PersonCityAmount |
The result is graphically visualized by using only SQL Server Management Studio and unicode characters: