Posts

Yay - It works! Rebuild/Reorganize all indexes in one go - woo hoo

/*Version 1 of my script to fix all fragged indexes on a database */ /*Must be logged in as [sa] for this to work, if not, you will get permissions errors*/ /*You should be able to copy and paste this script in its entirity to your SQL 2005 or higher query window and run it without altering anything other than the USE .*/ /*Perform a 'USE ' to select the database in which to run the script.*/ USE AdventureWorks GO -- Make sure temp table doesn't exist IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tmp_fraglist]') AND type in (N'U')) DROP TABLE [dbo].[tmp_fraglist] GO -- Declare variables SET NOCOUNT ON DECLARE @tablename NVARCHAR (255) DECLARE @indexname NVARCHAR (255) DECLARE @indextype NVARCHAR (255) DECLARE @execstr NVARCHAR (255) DECLARE @pagecounts INT DECLARE @frag DECIMAL DECLARE @reorgFragSize DECIMAL DECLARE @rebldFragSize DECIMAL DECLARE @numrecords INT DECLARE @rowcount INT DECLARE @errorMessage

Unsolicited calls

Recently (the past year or so), I've been getting majorly inundated with calls. My number is ex-directory (unlisted) so I should not be getting any calls from people unless I have given them my number, however, I'm getting about 42 missed calls a week; an evening doesn't go by without at least 2 intrusive calls from someone wanting 5 minutes (30-40 minutes) of your time. These people must also be ringing constantly during the day to rack up that many missed calls. It reached the point where about 6 months ago I stopped answering the landline at home and in the past fortnight have now unplugged the phone completely to stop the annoying and very frequent ringing. I am also considering changing my number. Today though someone very helpfully told me that there was a website you could go to and request having your number removed from a list, they didn't know the link unfortunately but after 10 minutes of googling I have the answer, yay! And I'm sharing it wi

It's not that difficult!

< rant> I am getting very hacked off with the spelling and grammar in this country. I'm convinced they just aren't bothering to teach them English at school any more. So, in our first lesson on how not to annoy me with your appalling language skills, this is a shout out to all those of you with an apostrophe aversion: You're = You are - "I can see you're not that good at spelling old chap." Your = Possessive form of 'you', i.e. it belongs to 'you' - "Is this your appallingly written advert?" Their = Possessive pronoun, means belonging to them - "Is this their small furry animal?" They're = They are - it is a contraction of two words - "They're over there.". There = Over there - "The house was over there.". Use 'there' when referring to a place. It's = It is or It has- "It's great sitting on the beach in the sun.", "It's been great seeing

SQL Performance - Index Defragging

I'm in the process of putting together a couple of short talks for the Auckland SQL Server user group meeting in August. The first presentation is already available to download on the right hand side of the blog page; as soon as the second part is finished I'll post a link to that as well. Code will be included with the presentations so that you can try this stuff out for yourself. Part I - Defragging Indexes For Beginners Indexes over time become fragmented and as a result don’t work quite as well as they should. This short talk will show you how to fragment and then fix an index. Part II - Effective Indexes For Beginners Use a DMV to identify which indexes are effective and which can be disabled/deleted. This short talk will show you how and why you should be checking the effectiveness of your indexes.

Another item for the wish list

Image
Nice... Nixie Tube Clocks... droooool... this is now top of the wish list, closely followed by a Steampunk Segway. http://www.nixieclock.net/index.html

And today's winner of my favourite person or company is.... Microsoft

Image
Microsoft were the primary sponsors of NZ Girl Geek Dinners for 2008/2009 and they have emailed today to confirm a continuation of this sponsorship until July 2010. A huge thanks to all the guys at Microsoft NZ for all your help since NZ-GGD started in November 2007. You rock! :)

Oh for goodness sake!

Section 92a rears its ugly head again. http://www.netguide.co.nz/200907151077/92a-changes-keep-net-termination.php