Category: Blog

  • Windows 7 Run As

    One of the things that got us to switch OSes from W2K to WinXP when I was an administrator at JD Edwards was the Run As command. We had two accounts, regular and privileged, and needed to switch between them on a regular basis. I didn’t like the policy, but with WinXP, we had the “Run As” command when we right clicked things like the SQL MMC plugin, so we could access servers under the privileged account.
    In Windows 7, if you right click, you see “Run as Administrator”, which works great on my desktop. However what about a domain? What if you have two accounts and want to run something for testing or because you need different rights?
    I found a cool trick I wasn’t aware of since I haven’t needed it. If you hold down Shift when you right click the item, you get a new Context menu item. The Run as different user.
    ssms_runas
    Give it a try. I bet you find it handy.

  • Way Behind

    One of the things I have to do every month is process payments for the authors. It’s my job to get a list of payments over to accounting at Red Gate, and actually make the Paypal payments myself. Red Gate had some issues making payments in the US, so it’s fallen on my to handle it. Not a big deal, and I have a reminder to process payments the first week of the month, usually the 2nd.

    However this month I’m late. The reminder popped up Friday, July 2, but I was busy trying to get things scheduled to get out of town for vacation and didn’t get to it. Since I didn’t return from vacation until today, I’m way behind on getting payments out.

    That was my top priority today, and I’m hoping that Accounting will get my email tomorrow and hopefully get payments out quickly next week.

    This is one of those scheduled items that is important, and it always bothers me when I’m late. My apologies to authors.

  • Loss of Files Does Not a Suspect Database Make

    I saw a post recently by someone asking how to get a database to be suspect. They said they had added a data file and then remove it, but the database wasn’t suspect. This was true in the past (v6.x), but it seems that as the product has advanced, there are more database states, and things like a missing file do not force a suspect state.

    Instead the database on 2008 goes into an Offline status. Gail Shaw, who pointed this out to me in a blog, actually wrote her own blog on this topic, so I won’t duplicate the code.

    I stopped my local SQL Server, then renamed one of the db files as shown:

    suspect_a

    In essence, this file is “lost” to SQL Server, just like it had been deleted, moved, etc. When I restart SQL Server, I see this:

    suspect_b

    No way to expand out db2 here. If I look at properties, I see it in “Shutdown” status

    suspect_c

    Strangely, if I right click, I have the “Take offline” available, not not “Take Online”. If I click that, I get the database offline, but I cannot then bring it back online. It gives me an error, as it should since the files are missing. The error log shows the issues with

    suspect_d

    I can rename the file without taking SQL Server down, and then bring the db online. It’s the same as recovering this disk drive or fixing the file somehow.

    I’m glad this changed, since we should have more details about what happened, and a “suspect” database should be reserved for more serious issues. I think having this “shutdown” or “offline” is a better status.

    The databases status values are here: http://msdn.microsoft.com/en-us/library/ms190442.aspx

  • Why Work on a SQL Saturday?

    46729252[1] I was having a long call with Andy Warren (blog | Twitter), fellow founder of SQLServerCentral and SQL Saturday. We were talking about a few things that could be done differently with SQL Saturday and getting a little passionate about it. I stopped in the middle and thought for a minute, why am I so worried about this?
    I think the answer lives in Motivation 3.0, an idea put forth by a few people, but something I heard about from Dan Pink in his book Drive.
    We have things that we believe in, that we see as worth doing, and regardless of the compensation, we drift towards them and become much more focused when working on them.
    SQL Saturday, PASS, the entire SQL Server Community has somewhat become that for me. I’m driven to spend time trying to make it better, not because it makes me money, but because I believe in it.
    I want SQL Saturdays to be successful. I want them to train people to better use SQL Server. I want speakers to be proud of their efforts to help people. I want PASS to mean something to people’s careers, and help them. I want people to enjoy working with SQL Server, and use it to solve problems.
    It’s a bit of a strange feeling for someone that has typically been a capitalist, and looked to be more profitable in my endeavors each year. One of my concerns over SQL Saturday initially was the lack of a way to monetize the time spent on it by Andy.
    Now I find myself, happily, in the same boat.