dotnet falcon

Blogging about .NET and software development - from my bird's eye view

SQL Server

Awesome Northwind

Awesome Northwind

Feb 5, 2019
Whenever I give a talk at a meetup or teach at a course or just want to try a demo about a data driven technology, my biggest problem (and the biggest nag) is always to get some real(istic) sample data. Thankfully there are sample databases available on the internet
StackOverflow adventures: Don't create non-clustered index for foreign keys with Entity Framework Code First

StackOverflow adventures: Don't create non-clustered index for foreign keys with Entity Framework Code First

Sep 20, 2017
I found an interesting question on stackoverflow: https://stackoverflow.com/questions/46212828/ef6-preventing-not-to-create-index-on-foreign-key OP wanted to find a way to disable index creation for foreign keys. I don't believe there is an easy way to do this; my mind turned right to custom SQL generators and scaffolders. Using
Restoring from BACPAC times out in SSMS

Restoring from BACPAC times out in SSMS

Sep 11, 2017
When moving databases from the cloud to on-premise (usually for some advanced 'hacking', performance-tuning or just experimenting), I often use the BACPAC format. It is basically a zip file that encapsulates the schema and the contents of a database. I can export it with SSMS, and then re-import
Stealing time in SQL Server

Stealing time in SQL Server

Mar 20, 2017
Here's a question for you: what is the output of this simple script in T-SQL if I run it on SQL Server 2016 Developer Edition (or any other edition and any other version, for that matter): declare @t1 datetime='2017-03-20 12:46:37.000'; declare @t2