TSQL Tuesday #85 Backup, Restore, Repeat

This month’s T-SQL Tuesday is being hosted by Kenneth Fisher (t | b). T-SQL Tuesday (#TSQL2SDAY) is a blog party founded by Adam Machanic (t | b). Each month a member of the community hosts the party and selects the topic for us to write about.

This month’s topic is backup and recovery. Backups are one of the most common things DBAs discuss, and they are at once one of the simplest and most complicated parts of our whole job. So let’s hear it for backup and recovery!

tsql2sday150x150

 

Backup

As SQL DBAs, most of us are tasked with setting up database backups.  There are many ways to skin a chicken and just as many ways to back up your SQL Server databases.  You can use SQL Server backups, TSM, Backup Exec, or many other tools.  And within each of these options you can create full backups, transaction log backups, differential backups, and bulk log backups.

It is almost an art setting up the appropriate backup solutions for your SQL databases.  Each server, instance, and database is unique and backup solutions need to be created according to the data needs.   Does the data change a lot?  How critical is the data?  Will you lose business if you lose data?  These are just a few questions DBAs address when setting up their backup plans.

 

Restore

Some DBAs spend a lot of time developing and tweaking backup schedules for all of their databases.  However, creating the best backup schedule will get you nowhere unless you periodically restore your databases and verify your backups.  You must test restoring your backup files on a regular basis to make your backup solution is complete and that you will be ready whenever a disaster happens.  Would you replace the batteries in your flashlight then not turn on the flashlight to make sure it worked?  No…probably not.  Verifying the restoration of your database is like turning on the flashlight.  It is the final step in the backup process but a step that many DBAs do not complete.

“Your backups are only as good as your last restore.”

You might have 30 days of backups (full, transaction log, differential, etc) on hand but when the time comes that you need to restore a database, if there is a problem, the number of days back you go will be insignificant.  All you are doing is spending money on storage for something that does not work.  Turn on the flashlight, take that final step.

 

Repeat

You need to schedule your database restore testing throughout the year, restoring your databases once every 6-12 months.  Your database restore test schedule will have a direct correlation to how critical the data is to your business.  A good starting point is to test each production databases at least once every 6 months, but the schedule you create will depend on the importance of the data and if a loss of data would create a loss of business.  I have heard of some DBAs who test the database restore every two weeks for hyper critical databases.  Set up a regular schedule according to your needs and continue testing.

It is hard to balance the time spent restoring databases with your other daily tasks, so create a recurring schedule that makes you, your boss, and/or the data owners comfortable.  “The restore worked two years ago when I tested it” or “the backup ran last night and we have backups for the last 30 days” probably won’t go over well with your boss when you are in the middle of a disaster and you can’t restore the database from the backup.  A schedule should be developed, agreed upon, followed, and documented.

Restoring data is the job of a DBA.  A good DBA will verify all of the steps for data backup and recovery.  A great DBA will have a schedule for verifying the steps and will continuously test their database restores and prepare for that day we all hope will never come.  Or, as I like to say, backup, restore, repeat.

T-SQL Tuesday #84: On the Doorsteps

This month’s T-SQL Tuesday is being hosted by Andy Yun (t | b). T-SQL Tuesday (#TSQL2SDAY) is a blog party founded by Adam Machanic (t | b). Each month a member of the community hosts the party and selects the topic for us to write about.

This month’s topic is growing new speakers. It is an opportunity for experienced speakers to pass down some lessons learned or advice to the #sqlnewspeakers. It is also an opportunity for those who have not spoken to begin walking down that path by writing about their plans.

Approaching the Door

Today is an important day in the history of the United States.  It is the first time this country has the chance to elect the first female president.  Why in 2016, 96 years since women have had the right to vote, are we just talking about this?  And why are women still considered inferior in the workplace?   We are on the doorsteps of change.

Women make up over half of the workforce yet there are still discrepancies in pay and discrepancies in the number of women in certain industries with technology as one of those industries.  Did you know that over 55% of occupations in the workforce are held by women but they only hold around one-fourth of the jobs in technology.

It is no wonder that the number of women in technology is not proportionate to the women in the workforce.  All you have to do is look at college degrees given out.  In 2010, 57% of college graduates were female but only 14% of computer science degrees were received by women.  This number has declined over the last 30 years…in 1985 37% of undergraduate degrees were earned by women.

Luckily for me, I have had some great role models in my life that have encouraged me throughout my career.  It started with teachers and professors and has continued with co-workers and bosses, both men and women.  But sometimes my role models have been silent role models.  Not people that I have contact with but women who have excelled in their industry and who have shown me, by example, what it takes to be a successful person.

Knocking on the Door

I see that within SQL PASS, an organization created to support data professionals.  I have been a member of PASS for a several years, but just started getting involved over the past four years.  It first started with attending SQL Saturday events.  During my first SQL Saturday event I attended a WIT open discussion session where women discussed issues they were having at their workplace.  It helped me see that I am not alone.  None of us are alone.  Some of us have the same struggles at work.

And like everyone else, we get busy.  I still attended SQL Saturday events and my first SQL Summit, but I was still a member on the outside, watching and observing others.  What I saw inspired me and got me motivated to step up my game.  Last spring I attended Mickey Stuewe’s presentation on being a role model for women in tech through blogging.  Her presentation inspired me.  I started a blog – with not many posts so far.  It is that busy thing.  I also volunteered to work with the WIT virtual chapter.  They needed help managing the SQL Saturday calendar which seems like a simple thing, but this has helped me in so many ways.

First, I chat periodically with Kathi Kellenberger and Rie Irish, two great women in our community.  This is a simple thing but I respect these two women and the things they do and represent within our community.  I have started to watch how they are leaders in our community.  They are leading by example.

And second, because of the data geek that I am, I stated collecting statistics on women presenters at SQL Saturday events.  As the year went on and I gathered more information, I was continued to be inspired by the number of women who present at SQL Saturday.  Some present just locally while others travel (some even internationally) and present at several different SQL Saturday events.  Women have been SQL Saturday presenters 217 times in 25 different states since April 2016.

Kathi Kellenberger helped me get national data about SQL PASS attendees and I have started developing my SQL Saturday presentation about women presenters at SQL PASS events.  I am nervous about presenting but I will have to get over that.  My plan is to start submitting my outline to SQL Saturday events starting in 2017 and hopefully I will see you at a SQL Saturday event next year at one of my presentations.

Pushing Open the Door

Maybe, someday, I will be the person that inspires a woman to get involved, to be more.  If we all get out there and set the bar high for future generations, they will rise up and meet that challenge.  Maybe, someday, we won’t have to have conversations anymore on how to get more women into the tech industry. This is my first ‘real’ blog, my first T-SQL Tuesday, and the first steps through the door.

tsql2sday150x150