Get Rid of All Those Pesky 1 MB File Growth DB Files
Use sp_MSForeEachDB to set all 1 MB file growth databases to 10%.
2013-05-31 (first published: 2012-11-10)
1,446 reads
Use sp_MSForeEachDB to set all 1 MB file growth databases to 10%.
2013-05-31 (first published: 2012-11-10)
1,446 reads
Need to find every stored procedure in any database that references the table FooBar? Here is a quick and easy search to do that.
2013-05-30 (first published: 2013-05-22)
1,708 reads
This is a stored procedure which can be used to find which processes are been blocked by each other. This Procedure will also provide SQL information associated with the blocked SPID.
2013-05-23 (first published: 2009-06-15)
2,825 reads
This script is helpful to identify the orphaned users in a database, useful when we restore a database from a different location.
2013-05-22 (first published: 2008-07-20)
2,673 reads
There are other options available like Sql search from Red Gate. Here's a simple script to search for objects(s) containing a particular keyword.
2013-05-21 (first published: 2012-08-23)
2,840 reads
Get a distinct list of file names from a table into an ArrayList and compare against a remote FTP server. Retrieve only the files that have not already been processed into the database.
2013-05-17 (first published: 2008-09-11)
2,877 reads
The non-SSIS/GUI method I use to deploy standardized Database Maintenance Plans.
2013-05-16 (first published: 2009-05-07)
4,261 reads
If you ever need a quick way to generate random passwords, this is a pretty useful way to do so.
2013-05-15 (first published: 2008-09-24)
3,349 reads
The use of union would seem to force a distinct in each of the select statements being unioned. The use multiple unions, with mixed union and union all clauses, seems to cause haphazard results.
2013-05-14 (first published: 2013-04-30)
926 reads
I had a requirement to produce a formatted currency string from within SQL server. I was able to build this scalar-valued function to meet the requirement.
2013-05-13 (first published: 2013-05-03)
1,062 reads
By Steve Jones
ecstatic shock – n. a surge of energy upon catching a glimpse from someone...
By Chris Yates
The New Arena of Leadership The role of the Chief Data Officer is no...
Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...
Comments posted to this topic are about the item Lessons from the Postmark-MCP Backdoor
Just saw the "Azure Extension for SQL Server" Does anyone has experience with it?...
I've noticed several instances of what looks like a recursive insert with the format:...
I have a table with this data:
TravelLogID CityID StartDate EndDate 1 1 2025-01-01 2025-01-06 2 2 2025-01-01 2025-01-06 3 3 2025-01-01 2025-01-06 4 4 2025-01-01 2025-01-06 5 5 2025-01-01 2025-01-06I run this code:
SELECT IDENT_CURRENT('TravelLog')I get the value 5 back. Now I do this:
SET IDENTITY_INSERT dbo.TravelLog ON INSERT dbo.TravelLog ( TravelLogID, CityID, StartDate, EndDate ) VALUES (25, 5, '2025-09-12', '2025-09-17') SET IDENTITY_INSERT dbo.TravelLog OFFI now run this code.
DBCC CHECKIDENT(TravelLog) GO INSERT dbo.TravelLog ( CityID, StartDate, EndDate ) VALUES (4, '2025-10-14', '2025-10-17') GOWhat is the value for TravelLogID for the row I inserted for CityID 4 and dates starting on 14 Oct 2025? See possible answers