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,396 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)
917 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,147 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)
339 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)
294 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)
86 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)
145 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)
605 reads
A script that will help you deal with and get through any disaster recovery situation.
2005-04-01 (first published: 2005-03-29)
528 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)
315 reads