Desc : This SQL statement will provide script for backup all your jobs.-- Remark : Grow-up "maximum characters per column" (for 8192) and disable "print column headers" in 'tools' / 'options'
2007-05-29 (first published: 2005-01-12)
390 reads
This PowerShell script will connect to an SSAS instance, enumerate ALL databases, and back each one up. You can then add this to either as a Scheduled Task or as a SQL Agent job.
2007-05-28 (first published: 2006-12-14)
1,623 reads
This function splits a delimited string (up to 4000 characters long) into a single column table. The delimiter can be specified at the time of execution. If not specified, the delimiter defaults to a comma. The default length of each value is 100, but that can easily be changed.An example for usage:DECLARE @string NVARCHAR(4000)DECLARE @instruments […]
2007-05-25 (first published: 2007-04-10)
5,682 reads
I wrote this code to make it easier to compare record counts between a live database and a restored copy to test my backups, I thought people might find it useful. You need to run it against your live side when you do the backup that you're going to restore and compare against.Copy the output […]
2007-05-24 (first published: 2007-05-07)
2,747 reads
DESCRIPTION:This procedure will allow you to display results vertically (down) instead of across the screen. It's great when you are dealing with a query that has 50 columns and just a couple of records. LIMITATIONS: * It will be very slow if you are trying to return a lot of records. Works best for queries […]
2007-05-23 (first published: 2007-05-19)
3,152 reads
It has always bothered that there is not a NameValuePair function in SQL.
2007-05-23 (first published: 2007-05-16)
183 reads
DESCRIPTION:This procedure produces a SELECT statement which explicitly lists all fields for 'tablename' with fieldname and alias as the column name. The SELECT it produces is ready to run or if you need to join several tables just copy the column names off the SELECT it generates. I use this a lot when I create […]
2007-05-22 (first published: 2007-05-19)
189 reads
This is just a quick method to determine the backup mode of all databases on a server. No cursor involed.
2007-05-18 (first published: 2007-05-07)
429 reads
A simple script to find the database recovery model. Cut & paste into Query Analyser
2007-05-17 (first published: 2007-05-08)
2,983 reads
This code provides a way of monitoring the growth of all your databases within a single instance. The first part is the creation of a monitoring table with the initial load of current databases and sizes. The second part is the SQL that can be put in a scheduled job to automate the growth monitoring.It […]
2007-05-16 (first published: 2007-05-08)
24,355 reads