Truncate data from all tables in a database
This script will truncate data from all tables in a database
2005-06-06 (first published: 2005-05-13)
485 reads
This script will truncate data from all tables in a database
2005-06-06 (first published: 2005-05-13)
485 reads
This is a replacement script for the first IsDateAHoliday. The first one was too slow and inefficient. This one is much better. Enjoy.IsDateAHoliday is a User Defined Function that accepts a date and returns a 1 if date is a national holiday and returns a 0 otherwise.The holidays are:New years Day, MLK Day, Presidents Day, […]
2005-06-03
407 reads
The following procedure gets a TSQL program object(View/UDF/stored procedure) and a given stringIt searched object's source code for the string and returns the number of lines where a match is found.This is helpful when we want to search all our TSQL code for a specific table name, column etc. and investigate where it is referenced […]
2005-06-02
101 reads
This script will generate insert statements for the given tables. You can pass the tables names, separated by commas, into sp_DataAsInsCommand stored procedure as in the example below:EXEC sp_DataAsInsCommand 'employee,titleauthor,pub_info'Updated on 5/25/01 to correct an issue with columns that are short like a column defined as char(1), to correct another issue with the Identity column […]
2005-06-01 (first published: 2005-05-05)
335 reads
Stored procedure usp_CheckMissingPermission_for_User checks missing exec permission for given user or group on all the stored procedures within the database. It not only detects missing exec permission, but also generates a scripts for you to fix the problem.
2005-05-30 (first published: 2005-05-09)
228 reads
This script generates filegroup listing on a given database for each table within the database. This will be very handy to indentify which table is built on a particular filegroup. This is useful for a VLDB (very large database).
2005-05-27 (first published: 2005-05-09)
437 reads
This script is userful in CaseSensitive environment. This will detect a values from a table column which are lower case.
2005-05-26 (first published: 2005-05-09)
83 reads
Generating WITH MOVE Statements for restoring backups on a different servers which has different disk layout.
2005-05-25 (first published: 2005-05-09)
213 reads
I have the need to backup multiple MS SQL databases and email to a support email address.I have added on an original script to produce a fairly robust db back and email script.You can either email the db or just a notification of backup.Script will also maintain db's for a set length of time before […]
2005-05-20 (first published: 2005-01-26)
323 reads
This script uses the DTS object model to create a simple package, execute the package, and properly check for any errors.
2005-05-19 (first published: 2005-04-01)
241 reads
By Ed Elliott
All Spark Connect Posts Introduction There have been quite a few changes in the last...
By Steve Jones
ochisia – n. the fear that the role you once occupied in someone’s life...
This is a quick blog post, mainly so I have the code available if...
Comments posted to this topic are about the item How Do You Patch 100...
Comments posted to this topic are about the item Microsoft SQL announcements at PASS...
Comments posted to this topic are about the item How to Develop Custom T-SQL...
What do I get as the results from this code?
SELECT CEILING (999.999), CEILING (-999.999);See possible answers