Sunday, 28 November 2010

New Domain - My blog has a new domain name gethynellis.com

About a year ago I started to write a blog, previously to that, for about three years I had been writing a SQL Server themed tips and articles on my website. When I started writing the blog I decided to build it into my existing domain name, that I think was a little mistake on my part. It’s that time of year again when it was time to renew my domain name, I hadn’t written on the actual site for well over a year, people reading the site itself had fallen through the floor as I was no longer paying it any attention,  the hosting costs were creeping up with that particular provider and I found that as I’ve developed and increased my contribution  to the SQL Server community my name has become more and more important. The existing domain name, I felt did not really represent me, it was long, possibly too long and difficult to remember and if you came across it on a Search Engine search you wouldn’t necessarily know that it was my site without clicking the link and visiting the site. So after some deliberation and thought I have decided to go for a new look. I revamped the blog site a month or so back which I think now looks clean and tidy and pretty easy to navigate. Yesterday, which incidentally coincided with my old domain expiring, I started up gethynellis.com and pointed it at my old blog. Nothing has been lost and all my old blog posts have been kept so all is good there, it is now obvious from the domain name whose site you are on and that will go that little bit further in promoting my brand – me! to the wider world. A key factor in my decision to change though was down to the fact that a lot of people read what I write on other sites, like SQLServerCentral.com and SQLServerPedia.com when I started the blog a year ago I followed some of Brent Ozar’s (Blog | Twitter) advice and used feed burner for my feeds and got myself syndicated on a couple of the large SQL Server sites. This allowed my to change the base domain for my feed without needing any of my readers to change their subscriptions. The syndication on SQL Server Pedia uses this feed. I’m not sure if SQL Server central does though I will find out if the posts makes it onto their site. If doesn’t I’ll have to email Steve and ask him to update it.

The Drawbacks and mistakes that I made

Changing the domain name of my blog, technically, was an easy thing to do, in reality though this approach has many drawbacks. It is pretty much like starting again. Even though all my content is still out there on the web any external links to it will be pointing to the wrong place, Which will not help my new domain in the search engine rankings but more importantly if you link to my content on the old domain  that link will no longer exist and your site users will get taken to a horrible error message that they will no doubt find frustrating and I am really very sorry about. If you have links to any of my blog posts can I please ask that you update them with the new URL it’ll help your readers and of course me :-)

I am in the process of updating my old posts which link to other pages  on my blog so I maintain a nice set of internal links that I’m told search engines like. This after years worth of posts, which total at just over 100 posts, is quite a lot of work.

As I type this Google and Bing and other search engines still don’t know about my new domain, hopefully it won’t be long before they pick up the new content. I did look into Google’s “Change of Address” feature in webmaster tools but unfortunately I no longer have access to the old domain so 301 redirects are out of the question, I’m not sure they the old hosting company supported them anyway, and although I verified the old domain in webmaster tools years ago, Google tried to re-verify it when I tried to change the address but unfortunately that failed too. The sub domain my blog was sitting on couldn't be re-directed because it’s not a root level domain so that tool, at least for now unless someone advises me otherwise, seems unlikely to help. I have followed the other advice Google offers when changing a domain name, I have added my new domain to webmaster tools created a site map and updating internal and external links to the site. They also recommend retaining control of the old domain for 6 months after the move, not planning this domain change that far in advance and the fact the old domain has now disappeared I won’t be able to this either. So we’ll see how it goes but I do envisage my visitor numbers falling significantly over the next few months while the Search Engines sort themselves and my new domain out.

This last year I have had just under 10,000 unique visitors to my site (according to Google Analytics), a figure I’m pretty proud of, although another 6 people visiting would have been a great figure to look at! It will be interesting to see how this changes impacts on that figure over the next few months, here’s how the unique visitors numbers over the last year looks on my blog today:

Traffic Stats Last Year

Lessons Learned:

  • Give yourself plenty of time with the old domain still running, it will allow you a much smoother transition to your new domain name and keep you much more in control. Although I have been thinking about this for a while, I only really looked into the actual logistics of this when the old domain was about to run out. Then it was too late for me.
  • Pick a good domain for your blog right up front, save bothering with all this in the first place.

