Reset count for all alerts
To see the frequency of alerts in use, you can reset their fire count.
Restart count from zero for all alerts using the propre stored procedures.
2009-12-22 (first published: 2003-01-14)
477 reads
To see the frequency of alerts in use, you can reset their fire count.
Restart count from zero for all alerts using the propre stored procedures.
2009-12-22 (first published: 2003-01-14)
477 reads
I wrote this SP to be run from a job every night. Change the myDB reference to be a database on your system for DBA use.I just set up a job to run:Exec sp_CatchFileChangesThen I run in another step:Select * from mydb.dbo.tbl_sysaltfiles_3and output to a log file.Alternatively you could insert into another table with a […]
2003-01-13
291 reads
WARNING: This is resource intensive. Don't use except as a last resort.I wrote this to be able to find if a TSQL batch is running already on a SQL Server. I use this rarely when I have to know to prevent running something twice.Usage:DECLARE @RC intDECLARE @SQLBatch nvarchar(255)-- Set parameter valuesEXEC @RC = [master].[dbo].[sp_RunningCheck] @SQLBatch […]
2003-01-09
398 reads
I wrote this function to work with my sp_EarthDistance stored procedure.It converts the regular degrees/minutes/seconds representation of angles to a decimal number.Remember to use '' instead of ' within a string to be treated a character and not an end quote.Sydney location 151¦12'0 "E 33¦52'0 "S and in […]
2003-01-09
822 reads
I wrote this sp to be able to calculate the distance between two locations on the earth if the latitude and longitude is known for each. Could be useful for GPS work or maps.Usage:If I know the following city locations:Sydney 151.2 E 33.87 SCanberra 149.15 E […]
2003-01-09
783 reads
This procedure can search all columns in one or all tables for a specified string. Prints out the TableName.ColumnName that the string is found in...-- Example Calls-- EXECUTE spFindTextInColumns MyTable, 'tcart' --search a specific table-- -- EXECUTE spFindTextInColumns default, 'tcart' --search all tables BUG FIX : (2003/01/20) Changed SELECT @columnName […]
2003-01-09
942 reads
Use the sp_MSforeachtable stored procedure to run the sp_spaceused stored procedure for every table in a database
2003-01-08
112 reads
Are you using default values for your parameters? Using named parameters when you call the proc or passing the values by ordinal? Should you be? Andy thinks 6 out of 10 of our readers will agree with his point of view, we'll be a little more conservative and guess that 5 of out 10 will be closer.
2003-01-08
8,230 reads
This UDF will return the checksum for a SP or UDF to help tracking changes to the code.Example:print dbo.OBchecksum('hello')
2003-01-07
155 reads
Yee Haa, as if we couldn't annoy our users more with message boxes, emails, and other friendly pop ups ;P here comes the net send. Has a test for success to determine if the send worked. If an invalid name is entered it can take a bit to fail, so don't use this from a […]
2002-12-18
326 reads
One thing I’ve always loved about the Scooby-Doo cartoon is that he never solved...
By Kevin3NF
Flexibility and Scale at the Database Level When SQL Server 2012 introduced Availability Groups...
Setting page visibility and the active page are often overlooked last steps when publishing...
Comments posted to this topic are about the item Password Guidance
Comments posted to this topic are about the item Using table variables in T-SQL
I am trying to check out elastic query between two test instances we have...
What happens if you run the following code in SQL Server 2022+?
declare @t1 table (id int); insert into @t1 (id) values (NULL), (1), (2), (3); select count(*) from @t1 where @t1.id is distinct from NULL;See possible answers