@@CONNECTIONS and @@MAX_CONNECTIONS explained: login attempts since SQL Server started versus the most simultaneous user connections allowed.
SQL SERVER – UDF – Validate Positive Integer Function – Validate Natural Integer Function
A Jr. DBA at my company changed my integer check so it accepts only a positive integer. I share his udf_IsNatural function with a few test values.
SQL SERVER – Difference Between UPDATE and UPDATE() in Triggers
UPDATE changes rows in a table or view, while UPDATE() in triggers tells you if a column was part of an INSERT or UPDATE. Here is the difference.
Grouping Dates Into Buckets With DATE_BUCKET
DATE_BUCKET groups timestamps into hourly, weekly, and custom intervals, with an origin that determines where every boundary lands.
SQL SERVER – UDF – User Defined Function – Get Number of Days in Month
A simple user defined function that returns the number of days in month for any date, with the leap year rule for February built in.
SQL SERVER – 2005 – Create Script to Copy Database Schema and All The Objects – Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects
A step by step tutorial to create a T-SQL script that can copy database schema and all objects, like stored procedures, functions, triggers, tables and views.







