Finding the first day and last day of a month in MySQL takes LAST_DAY and a little date arithmetic. This post checks leap years and timestamp filters, then repeats the task in SQL Server with EOMONTH and DATETRUNC, tested on SQL Server 2025.
SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.
SQL SERVER – What is SSAS Tabular Data Model and Why to Use it
Tabular mode is new in SQL Server 2012 Analysis Services. Here is what the SSAS Tabular Data Model is, why to use it over multidimensional and how to start one.
SET XACT_ABORT ON: Stopping Timeouts From Leaving Open Transactions
Use SET XACT_ABORT ON to prevent client timeouts from leaving transactions and locks open, with TRY CATCH and a sleeping-session query.
SQL SERVER – Fix – Error 1759 Computed column in table is not allowed to be used in another computed-column definition
Error 1759 appears when a computed column is used in another computed-column definition. Here is a simple repro of the error and how to avoid it.
SQL SERVER – Unable to ALTER Computed Column in SQL Server – How to ALTER Computed Column
Want to ALTER computed column logic in SQL Server? You cannot, it throws Msg 156. Here is how to drop and recreate the computed column instead.
SQL SERVER – Last Full Differential and Log Backup Finish Times
I check backup time separately for full, differential and log backups. One latest timestamp cannot describe the entire recovery chain.
SQL SERVER – Say No to DB Data Roles – SQL Security – Notes from the Field #022
Brian Kelley explains why he avoids the fixed DB data roles db_datareader and db_datawriter, and how they can compromise your server security.
SQL Server slow? Let's fix it together in about four hours.
In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.
You keep every script, and the know-how to fix it yourself next time.
Want your whole team to learn it?
My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.
Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.
Who We Are
Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.
Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.
Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).
Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.
Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

