watch

Dates and Times in SQL Server: T-SQL functions to get the current date and time

We have come on quite a journey so far. SQL Server and Azure SQL Database provide date and time data types to help you design the best possible database. You can read more about that here: Dates and Times in SQL Server: DATETIME Dates and Times in SQL Server: SMALLDATETIME Dates and Times in SQL
-> Continue reading Dates and Times in SQL Server: T-SQL functions to get the current date and time

Calendar

Dates and Times in SQL Server: DATE

This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the DATETIME and SMALLDATETIME types that we looked at previously. The first one we look at this week is DATE. Whereas DATETIME uses eight
-> Continue reading Dates and Times in SQL Server: DATE

Dates and Times in SQL Server: SMALLDATETIME

Last week I spoke about a world wary data type for storing dates and times in a single column, with a granularity of three milliseconds, DATETIME. But let’s say you don’t need that kind of accuracy and are happy with a granularity to the nearest minute. Maybe you’re storing time cards and don’t think it’s
-> Continue reading Dates and Times in SQL Server: SMALLDATETIME

Dates and Times in SQL Server: DATETIME

Last year I ran a series of posts about Database Fundamentals. Over the next few weeks, I will cover the basics of various date and time data types in SQL Server, when to use them, and which functions to use for date and time calculations. This week will start with probably the best-known data type,
-> Continue reading Dates and Times in SQL Server: DATETIME

construction

The cloud is not just someone else’s computer

A year ago, I wrote in a post that cloud computing is just someone else’s data center. I was wrong. Whether we like it or not, the cloud is more than just a bunch of 1s and 0s hosted on someone’s hardware. The problem with my statement was the word “just”. I’ve presented several times on
-> Continue reading The cloud is not just someone else’s computer

Introducing Azure Data Studio

(Last edited on 9 January 2020) Note: This was originally written for the book SQL Server 2017 Administration Inside Out, but did not meet the publishing deadline. A revised version is now included in the book SQL Server 2019 Administration Inside Out, but because I wrote both sections, there’s no plagiarism happening here. A new
-> Continue reading Introducing Azure Data Studio

MySQL has this feature that SQL Server needs

In the grand scheme of things, MySQL and SQL Server operate in different realms. It’s difficult to compare them because MySQL is predominantly used for websites as part of the free LAMP stack (Linux, Apache, MySQL and PHP), while SQL Server’s range is much broader than that. There’s one neat feature that MySQL has, which
-> Continue reading MySQL has this feature that SQL Server needs

SQL Server 2017 Administration Inside Out

For the last five months or so, I have been helping some really smart people put words on paper, both the physical and electronic kind, which is hopefully going to culminate in an actual technical book that I can point to and say “Yes, that’s the name I invented for myself when we moved to
-> Continue reading SQL Server 2017 Administration Inside Out

Post image

Locks, Blocks, and Isolation Levels

Last week we looked at ACID compliance. This week we dive a little deeper into the Isolation portion, and what it all means. Isolation levels work to manage how my transactions may be isolated from your transactions, to allow concurrency. They work by locking sections of the database until a transaction is committed or rolled
-> Continue reading Locks, Blocks, and Isolation Levels

Post image

Why You Need A Test Environment

In 2017, there’s no excuse not to have at least a testing environment, and preferably a development environment as well, in order to create and deploy code changes (software, database, you name it) outside of a production environment. If you’re making changes in a production environment without testing them first, you’re doing it wrong. Some
-> Continue reading Why You Need A Test Environment