Finding The Last Date of a Month
Select dateadd(month, 1 ,getdate()) gives the exact date of next month , then find the day of that date. Now back to that days i.e exactly last date of the given month.
2001-10-14
549 reads
Select dateadd(month, 1 ,getdate()) gives the exact date of next month , then find the day of that date. Now back to that days i.e exactly last date of the given month.
2001-10-14
549 reads
2001-10-11
8,570 reads
Ever forget to commit a transaction and then find out hours later that there is deadlocked transactions all over your database server? Worse yet has one of your coworkers done this to your database server? Never again, this stored procedure will net send the machine that has an open transaction, and send you (The DBA) […]
2001-10-08
9,157 reads
Really simple... it returns a list of stored procedure names that contain the passed in string. Useful for finding all stored procedures that call another specified stored procedure. Call with the following command: exec usp_functions_findinUSP @str='sp_lastmodified'
2001-10-08
2,213 reads
Ever wanted to get rid of users who are sitting idle for long periods of time? Here's a script that removes spids idle for a variable period of time.
2001-10-03
4,515 reads
The SQL Server 7.0 Data Transformation Services (DTS) Object Transfer feature transfers logins and users between two servers, but it does not transfer the passwords for SQL Server authenticated logins. (DTS in Microsoft SQL Server 2000 does transfer passwords.)
2001-10-01
1,663 reads
A fast way to get a quick look at all the log sizes and space used in a real time fashion.
2001-09-25
2,553 reads
Copies mdf files located in a directory on a client and attaches them to the connected server. This is the winning solution to the contest that was presented in an article posted at http://www.sqlservercentral.com/columnists/awarren/reattachingdatabases-somecodeandacontest!.asp. That article shows how to do the same thing using DMO. Wynn Muse is the author of this stored procedure.
2001-09-23
3,603 reads
Here are two stored procedures for enabling and disabling all keys (primary and foreign) for a specified database. It makes sure the database specified is not the system databases and the users session is at the DB to have its keys enables/disabled.
2001-09-19
852 reads
This script runs within a DTS package. It searches the backup directory stored as a global variable in the script and trims all backup files older than some number of days. the script includes logging to the C: drive so you can trace the effects of the script. You need to create the global variables […]
2001-09-12
1,520 reads
By Steve Jones
Last week I was honored with a trip to Rome for the Redgate President’s...
By Arun Sirpal
As part of my wider work exploring Claude Code and AI-assisted database engineering, I...
By Bert Wagner
Train Wreck The last time I watched a high school band nearly fall apart mid-performance...
Comments posted to this topic are about the item Why Your Index Isn't Being...
Comments posted to this topic are about the item Distance Metric Algorithms
Comments posted to this topic are about the item What Can AI Really Do?
What are the distance metric algorithms that can be used in VECTOR_DISTANCE()?
See possible answers