Ever have trouble removing logins because of onwership issues and permission grants? This stored procedure checks for a login (sql or nt) on the local server and if found it then checks each database for ownership issues and granted permissions. The rules for action taken are listed in the header of the stored procedure. Works […]
2005-04-19 (first published: 2002-07-11)
993 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)
944 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,175 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)
354 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)
350 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)
102 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)
160 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)
649 reads
A script that will help you deal with and get through any disaster recovery situation.
2005-04-01 (first published: 2005-03-29)
562 reads
SQLCalcEngine - evaluate numeric expression similar to the VB eval function.The basic concept is to pass a string containing a numeric expression such as ((2+3)*(4/9)) and receive a numeric value back. The algorithm is based loosely on material found at http://www.arstdesign.com/articles/expression_evaluation.html, as well as material found in the book "Writing Compilers and Interpreters" by Ronald […]
2005-03-31 (first published: 2004-06-22)
333 reads