Author Archives: JackDonnell - Page 5

T-SQL – Change SQL Job Owners to SA

I’m a sucker for the Maint Wizards and everytime I touch a SQL Job.. It reverts the ownership to my domain account. ( Not a Good Practice to use my domain account … I know). I manually change the ownership back to sa (actually, dbo as sa is disabled…ssssh) . OR I CAN USE THE BELOW HANDY-DANDY SCRIPT . As always .. Buyer-Beware! Written for  SQL Server 2005..

Here is a script I wrote to do the heavy lifting:

Read more »

FIX – Sql Server 2005 Performance Dashboard Reports

I Love the Sql Server 2005 Performance Dashboard Reports, but there is a slight bug that gets me from time to on systems with long uptimes.  Below Essa Mughal has the fix!

PERMALINK: http://www.tsql.ca/Default.aspx?tabid=633&EntryID=24

Posted by: Essa Mughal 7/19/2007 10:05 AM
 

Those who are using Performance Dashboard Custom Reports, they might get that error if they have not updated there script.

Difference of two datetime columns caused overflow at runtime.

Reason:
There is a function used in the script.sql, since DATEDIFF returns and int once you have connection that is more than 24 days or so old it will overflow the dattype if you modify the procedure so caluclates the differnce in minutes first converts this to milliseconds then add the number of minutes diffrence onto the start time and then calculate the remianing number of milli seconds
Read more »

T-SQL – Create View to look at Database Indexes

Wrote a simple query to look at basic attributes of indexing in a specific database:

SELECT    [IndexGroup]

               ,[FileName]

               ,[TableName]

               ,[IndexName]

               ,[dpages]

               ,[rowcnt]

               ,[rows]

               ,[OrigFillFactor]

               ,[groupid]

               ,[allocpolicy]

               ,[status]

               ,[groupname]

FROM [dbo].[INDEX_INFORMATION]

[Click Below to get the complete code used to create the database view]

Read more »

Some Tips and Tricks for Web developers and others

for web developers and other, some great tips on ssis, web development and other things

read more | digg story

Win a Copy: Transformers Cybertron: The Ultimate Collection

The Folks at http://www.superheroes-r-us.com have a contest running to give away a copy of the Transformers Cybertron: The Ultimate Collection DVD. Just leave a comment on with name your favorite Transformer.One lucky commenter will be selected at random on Thursday, August 14 (one week from today). Pretty Easy. Site is pretty cool, too.

read more | digg story

Secure Your WordPress Blog – from www.hackaday.com

Check out this post from HackADay.

How do you protect your own blog from getting hacked? There’s never a foolproof answer, but with some added tools and caution, you can make your website a little safer from getting into harm’s way. Cats Who Code has five plug-ins and tips you can use to protect your WordPress install. Some of the tips are common sense advice that can apply to anything related to technology – such as making backups often and using strong passwords. Others include suggested plugins that can help you verify whether your WordPress install has any security holes, or small tricks to hide the version of WordPress you’re using. Do you have any useful plugins or tricks to share to keep your blog safe from hackers?

Consider Giving Your Time and Resources

Below are two differnt organizations that are requesting donations to assist with the Spring storms and International events. I thought now would be a good time to help make these available:

American Red Cross Release:
http://www.redcross.org/pressrelease/0,1077,0_314_7844,00.html

UMCOR (United Methodist Committee on Relief) Disaster Response Page:
http://new.gbgm-umc.org/Umcor/work/emergencies/

Read more »

Earthrace – Powerboat to Circumnavigate the Globe (2.0)


Check out : EarthRace

 

latest news from http://www.EarthRace.Net

Sagunto, Spain, 27 June 2008, 13.24 GMT: Earthrace, the world’s fastest eco-boat, has smashed the world speed record for a powerboat to circumnavigate the globe, knocking almost 14 days off the previous record.

The boat crossed the finish line in Sagunto at 13.42 GMT on Friday 27 June,  having taken 60 days 23 hours and 49 minunutes to travel around 24,000 nautical miles fuelled by biodiesel to demonstrate the efficiency of, and draw global attention to, the potential for alternative fuel sources.

“This fantastic team of people and our astonishing boat have broken the record by a massive margin, said Pete Bethune, New Zealand skipper and owner of Earthrace,  “I finally feel that all the sacrifices made, especially by my wife and daughters, have been worth it.  I don’t even  know how to begin to thank all the individuals and companies that have supported us along the way, some of them since the very beginning over five years ago.  Without them, none of this would have been possible”.

 

The goal of Earthrace is to set a new world record for a powerboat to circumnavigate the globe, running 100% renewable biodiesel fuel, and with a net zero carbon footprint.  The amazing Earthrace boat will make the attempt starting from Sagunto in Spain. Earthrace is also undertaking a two year promotional tour, visiting 100 great cities around the globe. The crew meet local people, talk about their experiences, and most of all connect with people about the need to get renewable fuels into our energy mix and to inspire them to do something themselves to minimise their impact on the environment.

Excellent Blogs:  Blogs

Support them: Buy a Nautical Mile

T-SQL: Alternatives to Using Cursors

[UPDATE] SQLServerCentral.com has a great article( from 2002) on the use of Temp Tables. You may find the information useful.

I have gotten a ton of hits some links that I created years ago on T-SQL Cursors. Sometimes they are the the best course of action , but may times they are not the most efficient. This posting has some a possible alternative.

Creating Tables with Identity Columns
I like to create tables and temp tables with identity columns. You can then do row by row process the data using the id column. In another post, I will show you how to create and some uses for Table-Valued functions to provide similar utility found with using cursors. Oh, don’t forget our friend the Case Statement, either.

Read more »

It’s Not (just) the Clothes that You Wear, but Where You Make Them

Tony Stark in His Lab: Photo by Zade Rosenthal / Paramount Pictures
 Popsi has a neat article on Tony Stark’s Lab.