This script expands on the usp_KillUsers script posted by Brian Knight, by adding the text of the process that is being killed and will even kill users who are accessing the database from with in a process of another database. Does not contain the NET SEND option though.
2005-04-22 (first published: 2005-04-04)
309 reads
If you attach a DB on an SQL Server different from the SQL Server where the DB was initially created, you will usually come up with a situation where a login will be a DB user however, you cannot see this through the login properties screen. That happens because the name of the login exists […]
2005-04-21 (first published: 2005-04-02)
1,412 reads
This function takes two dates and returns the number of business hours between the two dates. The function does not support holidays at this time, but the script could be modified to query a holiday table to exclude those holidays.
2005-04-15 (first published: 2005-03-28)
935 reads
This script permit executes the sp_updatestats in all databases at same time.First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.Now you can execute this […]
2005-04-14 (first published: 2005-03-29)
4,169 reads
These functions will allow you to convert from one data type to another. As well, you can expand your conversion library to perform even more conversions.Enjoy !-)
2005-04-12 (first published: 2005-03-24)
344 reads
/******************************************************** "CheckAllInts" Find all columns in all user tables in a database defined as "int", and get the maximum value for the column. Uses a cursor and logs the results to a table. (One-time CREATE TABLE statement at top of script). Successive runs over an appropriate period of time would allow one to find how […]
2005-04-11 (first published: 2005-03-23)
336 reads
The script returns the quarter and year of a date submitted in the form of '105' - first quarter of 2005 - and is useful for grouping data by calendar quarter. Easy to modify for fiscal quarters.
2005-04-07 (first published: 2005-03-21)
92 reads
This is an update to the Search for text in procedures (no cursors) function (excellent script), which lists all of the objects (searching in syscomments, so it excludes tables). I have added a 2nd column to the output of the object type.
2005-04-06 (first published: 2005-03-18)
154 reads
this script send an HTML email every day with information about failed jobs . the script use the persist.mail to send the report, but you can use another mail component with support html.
2005-04-05 (first published: 2005-03-17)
636 reads
A script that will help you deal with and get through any disaster recovery situation.
2005-04-01 (first published: 2005-03-29)
537 reads