Tuesday, September 30, 2008

What happened to my profile?

When I arrived at work on Monday morning, I decided I should reboot my computer. I like to reboot regularly since that is what I always tell people to do when they call me with a computer problem. Well this time I made a mistake. When I logged in and attempted to work I found that my rights had been restricted and severely. I could no longer access my C drive and did not have RUN available. This was a little before 8:00. When the network admin came in, I put him to work on the problem. First he checked all the Group Policies that had been applied to my account and, of course, there was nothing out of the ordinary. Then he tried forcing a group policy refresh, and once again, no joy. Finally he logged into my PC and renamed my local ntuser.dat file and with a reboot I was logged back in, albeit without any of my personal settings as I had a new profile. It was about 11:00 then.

All this because I decided to reboot.

Friday, September 26, 2008

SQLSaturday #8 - Orlando

Just a quick note to remind you that SQLSaturday #8 is coming up in Orlando on October 25th.
Register for the event at http://www.sqlsaturday.com/register.aspx.

Some reasons to attend:
  1. I'll be there! Seriously if we haven't met we'll have the chance and I'll also be presenting one session, Getting Started with SQL Server Profiler 2005.
  2. It's free! You can't beat that price. Even if you can only make a few sessions the price is right.
  3. The speakers know their stuff! This is not a place where you only get theory. You'll see real-world examples and methods that work.
  4. You get to meet many experienced professionals who are willing to help you out and that you can help out.
  5. You are supporting local people. Most of the speakers are local professionals who are donating their time and expertise to help YOU! So help them out by attending and letting them know what you think.
  6. Networking, networking, networking. It's not what you know, it's who you know.
  7. Free stuff. Raffles for some good prizes and lots of books given out. I don't know what the prizes are, but there is always something like an XBOX given away.
  8. You'll learn something you can use. Last year I attended and learned how to use DDL triggers and more about performance tuning. I have used both in my work.
Hope to see you there.

Tuesday, September 23, 2008

Favorite blogs and why I read them

Over the last several months I have added to the blogs I read and I thought I'd share my favorites and the ones I find the most useful. I'll also share the newsletters and web sites I like.

Blogs:

It Depends - Andy Warren. This is not always a deep technical resource but there is helpful information on Professional Development, Speaking, and SQL Server. I like the fact that he posts often and that his posts are usually fairly short and to the point.

SQL Musings - Steve Jones. Another well rounded blog that has some personal, general professional development and SQL Server content. Again regular posts and not long.

Rock's Thoughts - Chris Rock. More of a .NET blog. I like Chris's writing style which is informal and usually entertaining along with informative. He shares real-world problems and solutions. He hasn't posted as regularly as he was, but when he does post it is worth reading.

Scary DBA - Grant Fritchey. Grant is a guy I have encountered in the forums on SQLServerCentral, and based on the quality of his answers, I started reading his blog.

Bart Duncan's SQL Weblog
- Bart Duncan. Good blog on msdn for performance tips.

In Recovery - Paul Randal. If you want to know about SQL Server Storage Engine and recovery techniques, this is the place to go.

SSIS Junkie - Jamie Thomson. A great blog on SSIS.

What do I look for in a blog? Regular posts, real-world problems and solutions, and a variety of topics. I'm not interested in BOL regurgitated and these blogs regularly provide information that I can use in my job.

Monday, September 15, 2008

Scripts on SQLServerCentral

I recently submitted a couple of scripts to SQLServerCentral and they have been published:
  • Who has accessed my 2005 Server - which queries the default trace running in SQL Server 2005 and system views to show what logins have been used to access your SQL Server.
  • Find Foreign Keys  - which queries the INFORMATION_SCHEMA views to return information about the foreign key relationships in your database.
I have to admit that I have not used the script library available through SSC and I probably should.  I am sure I have struggled to write a few scripts that are available there already.

Friday, September 12, 2008

Thursday, September 11, 2008

OPASS Presentation Follow up

Well, I got through my first technical presentation and overall I thought it went pretty well.
I have to admit I wasn't feeling great about it going in as I had practiced at home the night before and made some serious mistakes, but as my wife said, "Bad dress rehearsals usually mean good performance." I did not make any major mistakes and managed to keep the OPASS group interested. I presented on SQL Server Profiler, all my demos worked and I didn't pass out. Andy Warren, the OPASS president, is always trying to drum up and pump up local speakers, so after the presentation he gave everybody the chance to offer some comments and criticisms. Fortunately the worst comment was that I had mentioned that "I just learned this" a couple of times and as the "expert" I probably shouln't have done that, oh, and, of course, I used "um" a few times. The best comment was that the presentation wasn't dry and included a good amount of practical information and experiences along with theory.

I'm always nervous before I speak, but once I get started I relax pretty quickly and try to enjoy myself. Hey, the worst that can happen is that I look foolish. It's not like it's life or death.

Speaking, teaching, and writing are all great ways to learn. Of the the 3 I enjoy speaking the most, just not the preparation part. Writing can be a chore for me, but since I started blogging last spring it has become easier, and now I am also trying to submit an article at least quarterly to SQLServerCentral, my professional web site of choice. At the very least that helps me calrify my own thoughts on things and hopefully helps someone else as well. Something I have learned recently is that what is mundane and simple to me can be new and exciting to a lot of other people. So what keeps you from contributing your knowledge and experience to the community?

Friday, September 5, 2008

Presenting at Spetember Orlando PASS Meeting

I will be presenting on Profiler Basics on Tuesday September 9th at the Orlando PASS meeting.  The meeting starts a 6pm with pizza and networking and is located at the End to End Training offices.  Directions are available on the web page.

I'm pretty excited about speaking since I learned a lot preparing and think the attendess will as well.  This is my first time doing a technical presentation although not my first time speaking in public.

Hope to see you and meet you there.

Wednesday, September 3, 2008

Thankfully the backups were good

I got a call from our System Administrator this morning telling me that the main database for a financial system was suspect. In 9 years of working with SQL Server I'd only dealt with this once and that was last fall with a suspect msdb. The last time I had no backups of msdb so I had to rebuild it and then rebuild all the jobs. As a side note, I was not made aware of this key departmental SQL Server until after the problem. Needless to say I started gettting backups of the system databases. After this occurred we upgraded from SQL Server 2000 to 2005 and moved the databases to a true server in our climate controlled server room with UPS and generator power backups. It was a brand new server purchased in the 1st quarter of this year.

This time I had backups and had the database restored in under 15 minutes to a point withing 3 minutes of the failure. Unfortunately there were no errors in either the SQL Server Error logs or the Windows Event logs. We'll have to watch the server for errors as we go forward. This was also the first time I had run a point in time restore using the STOPAT parameter of the RESTORE command. I'm glad I was able to get everything up and running quickly after pushing to have the databases moved to a central SQL Server that I could manage and monitor.

After restoring I did a DBCC CheckDB which found consistency errors in an index on one table. So, before releasing the database to the users I dropped and recreated the index to fix that error as well. Again the first time I've had a consistency error to fix as well.

As you can see, even though I've been working with SQL Server for many years, there are still many issues I have yet to deal with, and, to be honest, I hope I never have to deal with anything more complex than I did today.

Linked Server Test

I recently found out that Microsoft had added a much needed component to linked servers in SQL Server 2005, sp_testlinkedserver. sp_testlinkedserver requires the @servername parameter and returns 0 if the linked server is available (success) and 1 if it is not (failure). I have seen several forum questions about how to check if a linked server is available and prior to 2005 you had to either check an error or a row count. This is a much needed improvement. Here's a link to the documentation of it: sp_testlinkedserver BOL.