Simpler First/Last Day of Months
Script uses simpler Dateadd function ensuring additions/substractions are based from 1st of month.
2005-01-03 (first published: 2004-12-02)
156 reads
Script uses simpler Dateadd function ensuring additions/substractions are based from 1st of month.
2005-01-03 (first published: 2004-12-02)
156 reads
I wanted to know which tables contains the most populated records in db. So I wrote this script.
2005-01-02 (first published: 2004-11-18)
120 reads
It is often necessary to generate a table with sequential numbers, up to a specified upper limit N. For small N, a simple INSERT in a WHILE loop will do. But, for large N, that solution becomes too slow. This script presents a different approach. It generates sequential numbers from the binary representation of N, […]
2004-12-30 (first published: 2003-11-24)
660 reads
This function will calculate the number of weekdays between two dates passed. This allows for accurate tracking of "business days" for metrics in many different views.
2004-12-28 (first published: 2004-12-16)
285 reads
To examine all the properties of a database is time consuming. The following script gives you a quick overview of the most important properties of all the databases on your SQL Server.
2004-12-27 (first published: 2004-12-10)
679 reads
Inspired by a post here at SQLServerCentral, I wrote this function to calculate the number of days between two dates that are weekdays. In order to achieve this I used a common SQL table that contains a sequence of number for 1 to X. This was used as an input to the datediff function, and […]
2004-12-24 (first published: 2004-12-07)
341 reads
The Script outputs all the indexes in the Database.I have used the sp_helpIndex system stored procedure here to retrieve all the indexes available for the Table . This is extremely useful in identifying all the indexes in a database in a single query
2004-12-22 (first published: 2004-11-18)
364 reads
SQL SCRIPT TO AUDIT THE PERMISSIONS FOR OBJECTS IN A DATABASE.
2004-12-21 (first published: 2004-12-06)
452 reads
Here is another variation of processing multiple records with a single procedure call but allowing for set processing.The helper functions make use of the sequencetable pattern. These helper functions can be used to parse strings into records, so one gets a list, or simply return the nth field.There are two functions that will parse into […]
2004-12-17 (first published: 2004-11-05)
809 reads
This script creates a stored proc that was intended to run from a trigger on the master..sysdatabases for each database creation. Alas. It will create three jobs for each database you apply it to. First, it'll create a job to run a full backup each Sun, at 5am (see below). Those backups will be retained […]
2004-12-16 (first published: 2004-11-11)
396 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
Hello, I would like to get some feedback regarding the best storage optimization strategy...
Hi, Do you know if there is a way to get more detailed logging...
Comments posted to this topic are about the item Four Rules for Adding AI...
In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?
See possible answers