If you have any further advice to offer me (Or others) about what I should have done differently or anything that I can still do to improve the efficiency of the move to the new domain then please let me know in the comments below.

I will keep you posted in the New Year with and update on how the transition went.

Wednesday, 10 November 2010

SQLServerPedia – Awards 2010

The results of the SQLServerPedia Awards 2010 are out....I was nominated in two categories and I won the "New to SQLServerPedia" award. Being nominated was a nice unexpected surprise and winning is unbelievable, it actually ties in nicely with my blog's one Hundredth post and a nice way to finish my first year writing on the blog. The "New to SQLServerPedia" category had some some greater bloggers nominated and two of those nominated in the "New to SQLServerPedia” category won awards in some of the other categories,  Jason Brimhall (Blog|Twitter) won an award for the "Book Review" category, you can view that post here and Bob Pusateri (Blog|Twitter) won an award in the "Internals" category, you can read Bob’s post here. So there was lots excellent of competition and I can’t believe I actually won. Congratulations to Bob and Jason and all the contestants on on their success . I'm just sorry I couldn't make the trip to Seattle to pick up the award in person.!
I'd like to take this opportunity to thank everyone that voted for me.
I have got my Winners Badge:
badge-winner-ns
Hopefully my statue/trophy will be winging its way to me in due course (Pics to follow).
You can check out all the results here: http://pulse.sqlserverpedia.com/awards/

Friday, 5 November 2010

Post 100 – A Year Gone (not quite)!

I wasn’t going to make a special effort for the one hundredth post on my blog, I was intending to let it slip by without much of a mention…But I couldn’t help myself. I have maintained a SQL themed website since 2007 without much luck in term of hits and visitors. When I started out in 2007 I bought some hosting that included a content management system, but that was clunky and at best difficult to use. In three years of it running and writing for that site I probably churned about 50 articles/posts…tops. Late last year (2009) after following along and reading some of the well known bloggers out there like Steve Jones (Blog|Twitter) and Brent Ozar (Blog|Twitter) and just before attending the SQLBITS conference at the Celtic Manor (home of the 2010 Ryder Cup) I decided to start blogging. My reason being, I was writing for my website and now on my blog mainly for my own benefit. I find writing helps me learn and remember technology much better than reading alone, it forces you to think about a subject and test and experiment and use the technology so you know what you are writing is accurate…in short it makes you do the work. You learn from the work you do, writing makes you understand and remember more clearly than reading and practicing and using alone. You always have documentation on hand, that you wrote, for future reference. It also stands as a good example of what you know and what technical skills you have. I saw people like Steve and Brent churn out more posts in a week on their respective blogs than I would be able to do in a month on my website. So I started a blog and incorporated it into the website, (they actually share a domain name) and I started writing on the blog. I have been doing it for a year and I have hit my one hundredth post. I feel like I have learnt a lot in the last year!
But it doesn’t stop here, my blog has had some minor success, when I started it, obviously visitors numbers were non-existent very small, but through some help, from people like Steve and Brent who syndicated my blog on their very large and very successful SQL Server websites and some sound SEO advice from my good friend Mandeep Kaler my visitor numbers grew, slowly, but they grew. I then found out about #TSQL2SDAY the monthly blog party, the brain child of Adam Mechanic (Blog|Twitter), and I started writing in a few of those, I found these improved my exposure to the other bloggers in SQL Land and again my visitor numbers crept up. I checked Google Analytics today for the first time how many unique visitors have been to my blog this past year…I’m about 800 unique visitors shy of 10,000! WOW! I was shocked and I still am, I didn’t know that so many people had been to my blog and I hope that those people got something useful from it.
I recently saw an an announcement on SQLSERVERPEDIA,  that they were to hold a blogger awards to coincide  with the PASS summit. The fact I’m not attending the PASS summit, even though I would love too meant I didn’t pay as much attention to these awards, I saw post from various well-known bloggers, promoting their nomination but I have been busy and not had time to catch up on my reading, until today I saw a post today by Grant Fritchley that mentioned he was up for nomination for his post on Powershell, I liked Grant’s post on powershell, so I thought I would pop along to the sqlserverpedia.com website, have a look at the nominations and probably, in all likelihood vote for Grant. I clicked the link, the page loaded and the first entry I saw was a post called “Policy Based Management - Disable Autoclose” I thought to myself, I wrote a post with a similar title not so long ago, I then looked at the bio and the author and I was shocked to find that it was actually my post up for nomination. I’m sorry Grant I didn’t vote for you in that category, although I’m way behind you in the count so I don’t think I will prove much competition for you.
Having shamelessly voted for myself in “Automation and Management” I then, after I got over the initial excitement of being nominated, thought I would check out some of the other categories, I did vote for Grant in the “Series” category though for his series “An Introduction to Indexes” series I looked at the the “New to SqlServerPedia” category and to my shock and amazement I found that I was nominated there too!!! Again though I’m lagging way behind the rest of field , not that that bother me at all, I wasn’t even expecting a nomination, I have been shocked to have been nominated, not once but twice!
That said, people are on the campaign trail and I don’t want to lose by a country mile so if you like to vote for me or my post then you can do so:
New to SqlServerPedia
Automation and Management
I’ll be honest, these nominations have been a fantastic way for to round off my first year blogging properly and my one hundredth post, so standby for the next one hundred.

