Posts about Microsoft SQL Server

EF Core Integration Testing with SQL LocalDB

December 6th 2019 EF Core Microsoft SQL Server

In a recent discussion of pros and cons of using EF Core in-memory database provider for testing, the idea of using SQL Server Express LocalDB instead came up. I remembered reviewing an article about this last year. But after reading it once again, it turned out that some work would still be required to create a working sample.

DateTime Value Might Change When Saved to Database

DateTime can be a tricky data type to deal with. Not only is there daylight saving time and different time zones to keep in mind but also the range and precision can vary in different systems. You are probably already aware of some differences between .NET framework's DateTime structure in Transact-SQL's datetime data type. You might not be aware of the difference in precision between these two data types, though.

T-SQL Function to Get Column Details from Database

September 10th 2010 Microsoft SQL Server

Using information schema views and the fn_listextendedproperty function I wrote a table valued function which returns information about all the columns in the given table. I'm posting it here in case someone else finds it useful.

Application Roles and Connection Pooling

October 20th 2006 Microsoft SQL Server ADO.NET

As soon as a pooled connection with enabled application role gets reused an exception gets thrown and its description is not really helpful if you're not aware of the problem: General Network Error. This happens because the security context of the connection doesn't get properly reset when it is closed.

Splitting and Joining Date and Time Values

April 18th 2006 Microsoft SQL Server

SQL Server's common data type datetim` for both date and time values can be a source of quite some confusion. The decision on whether to store them separate or joined can depend on many factors, but sooner or later the need for separating or joining the date and time parts will arise.

Export SQL Server Agent Job History

March 22nd 2006 Microsoft SQL Server

The following query is a good starting point if you want to export the SQL Server Agent job history to a file and you're still using Enterprise Manager from SQL Server 2000.