This simple script identifies all objects which have a rollback transaction statement without a requisite begin transaction statement. If a rollback statement is issued without a begin statement, then the code will generate an error. Triggers are not included in the list since they can have a rollback without a begin. This script can be […]
2006-01-09 (first published: 2005-09-16)
341 reads
this script lists the report Execution History ex: timetaken to render, retreive data, number of records retreived and their size etc.. in descending order of its execution timeReports the ReportName, its Path , TimeTaken to execute the report, retreive the data, render the report, total count of rows returned and the total data returned in […]
2006-01-06 (first published: 2005-10-20)
229 reads
I use these to manage the addition and removal of extended properties on all tables and columns in my company's dbs.Rather than writing complicated joins or calling functions every time, I use views on sysobjects and INFORMATION_SCHEMA tables. I tried to make these scripts as flexible as possible so you can reuse them in procedures, […]
2006-01-05 (first published: 2005-11-11)
1,231 reads
With this script you can see the permissions that every user-defined role and every user without a dbrole has.The list could get very large and hard to manage, but it helped me to build the roles of an app that didn't had any role defined.Hope it'll be usefull to someone
2006-01-02 (first published: 2005-12-08)
705 reads
Based on user time locale/gregorian time
2005-12-30 (first published: 2005-12-09)
126 reads
This script will create a single-line ALTER TABLE statement for each column in any table to change the collation to match the 'database default'. This is best accomplished in the Query Analyzer -- simply run the script, select all the records, and paste them into a new window to run them.
2005-12-29 (first published: 2005-12-12)
2,093 reads
Most word count functions/procedures are based on some form of looping methods. If the table is large or there is a need to count the words in a number of columns, this can become quite an exercise. This function, based on a mathematical model, will work much faster and more efficient in counting the words […]
2005-12-28 (first published: 2005-12-12)
271 reads
Identify Local_TCP_Portand ENDPOINT used by a SQL Connection
2005-12-27 (first published: 2005-12-17)
86 reads
Compile in master. Set your QA output to text. When run from the db of interest it generates checksum select statements for each user table in the db composed of the PK columns and a checksum for all columns excluding text, ntext, image and sql-variant. There are no parameters. Modify for your own use. Save […]
2005-12-19 (first published: 2005-04-14)
178 reads
It is a known fact, that checksum function can not be applied to text, ntext and image fields. But sometimes it is necessary to compare whether a value in a text field has changed (although it is not guaranteed that checksum generates a unique value, but it still could be used as a good estimator). […]
2005-12-16 (first published: 2005-06-17)
1,125 reads