Thursday, 4 November 2010

SQL ServerPedia – Blog Awards

I have been catching up on some blog posts and I read a few posts by well known bloggers like Grant Fritchely and Mike Walsh about voting for their posts in the SQLServerPedia blog awards. So I visited the links they provided to have look at what was what and who was nominated and then maybe vote. I was stunned to learn that I have been nominated in two categories!
I have an entry in the management and automation category for my Policy Based Management post. I’m in there with along with Grant and a few others.  I have also been nominated in the New To SQLServerPedia category. WOW! I still pretty stunned to be honest, I’m in there with some great writers.
So if you would like to vote then a list of all the categories can be found here. And If you did happen to vote for me, then that would be fabulous.

What’s in a Full Backup?

I got asked a question today that I though was quite interesting. If my backup starts at 6pm and it runs for say 30 minutes what happens to the transactions that occur during the 30 minutes that the backup is running?

The short answer:

All committed transactions that run during the duration of the backup will be included in the full backup, open transactions will not be included.

The proof:

Please note, that your database will get around 784MB in size and the backup created will be roughly the same size, so before running these scripts, make sure you have enough space on the box you testing it on.

I will create a dummy database called buptest for the purpose of this test

USE master
go
CREATE DATABASE buptest
GO
ALTER DATABASE buptest SET RECOVERY SIMPLE





I have put the database into simple recovery mode just to keep the log manageable, I am not worried about point in time recovery for this demo.


Next we will create two tables to hold some test data

USE buptest
go

CREATE TABLE t1 (id INT, val CHAR(8000))
go

CREATE TABLE t2 (id INT, val CHAR(8000))
go



Next we will populate our table t1 with some data, 100,000 rows. I’m doing this so the backup will run for long enough to allow me to execute some transactions against the database whilst the backup is running. I don’t know of another way of doing this…If you do, please leave me a note in the comments.

DECLARE @i INT
SET @i = 0
WHILE @i < 100000
BEGIN

INSERT INTO t1
VALUES (@i, REPLICATE('a',8000))
SET @i=@i+1
END



The next step has two parts, I want to kick off a full backup in one query window and then in a second query window I want to run two transactions that each insert a row into the t2 table. The first transaction will be committed before the backup completes the second transaction will be committed after backup has finished. So I suggest if you are following along, you open two query windows, paste the backup code below into the first window, paste the insert transaction into the second window (You will see that the second commit statement in commented out), switch to the first window, start the backup, quickly switch to the second window, fire the script making sure that the commit statement is commented out. Wait for the backup to complete. When the backup has completed uncommented the commit transaction statement and commit the currently open transaction.


The script to run the backup

--We then take a backup of the database
--While this is running fire the second script below
BACKUP DATABASE buptest TO DISK = 'c:\Backup\buptest.bak'



While the backup script above is running (it took about a minute on my laptop to complete) run this:

