This script will run a DTS package from any registered SQL Server instance and display the standard package execution progress dialog while the package is running.To specify the SQL Server instance and package to run, amend the parameters for the ExecuteDTS function in the "Main Program" section of the script.The script is written using SQL […]
2004-08-03 (first published: 2004-05-25)
1,063 reads
This procedure will execute, taking two parameters, (the 2 db names, and will then list out the major object and schema changes for you. It is pretty sraight forward and suggestions are appreciated. It's a good utility for a DBA to track changes after upgrades, etc.. Each portion is easily convertable to a stand alone […]
2004-08-02 (first published: 2004-07-16)
1,106 reads
This stored procedure will detect all first level object dependencies on Stored Procedure.The result set will be stored in table Depend. Unlike sp_depends, sp_MSdependencies will be able to detect all links and dependencies associated to an object. It includes TRIGGER, DELETE, UPDATE etc .
2004-07-30 (first published: 2004-07-16)
327 reads
Procedure: usp_drop_multiple_databases Description: This procedure will take a string as input (it can take the % character in the calling string), put all db like that name into a list, and then drop all the databases in the resultant list. Example calling syntax: usp_drop_multiple_databases 'test_%_delete'--> Will drop ALL databases with a […]
2004-07-29 (first published: 2004-07-15)
77 reads
This script deletes all duplicates from a table. It keeps the first instance of the record, and discards all others. If you want to keep the last instance of the record, use MAX instead of MIN. The script can be modified very easily to include more/less fields for comparison. I've successfully used this SP to […]
2004-07-27 (first published: 2004-07-01)
296 reads
I don't remember where I found this little gem, but as a VB Developer it has simplified retrieving dates on many projects. Simply pass the function a datetime value and the format that you want in VB style syntax and the date is properly returned. I have modified it slightly from the original author (who […]
2004-07-23 (first published: 2004-06-24)
303 reads
This procedures grants execute permissions to all the stored procedures in a database to the role/user supplied as the parameter. the default is Execute_StoredProcedure. Execute this procedure local to the database you need to grant permissions.
2004-07-22 (first published: 2004-06-21)
342 reads
Removes double spaces in a string, leaving all words seperated by a single space. Run in Query Analyzer.
2004-07-21 (first published: 2004-07-05)
254 reads
Counting the number of ocurrences of characters in a string can be useful, and this script will do the job. It can easily be modified to be a function or to search for ocurrences of strings. Run it in Query Analyzer.
2004-07-20 (first published: 2004-07-05)
143 reads
I had a developer in my company come to me recently with a unique request. He asked if there was any way for sql to return a result set that was flopped. In other words he wanted the rows to be columns and the columns to be rows. So that a result set like this:Col1 […]
2004-07-19 (first published: 2004-07-02)
349 reads