DBA Syndication

Estimated Completion Time for Backups and Restores

I’m in the middle of a database migration and thought I’d quickly share a script I threw together to show estimated time of completion for a database restore in progress on SQL Server. The script will also show you estimated time for database backups to complete as well.

Please don’t take this script as gospel, the best way to truly know how long restores will take is to actually perform a restore! Remember folks:

Backups are worthless, restores are pricless

estimated_completion_time /60/1000 as estimate_completion_minutes,
--(select convert(varchar(5),getdate(),8)),
DATEADD(n,(estimated_completion_time /60/1000),GETDATE()) as estimated_completion_time

FROM sys.dm_exec_requests where command = 'BACKUP DATABASE' OR command = 'RESTORE DATABASE'


NOTE: Due to the fact this script uses DMV’s, will only work on SQL Server 2005 and higher

DBA Syndication

Exceptional DBA of the Year 2010 Finalist!

This post is a tad overdue as the public announcement was a few weeks back but it’s been a topsy-turvy last few months for me. Anyhow this is just a quick post letting you know how absolutely honored and excited I am to be among the finalists for Redgate’s Exceptional DBA of the Year 2010 award!

This year’s award has 6 finalists as opposed to the regular 5 finalists due to the high quality of nominations. I’m happy to say that I personally know two other finalists: Jonathan Kehayias (Blog | Twitter) and Ted Krueger (Blog | Twitter). Both men are SQL Server MVP’s, community speakers, bloggers and all-around absolutely exceptional DBA’s and people. Although I don’t personally know the rest of the finalists (Kevan Riley, John Burnette, and Tracy Hamlin) I’m sure they are equally awesome given their nominations as well. I wish everyone the best of luck and encourage you to go to , read everyone’s profile/bios and vote.

Articles about the award:

CNBC – Voting Opens for Exceptional DBA of the Year

Steve Jones – Who will be the Exceptional DBA in 2010?

Ted Krueger – Being a Finalist for the Exceptional DBA of the Year

Brad McGehee’s e-book – How to Become an Exceptional DBA (free)

Brad McGehee – Vote for the Exceptional DBA of the Year

Josef Richberg – On Being the 2009 Exceptional DBA

Advice DBA SQL Server Syndicated Syndication Tips

Starting the SQL Journey: Part II

So in my last post I talked about my personal journey. In this post I’ll go step-by-step what I did to help along the path of learning all this SQL goodness. 

Tip 1 – Crawl Before You Walk…

Don’t know what a SQL statement is? Think T-SQL is an alternative to Coffee-SQL? Fear not, like everything else in this crazy world there’s tons of resources to learn from. One of the first places I learned anything from was W3 Schools website. The site is more aimed at web developers but they have a section for learning SQL (note: SQL is NOT SQL Server. SQL is a language, SQL Server is a product). There are also numerous other websites that teach SQL from the ground up such as SQL Tutorial or SQLCourse. A quick Google search will get you a plethora of options.

Tip 2 – Choose Thy Path!

Moving on from learning basic SQL syntax its time to learn your product. To learn by theory is one thing but its another to have hands on experience with the tools and actually see what a query result looks like and what not. Now I realize that I’m a SQL Server guy but I’ll be fair and list several vendor options. These are all the free editions of the respective platforms:

While I gave several options, this blog is SQL Server-centric so my examples and walk-throughs will keep within that realm. Which brings us to the next step…

Step 3 – Don’t Pigeon Hole Yourself, LEARN EVERYTHING!

Ok maybe not everything but you get the gist. This tip not only applies to learning your specific product but pretty much anything. Just because you’re a DBA doesn’t mean you shouldn’t/can’t learn some basic web development so you know what’s going on on the other side of your queries and vice versa. One of the things that allowed me to reach my current position is that I was always looking to learn more, more, more. Yes, I’m a SQL Server guy but what’s Oracle? How’s it work? What are the differences between SQL Server and Oracle? What else is out there? Even within SQL Server you have so much to learn than just basic server setup. There’s not only the administration piece but there’s also performance tuning, all the business intelligence pieces and the wide world of development and much more. I personally ended up going down the DBA track myself but I still like to play around with the Business Intelligence pieces like Reporting Services and SSIS since they’re interesting pieces unto themselves and work-wise I’m a better employee and professional if I’m able to understand all the pieces of the puzzle.

Tip 4 – There’s a Community, Make Use of It

One of the best things I ever did was start attending user groups. My first experience with them was with the Tampa VMware User Group community. I lucked out since my manager volunteered to be the group’s leader so meetings were held in our offices. The meetings were useful since you got to meet others in the community who made use of the same technology in different ways. Getting to meet others and swap stories was a really cool experience. From there I learned about the local SQL user groups (SQL Server and the BI group) and started attending those. Lately I’ve been branching out more in to the community by making use of social networking tools such as LinkedIn and Twitter. I’ve also started contributing to the community by starting this blog. I can’t tell you how much more satisfying experience it has been, for me anyways, to really be actively involved in the technical community.

