This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A paper calendar with the last day of the month circled in red.

SQL SERVER – Find Last Day of Any Month – Current Previous Next

August 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Utility

Find the last day of any month with DATEADD and DATEDIFF. One script returns the last day of the previous, current and next month in SQL Server.

Read More
Enable autogrowth dialog.

SQL SERVER – 2005 – SSMS – Enable Autogrowth Database Property

August 8, 2007
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Server Management Studio, SQL Utility

How to enable Autogrowth for a database in SSMS: open the database Properties, go to Files and click the small button in the Autogrowth column.

Read More
SQL SERVER - UDF - Get the Day of the Week Function

SQL SERVER – UDF – Get the Day of the Week Function

July 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Utility

Get the day of the week as a name in SQL Server: a UDF using DATEPART with CASE, plus the simpler DATENAME(dw, GETDATE()) a reader suggested.

Read More
SQL SERVER - Running Batch File Using T-SQL - xp_cmdshell bat file

SQL SERVER – Running Batch File Using T-SQL – xp_cmdshell bat file

June 27, 2007
Pinal Dave
SQL Tips and Tricks
Computer Network, SQL Scripts, SQL Utility

What is xp_cmdshell used for, and how do you run a batch file using T-SQL? Examples run a system command, a plain BAT file and one with a parameter.

Read More
SQL SERVER - Comparison Index Fragmentation, Index De-Fragmentation, Index Rebuild - SQL SERVER 2000 and SQL SERVER 2005

SQL SERVER – Comparison Index Fragmentation, Index De-Fragmentation, Index Rebuild – SQL SERVER 2000 and SQL SERVER 2005

June 24, 2007
Pinal Dave
SQL Performance
DBA, SQL Index, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Utility

What is Index Fragmentation and how do page splits cause it? How to measure it with DBCC SHOWCONTIG in SQL Server 2000 and sys.dm_db_index_physical_stats in 2005.

Read More
SQL SERVER - Script/Function to Find Last Day of Month

SQL SERVER – Script/Function to Find Last Day of Month

May 20, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Utility

A one line DATEADD query to find the last day of month for any date. It handles leap years: February 2008 gives the 29th and 2007 the 28th.

Read More
SQL SERVER - 2005 - SSMS Change T-SQL Batch Separator

SQL SERVER – 2005 – SSMS Change T-SQL Batch Separator

May 18, 2007
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Management Studio, SQL Utility

A big script used EndBatch instead of GO. Rather than a risky mass replace, I changed the Batch Separator in SSMS under Tools, Options, and it ran as is.

Read More
Previous 1 … 11 12 13 14 15 16 17 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com