Monday, June 22, 2009

Spend a month with me on my deserted island

I was tagged by Grant Fritchey for this latest viral quiz.

I welcome him to come visit my current home state anytime. I've been having so much fun at work lately and trying to play when not at work, that I just barely got to answering the quiz.

Here are the Quiz details

“So You’re On A Deserted Island With WiFi and you’re still on the clock at work. Okay, so not a very good situational exercise here, but let’s roll with it; we’ll call it a virtual deserted island. Perhaps what I should simply ask is if you had a month without any walk-up work, no projects due, no performance issues that require you to devote time from anything other than a wishlist of items you’ve been wanting to get accomplished at work but keep getting pulled away from I ask this question: what would be the top items that would get your attention?”

This is an interesting little question. What would I do if I could do whatever I want? Let's assume that I have a brain lapse and do not take any of this time to enjoy the island i'm on. Nor do I decide to spend any time with my family, as I assume that I am alone here. for some reason, all that I want to do is work. Now that we are in the correct frame of mind, let's proceed.

One of the things that I want to do more of is write. It's why I blog, but I often don't take enough time to blog/article/so on. Given time, I'd like to spend more time doing this task. However, I know I would not be able to spend the entire month doing this. Let's say that I would carve out some needed time to do this task.

When the "fit hits the shan", I have often felt unprepared with my scripts and tools to dig into the source of the problems. I have built quite an arsenal of favorite scripts that assist me in this endeavor. But I do find myself adapting them to situations on occasion. I would like to spend some time cleaning up these scripts, making some more, even making some other tools/apps/and so on. Prepping these items, documenting them, practicing with them, are all valuable ways to spend my time.

We use a third party replication tool called GoldenGate. I have dealt with this tech a lot, but not on a very deep level yet. I would love to spend quite a bit of time digging into the tool. Making some new tools that interfaced with it, to gather specific statuses, perform pre-determined tasks. There are ways that I would like to make our jobs easier when we deal with this tech that we currently do not have. Spending time with this task would ensure that I have more time in the future.

Learning new things. I would love to learn some new things that I simply have not gotten under my belt yet. Powershell. DMV's. New features of 2008. Performance monitoring. Basically, all the things I dont know yet. This list is pretty massive, so I should simply take it one item at a time, and get one under my belt as it comes along.

The list above is obviously an odd one, with distinct items that have little cross-over. I would spend a bit of time on each. In reality, I should apply percentages to each, and be anal about how much time I do spend on each, to maximize my effectiveness. Or maybe, each day, i'll simply work on whichever one I want. after all, its my list, my priorities and my desert island.

I will tag the following fine folks to continue on with this viral storyline.

Andy Leonard (@AndyLeonard)
Chris Shaw (@SQLShaw)
Pat Wright (@SqlAsylum)

Monday, June 15, 2009

What I Learned at PASS

There’s a contest going on at PASS looking for answers to “Best Thing I Learned at PASS”. I have been busy enough that I kept putting this on the back burner. But it's time to put in my 2-cents.

Since the contest has a size limit, I am partitioning the story below from the rest of this blog entry.

Contest Entry starts here

Let’s start at the beginning. I wanted to learn more about SQL Server, and found a local User Group, and attended.

After a few meetings, I got to know a few people, including the President. Having these contacts, and being able to ask questions of these local ‘knowledge stores’ when I needed help was priceless. If the story ended there, it would already be a success story. I had networked and learned. I was a better DBA for it.

But that’s not the end. The President told me that I should go to PASS. Since I trusted him already, I went. My family came with me to Florida, and went to DisneyWorld, as I went to PASS. I remember being alone with people all around me. But I soon noticed tons of people, just like me, wanting to learn. During the conference, I saw a few people that I knew, and recognized some names from books I had read. Soon, I realized that all the people attending and speaking, were just like me. This is the 1st great thing that I learned; there are no experts that are better than me, they are people just like me, they just learned this stuff earlier. Now they are sharing with the rest of us. I too can learn what they know. The quantity of knowledge and contacts I have gained because I attended PASS cannot be measured. And that’s why we are all here at PASS. To learn and to network.

Contest Entry ends here

I just wanted to say a few more words in regards to PASS summits that wouldnt fit in the contest.

I have been to many PASS summits, as many as my employer has allowed. Some times, my employer has not allowed it. This has been a source of frustration to me. This annual event is where I get to join up with others of my kind, and learn from them. This has increased my knowledge so much. I hope that i get to go this year, and in future years. Regardless of attendance, I am an avid volunteer in various pieces of the PASS puzzle. This volunteerism gives me a satisfaction that i cannot gain elsewhere, especially at work. Its a great opportunity. All should attend and learn and network and better themselves. Then return and repeat.

Monday, June 08, 2009

Turning off / on SQL Server Agent

Today, i was writing a script to detach and attach some databases. We have a set of dbs that are in 2 modes now, with 2 copies of dbs to support those modes. I needed to quickly be able to 'toggle' between them. In 1 mode, the SQL Server Agent needed to be disabled, while in the other mode, it needs to remain on.

So, I searched my local drive for a solution, some script or document. Nothing.
I turned to google. Simultaneously turned to Twitter. I ended up at SQL Server Central, and found some folks talking about it.

Ultimately, i opened up Profiler and turned a local machine db's SQL Agent on and off, while tracing the activity. After a few failed attempts, i narrowed it down to these pieces of code.

EXECUTE master.dbo.xp_sqlagent_monitor 'STOP', NULL, 0, 1
exec sys.sp_configure @configname = N'Agent XPs', @configvalue = 0
reconfigure with override

EXECUTE master.dbo.xp_sqlagent_monitor 'START', N'', 1
exec sys.sp_configure @configname = N'Agent XPs', @configvalue = 1
reconfigure with override

I would execute the off, while Agent was on, and then have to refresh SSMS to see the change. Sure enough it was off. I'd then execute the on code, refresh, and saw it was on. Viola! I exclaimed in a loud voice my manliness and heorism to all around me. Thats when a small voice from the next cube reminded me that the server I was to 'toggle' was a Cluster, and that the SQL Agent needed to be altered from Cluster Administrator.

Oh well. I learned something. Now I want to know if it will work with Clusters. But i do not have the means to test that thought, since the box I was toggling is live, and i shouldnt be testing on it. Someday, I'll get a better test, or find out the answer, and post it here.