Tip 5 – That Guy Seems Smart, Let’s Ask Him!

Before I started getting actively involved with the community my primary objective was just to learn, learn, learn! In doing so one of the first things you’ll learn besides the topic you’re focusing on is who are the people in your field who are the respective experts. For instance it was a SQL Saturday event that I attended where I first learned about Brian Knight and how he was one of the best SSIS gurus around. So from then on whenever I needed to learn something related to SSIS I would defer to his blogs and his recommendations. I’m sure everyone has their own methods of learning from others but I just wanted to share my methodology. Another method that pays off is finding not only those guys who know their stuff but are also entertaining (that’s how I discovered Brent Ozar and SQLBatman).
Tip 6 – Never Stop Learning
This week is the SSWUG Virtual Conference and one of the great things that I’ve witnessed is that even the field experts are always learning something new from everyone else. In my opinion the one greatest thing to move forward is the willingness to always keep learning. And almost as important is this quote I heard once: “The ability to succeed is directly proportional to your ability to ask for help.”
So that’s pretty much all I can think of for now. Feel free to add your own tidbits and advice in comments below!

DBA SQL Server Syndicated Syndication Tips

Starting the SQL Journey: Part I

odysseus Recently at the VMware user group meeting I was approached by someone I used to work with. He worked in a non-IT role at my previous job and at his new job he was getting more involved in technical roles. He was attending the VMware meeting in order to understand virtualization better and expand his understanding of the technology. A question he posed to me was “So you’re the DBA at the hospital? How did you get started?”

So this entry will be two-parts, the first addressing how I personally got started and second will be a few tips for someone just starting on their path to follow.

Personally I fell into the database administration role due to my formal education background. In college I had taken some database courses. Originally I thought I would pursue a web development career so I was familiar with creating a web application with a database back-end. Fast forward post graduation and I had no .NET experience which was what the industry was calling for and I couldn’t find a job. Eventually I landed a role as a desktop technician for the Southwest Florida Water Management District. While in that position I learned that the one guy who held my position previously was the one doing the SQL Server administration and had a similar background to mine. Due to this fact I was named his secondary. It’s here that I got my first taste of the administrative side of SQL Server. I learned the basics of the SQL Server architecture,

As time passed my hunger to learn more than just how to do backups grew. Aside from asking questions of my fellow administrators I took to the web and read anything and everything I could. Another important step I took was joining up with the local SQL User Group. This allowed me to see not only what others were doing with SQL Server but it was my first experience with the SQL Community which was key in my journey. Attending the meetings grew into attending any event I could be it a paid training session my company allowed me to go to or any free event I could like SQL Saturday to help me expand my skills.

Eventually I moved on to my current position where I’ve managed to leverage some more advanced SQL DBA skills as well as taken on new challenges such as Sharepoint technologies.I continue using the same methods to learn and grow as I did when I started only now I’ve added some new tricks such as leveraging the power of social networks. In my next article I’ll go in to more detail about each step.

So how did you start your journey? I’ve never done this yet so I’ll try this calling out thing by tagging some of the people that have helped me out through their work. Everyone else feel free to leave your stories in comments!

Brent Ozar
Pinal Dave
Jonathan Kehayias

Update: Part 2 of this great adventure
Databases DBA Rambling Syndicated Syndication

Hatching the SQLChicken

Hello world! Sorry, just seemed like the appropriate way to kick off this blog. If you’re reading this you probably Googled technology, sql and chicken which makes me think you’re a mad scientist (and that’s awesome), you’re looking to cure your insomnia or you got rickrolled on Twitter to get here. Either way thanks for reading!

As for the moniker I’ve decided to take a page from SQLBatman and SQLFool (both awesome SQL bloggers for those who don’t know) and create an alter ego for my online presence in the community which is memorable. Why SQLChicken you may ask? Well for one its easier to remember than my real name and two I have a rubber chicken hanging on my wall that we in the office squeek every time something goes down. Some days its quieter than others…*le sigh* The chicken was a gift from my uncle-in-law who gives them out to people who will appreciate them. Obviously he knows me well. Also it allows me to make quirky, cheesy puns like the title of this article. Boo yah – two birds, one stone…errr egg? Ok, I’ll get better at this…hopefully. I also have to give a special thanks to Brent Ozar of Quest Software and SQLServerpedia for writing a great starter guide for tech blogs. I highly suggest you check it out!

A little about me: My name is Jorge Segarra. I work for University Community Hospital in (mostly) sunny Tampa, Florida as a SQL DBA and system administrator. I have a beautiful wife and some four-legged children. Yes they’re pets…damn that probably sounds weird too…we have 2 cats and a dog. There, that makes me look a little more sane and not like I have mutant children we imprison. I’ll shut up now. You can follow me on Twitter, my newest tech addiction, at

Anywho, I’ll be blogging about mostly SQL-related stuff but also anything in technology that tickles my fancy at the time. Hopefully you find this blog somewhat interesting, entertaining and useful!