USE buptest
GO

--Run in a new query window
BEGIN TRANSACTION
INSERT INTO t2
VALUES (1, 'gethyn')
COMMIT TRANSACTION


BEGIN TRANSACTION
INSERT INTO t2
VALUES (2,'Ian')





When the backup completes run the final commit transaction in the second window. This ensures that the second transaction was not committed prior to the backup completing.

COMMIT TRANSACTION



If you run

SELECT * FROM t2



We get two rows returned.









1Gethyn
2Ian

Next we run a restore of our database from the backup taken

USE master
go
ALTER DATABASE buptest SET SINGLE_USER WITH ROLLBACK IMMEDIATE

RESTORE DATABASE buptest FROM DISK = 'c:\Backup\buptest.bak' WITH replace



Then re-run the same select

SELECT * FROM t2



We see that only the first inserted record is present.






1Gethyn

Hence only committed transaction are included in a full database backup

 

Tuesday, 2 November 2010

TSQL2SDAY #12 - Why are DBA Skills Necessary?

WOW this is the 12th TSQL2Sday albeit this month’s is week early because of the PASS summit next week, so these little blog parties have been running for a year now. This month is being hosted by none other than Paul Randal (Blog|Twitter) and we are going to be discussing Why are DBA Skills necessary?
There is a wide range of topics that I could write about here and Paul has listed several topics areas on his blog, I am going to be discussing how business continuity could be affected by a lack of DBA skills.
Paul in his Master class, in London in the summer just gone (review here) gave a great example from his time with Microsoft when a bank got their disaster recovery plan wrong and it ended up costing them dearly, I’m won’t go into much more than that here but it was a great story demonstrating firstly how important data can be to company or firm and also how important it is protect and look after that data – ultimately in lots of cases (backing up the database) = (backing up the business). Business Continuity and Disaster Recovery are one the main responsibilities of the DBA and it is important to get it right, not only for the safety of your own job but also for the safety of the business.
Thankfully, (knock on wood) I count on one hand the times I have needed to restore a production because of a disaster or an unexpected  problem of some kind, fortunately when those situations have come about I have been fully prepared and practiced for it and had relevant up to date documentation on hand that made the process as painless as possible. Database backups are only good if you can restore and recover from them, so I would recommend that anyone with responsibility for backing up a production database has a process in place for periodically testing those backups so you can have confidence in your restore process should the need ever arrive.
If you are backing up your databases regularly, hopefully you are also storing your backups in a secondary location(s) hopefully on a different server, hopefully off site some place so if your main building becomes unavailable…for whatever reason you can get your database back online by using the backups stored in a separate location.
I see lots of forum posts, “my database is corrupt and I have no backup please help”, “my database has accidentally been deleted, can I get it back without a backup?” which means lots of businesses out there is the big wide world are suffering because they didn’t have the essential skills of a DBA. All of these could have been prevented if someone with DBA skills/knowledge had been involved with DR Business continuity plan

Monday, 1 November 2010

Movember – Team IPMO

Some friends of mine  decided to support the Movember charity this year. I would try and explain what Movember is but the charity website  does a much better job than anything I could put together:

“Movember challenges men to change their appearance and the face of men’s health by growing a moustache. The rules are simple, start Movember 1st  clean shaven and then grow a moustache for the entire month.  The moustache becomes the ribbon for men’s health, the means by which awareness and funds are raised for cancers that affect men.  Much like the commitment to run or walk for charity, the men of Movember commit to growing a moustache for 30 days.”

The team was put together by lloyd Bayliss and as such he is the team captain, the rest of the team are made up of (in no particular order):

me
Chris Unsted
Michael J Elvy
Ian Treasure
Mike Larner – always has The Mo but has kindly shaved it off and is growing it again for this good cause.
Mark Edwards
Ian Smith
Graham Atwick
Christian Dadswell   
Adrian Morris
Neil Carless

We hope to raise as much money as possible for Movember and Men’s cancer charities, if you would like to support us and have a laugh at our new facial master piece’s then follow along here, I will try to provide weekly updates and pictures here.

If you would like to donate then you can do so here: http://uk.movember.com/mospace/570732/