Tuesday, April 9, 2013

T-SQL Tuesday #41

T-SQL Tuesday

T-SQL Tuesday is a rotating blog series brought to life by Adam Machanic. Basically, a different person is chosen to host the topic each month. We all participate by writing a blog post on that topic. And slowly world peace ensues.

How I Came to Love Presenting

This month the host is Bob Pusateri and the topic is how did you come to love presenting. In his invitation, Bob laments the fact that is has been almost two years since the last time he hosted T-SQL Tuesday.

Well, here I am lamenting the fact that it has been almost two years since I posted on T-SQL Tuesday. In fact, the last time I did it, he was the host. I guess there must be something about Bob.


Drama Masks
For me, everything began with Theatre. All through middle school and high school I did Theatre; I even did a little in college. When I took my sabbatical to become a teacher for several years, one of the subjects I did was, yeah you guessed it, Theatre. I helped the Drama teacher run the department, put on plays, and did a few plays with the kids.

Tons of fun.

There is something really cool about taking on a role and letting it consume you, motivate you, and drive you to new places that you didn't realize were inside you. That, and the cast parties are lot's of fun.

I also did lots of crew; set building, lights, sound, etc. For my money, the best troupes are the ones where the cast does crew as well.

SWT Computer Club

College - The best four or five years of you life!
I went to college at Southwest Texas and started off as an Anthropology Major / Music Minor. Somewhere along the way, I was seduced by the dark side of Computer Science and endless fun of flame wars on the university's mainframe message boards.

I became involved in the Computer Club and one year they made me the President. As part of this, I was the public face of the club for several years. I would organize and run the meetings, trick people into paying club dues, throw a few parties, and cajole speakers to come. One time we got Richard Garriott to come!

Really cool guy...


Spicoli and Mr. Hand
While in college, I also worked as a Teaching Assistant. I taught the lab sections of CS1308 - Intro to Computer Science and CS3409 Intro to Computer Architecture.

At another point in my computer career, I took a sabbatical from IT and became a high school teacher. I taught Computer Science, Math, Robotics, and Theatre. I also helped found Akins New Tech High as a school within a school for AISD.

I tell ya, hanging around kids, you will never feel so old and so young all at the same time.

SQL Server

Now that I'm all grown up, I work with SQL Server; focusing on areas such as Clustering, Indexing, and Troubleshooting. One of the things that has really inspired me in my career is the SQL Community. It is so vibrant, welcoming, and supportive. Once you start getting involved and meeting people you realize you are part of a growing family who will help you anytime you need it, provide mentoring to help you grow, and an outlet for you to give back to the community that gives so much to you.

I'm talking about your local  SQL Server User Group and SQL Saturday! Oh, and also that little thing known as SQL PASS.

Before I discovered these, I wasn't very happy with how my career was progressing, and not even sure I wanted to continue working with SQL Server. It was totally random that I learned about my user group, CACTUSS, and even more random when I learned about SQL PASS and SQL Saturday.

I attended a meeting, then another, then another, and pretty soon I started to realize that I was part of a SQL Family who wanted to help me fix my career and watch me grow.

After a while I took the plunge and signed up to present at one of the monthly meetings. I was a little nervous presenting to a room full of experts ready to pounce on every little mistake I made. But I soon realized that everyone there had the same questions and experiences that I had, and couldn't have been more supportive.

I was hooked.

So I reworked my presentation, adding stuff, removing stuff; and then presented it to another user group. During that time I attended my first SQL Saturday in Houston. Simply amazing. I couldn't believe all these folks were giving up their weekends to put together free training for me. Très cool.

SQL Saturday #97 - Austin
A few months later, Austin had its inaugural SQL Saturday. I immediately submitted my session, and I guess the judges were sleeping or drunk because they picked me. Now the pressure was really on. I reworked my session a few more times and presented it at a user group again.

When the big day came, I couldn't believe I had a full room and people asking questions; and no one threw tomatoes at me. After I finished, I had several people hanging around asking questions about my session and about problems they were experiencing in their environments. I traded emails and scripts with a few folks and even ended up hiring one of them the following year.

Get Out There

Get Out There
If you're looking to get more involved in the SQL Server Community there is no better way than to start attending your local SQL Server User Group and sign up to give a presentation.

Don't worry about being a beginner. I think you will find the User Groups to be appreciative and supportive environments where you can hone your presentation skills and your technical chops.

You might even give your career a boost to boot.

Monday, April 8, 2013

Looking in the Backup History

The other day I had a developer request a refresh from production from a date in the past. It seems they were testing a bug that cropped up and needed to replicate the way the system looked on a particular date.

Since this was beyond our local retention policy, we needed to restore the backup file from the virtual tape library.

Time to make friends with the Backup Administrator...

You want to tell your Backup Administrator the name of the server and the file, along with the date of the backup. This last part is slightly tricky. It is fairly typical for the file you are looking for to be on the following days' backup.

For example, if you wrote a SQL Backup file on January 1st, it probably isn't backed up until January 2nd. You may want to spend some time with your Backup Administrators to understand how your backups work and what the procedure is to get a file restored.

So how do you find out what the backup file was called two weeks ago? Query the msdb database, of course.


-- look for a backup filename from the past...

select top 30
s.database_name, s.backup_start_date,
--, s.*
--, m.*
from msdb.dbo.backupset s
join msdb.dbo.backupmediafamily m
on s.media_set_id = m.media_set_id
where s.database_name = 'YOUR_DATABASE_NAME_HERE'
and s.type = 'D'
order by s.backup_start_date desc


This query will return the names of the FULL backup files for the past thirty day. You can modify this query as needed.

Backup History

Monday, April 1, 2013

SQL Server on Ubuntu

I'm excited by the announcement, Microsoft SQL Server is finally supported on Linux, specifically the Ubuntu distribution. Apparently, this is in response to the Chinese government's choosing of Ubuntu as the state-sponsored operating system of choice.

While the Minister of Technology initially looked at using MySQL in conjunction with Ubuntu, ultimately he wanted a database platform with the best support model, sources close to the minister are quoted as saying.

Then he tried looking at Oracle, but apparently the proper price point could not be derived. 大象爆炸式的拉肚子 (Da-shiang bao-tza shr duh lah doo-tze) which roughly translates to 'Costs too much, does too little' the minister was overheard saying during lunch recently.

Chaz Brockwell, lead user experience developer for the Silicon Valley start-up SighberCool exclaimed, 'This is the biggest development in the past eighteen months. Finally, Microsoft is opening up their flagship product to the rest of us!' His company is working on a new wearable-computing device that combines Ubuntu, SQL Server, and the iPhone.

The NASDAQ is up 17 points today in light trading, while the Hang Seng trading down.

SQL Server on Ubuntu