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
542 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
542 reads
2001-10-11
8,548 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,105 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,195 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,494 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,650 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,533 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,551 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
833 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,511 reads
By Steve Jones
I was experimenting with a local model (article) and as a part of this,...
By Steve Jones
Redgate Monitor has grown tremendously from its early days and I find many customers...
The post Data Governance: The Invisible AI Accelerator appeared first on Joyful Craftsmen.
SQL Server 2022 16.0.4165.4 Windows Server 2022 Datacenter 21H2 20348.2849 Our Extended Stored Procedure...
We have a publication with three subscribers; it's basically a part list with around...
Hi Experts, I have database about 300GB in size with ADR enabled but after...
What types of database operations does the Data API Builder support?
See possible answers