dbForge Studio logo

Database modelling in a post-SSMS world: dbForge Studio

A few months ago, Microsoft announced that SQL Server Management Studio (SSMS) will no longer include the visual Database Diagrams feature from v18.0 onward. When releasing a new version of a product, Microsoft has the luxury of referencing usage statistics, and obviously this is an underused feature of SSMS. I was a little disappointed at
-> Continue reading Database modelling in a post-SSMS world: dbForge Studio

Some databases may show a NULL collation in the sys.databases DMV

While working on my Swart’s Ten Percent Rule post last week, I needed to test the Windows version of the script on my SQL Server 2016 instance. Just before removing all the databases, I noticed something interesting when querying the sys.databases Dynamic Management View (DMV). Because the process I had come up with involved setting
-> Continue reading Some databases may show a NULL collation in the sys.databases DMV

Flagrantly ignoring the 10% rule

My friend Michael J. Swart has a rule of thumb he calls Swart’s Ten Percent Rule. If you’re using over 10% of what SQL Server restricts you to, you’re doing it wrong. After a recent discussion on Twitter, I wondered what it would look like if I had 32,767 databases on one instance of SQL
-> Continue reading Flagrantly ignoring the 10% rule

Dates and Times in SQL Server: DATEDIFF() and DATEDIFF_BIG()

Last time we looked at adding or subtracting date parts using the DATEADD() T-SQL system function. This week we see how to calculate the difference between two date-time values using DATEDIFF() and DATEDIFF_BIG(). The syntax for both functions is identical:

The only functional difference between them is that the DATEDIFF_BIG() returns values as a
-> Continue reading Dates and Times in SQL Server: DATEDIFF() and DATEDIFF_BIG()

Dates and Times in SQL Server: DATEADD()

We are now in the home stretch of the long-running series about dates and times in SQL Server and Azure SQL Database. This week we look at one of my favourite T-SQL functions when it comes to dates and times: DATEADD(). Syntax As with similar functions, DATEADD can do arithmetic on dates as well as
-> Continue reading Dates and Times in SQL Server: DATEADD()

The Golden Gate Bridge partially hidden by clouds

String or binary data would be truncated: get the full picture in SQL Server 2017

SQL Server 2019 Preview (CTP 2.0) introduced a long-awaited improvement to an error message that’s been around in SQL Server for many years, but was unhelpful:

Thanks for nothing, error message. Which table? Which column? What data? This is how the error message looks now:

Notice how the table, column and value are
-> Continue reading String or binary data would be truncated: get the full picture in SQL Server 2017

stacks of paper

Bulk insert issue with UTF-8 fixed-width file format

Fellow Canadian Doran Douglas brought this issue to my attention recently, and I wanted to share it with you as well. Let’s say you have a file in UTF-8 format. What this means is that some of the characters will be single-byte, and some may be more than that. Where this becomes problematic is that
-> Continue reading Bulk insert issue with UTF-8 fixed-width file format

Post image

Dates and Times in SQL Server: AT TIME ZONE

Continuing the series on dates and times in SQL Server and Azure SQL Database, this week we look at the hint AT TIME ZONE. In Azure SQL Database, the regional settings of the database are set to UTC by default. It is also advisable to store dates and times in UTC format on our on-premises
-> Continue reading Dates and Times in SQL Server: AT TIME ZONE

A software architect replaces a relational database with a relational database

Content warning: This is the second (and final) rebuttal essay about why someone is wrong on the Internet. It is no doubt biased. It might go into technical detail. Parts of it may be wrong. It may contain flippant remarks and editorialising. There are links to external references that may distract the reader. Last time,
-> Continue reading A software architect replaces a relational database with a relational database

Relational databases aren’t the problem

Content warning: This is the first of two rebuttal essays, about why someone is wrong on the Internet. It is no doubt biased. It might go into technical detail. Parts of it may be wrong. It may contain flippant remarks and editorialising. There are links to external references that may distract the reader. I am
-> Continue reading Relational databases aren’t the problem