dotnet falcon

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

SQL Server

Awesome Northwind

Awesome Northwind

Akos Nagy Oct 26, 2021
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

Akos Nagy Oct 26, 2021
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 custom SQL
Restoring from BACPAC times out in SSMS

Restoring from BACPAC times out in SSMS

Akos Nagy Oct 26, 2021
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 it the
Stealing time in SQL Server

Stealing time in SQL Server

Akos Nagy Oct 26, 2021
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 datetime='2017-03-20 12:46: