growled on Monday, January 23, 2006 4:21:56 AM (Pacific Standard Time, UTC-08:00)
barked at sports

Imagine that, the Seattle Seahawks are on their way to their first Superbowl appearance. Suh-weet! =)

I'm no football fanatic or afficianado, but I did catch more than half of their games this season and the past two playoff games. In my humble opinion, they're playing extremely well and like a cohesive unit. I think they have a very good chance at beating the Steelers in two weeks. Go Seahawks!

Let me also add that the ONLY way to watch sports is with a DVR (digital video recorder)! I have 3 ReplayTV's in my house and they're awesome. I was able to rewind the cool plays (like Wallace's catch or Tatupu's interception) and even hit pause to make some food. I've had them for more than two years now and cannot even imagine watching TV without them now. If you don't have one (ReplayTV, TiVo or another brand) then go out and buy one now!

~tod

growled on Wednesday, January 18, 2006 5:26:54 AM (Pacific Standard Time, UTC-08:00)
barked at ramblings

Please bear with me on this personal rant....

I love music, but I'll be honest...I'm no afficianado. I just know what I like. Mostly that consists of various forms of rock (alternative, hard, classic, metal, etc.) with some Blues and Pop rock thrown in for good measure along with just a pinch of Country [yes, I'm a closet Country fan].

I moved to Seattle, WA in June of 1995 during the wake of Pearl Jam's Vitalogy [not their best work, but it still rocked] and little more than a year after Kurt Cobain had committed suicide [only 7 months after Nirvana released their powerhouse In Utero]. Soundgarden had released Superunknown a year before [who of you have not rocked out to Spoonman?] and Alice In Chains had recently released Jar of Flies. Not too mention the classic artists from the area like Jimi Hendrix and Heart! My point? It was a damn fine time, in fact an awesome time, for [alternative] rock in Seattle.

As far as radio stations went, my top choice was always 107.7 KNDD The End [alternative rock] and not too far behind was 99.9 KISW [hard rock]. A few others came and went over the past 10 [almost 11] years, but those two have been staples. I could always count on The End to give me the staples of rock that I loved while also showcasing new and upcoming artists [local, national and international]. In fact, when I was working day shift and driving in the early mornings I primarily listened to Andy Savage (with Jodi and Steve the producer).

Then a little over a year ago KNDD decided to fire half of their DJs and "update" their format. Andy Savage was let go and the afternoon guy, DJ No-Name [what a stupid handle...and no, I never cared for him] took over the morning show. Andy and his crew were pretty funny, but along with that they were really in tune with the local music scene and were always promoting our Seattle bands. So replacing them irritated me, but the thing that really pissed me off is that they f'd up their music format. They started focusing more and more on obscure and esoteric alternative music...I wouldn't even call some of it rock. I couldn't tune them in to hear some U2, No Doubt, Weezer, Nickelback and then a little [insert latest cool rock artist here]. I had to listen to 4 or 5 songs that I'd never heard of [and honestly didn't care too] before I'd even hear an artist that I knew...and I don't live in a vacuum!

The final straw came yesterday morning as I was driving into work [which isn't normal for me because I ride a vanpool and we generally listen to light music that everyone agrees too]. As 6:00 AM rolled over on my clock I heard them announcing the Adam Corolla show weekday mornings. WTF? The station that used to have an awesome handle on the local music scene has now gone the route of syndication. It's a sad, sad day for my radio...because I think I'll retire that #1 memory location. Or I could do the unthinkable and reprogram it to something else.

~tod

growled on Thursday, January 12, 2006 4:42:30 PM (Pacific Standard Time, UTC-08:00)
barked at code [.net]

Yesterday I was putting the finishing touches on a .NET web service I wrote in C# which included logging events to the Windows Application log (using Server 2003) for exceptions [and a few informational things]. At first I used the standard nomenclature:

"EventLog.WriteEntry(source, message, EventLogEntryType.Error);"

Upon accessing the web service from another app I was a bit surprised to see this error:

"Cannot open log for source {0}. You may not have write access."

After a bit of research online I found this forum entry (link) at dotnet247.com. The first reply is from a Microsoft VIP that references adding the string "(A;;0x0002;;;AU)" to the end of the existing CustomSD value in the registry key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Application. He included several links to MSDN that explain why.

According to this MSDN article (Development Impacts of Security Changes in Windows Server 2003) the short reason why my original code didn't work is that there were several security restrictions added to IIS6 in Server 2003. One of which was tighter ACLs (Access Control List) on the event logs to restrict what accounts can read and write to the logs (application, system & security). Each log's security can now be configured locally via the following registry values:

  • Application log = HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\Application\CustomSD
  • System log = HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\System\CustomSD

The CustomSD value uses Security Descriptor Definition Language (SDDL) syntax to apply the ACLs. SDDL uses ACE strings to translate the ACLs in the registry.

I prefer to know what exactly I'm adding to my code and what security changes I'm making so I disected the string "(A;;0x0002;;;AU)" into these portions:

  • A = Access allowed. This indicates the value of the AceType as defined here.
  • ;; = This is just a token delimiter, but I honestly don't know why there are 2 here and 3 before "AU"
  • 0x0002 = Permission to write log files. This is the log access mask which defines the type of access (read, write or clear) as shown here.
  • ;;; = This is a just token delimiter, but I honestly don't know why there are 3 here and only 2 before "0x0002"
  • AU = Authenticated Users. This is the SID string used to identify what users/groups are affected by the ACL as defined here.

Anyway, that's how to enable event logging for an ASP.NET application. Once I added the string "(A;;0x0002;;;AU)" to the end of the existing string in the CustomSD value of the HKLM\System\CurrentControlSet\Services\Eventlog\Application key my web service was logging away like a happy little camper. ;-)

~tod

tags:

growled on Wednesday, January 04, 2006 3:40:32 PM (Pacific Standard Time, UTC-08:00)
barked at code [t-sql] | coding | ramblings

The category "all in a day's work" is a fairly ambiguous description. I say it tongue-in-cheek though with a large hint of sarcasm and cynicism because when I think of the phrase it always brings to mind something [else] that f'd up [again]. That's just me though. ;-) So here we go...

We have a SQL [2000] stored procedure that [in a nutshell] coallates a butt-load of information, updates some summary tables for web presentation and then generates trouble tickets for problem issues. This stored proc had been working great for 8 months. No issues, no errors, no glitches. All of a sudden on 12.19.2005 it decided to start throwing an error while inserting rows into a temporary table created within the SP: "Internal SQL Server error. [SQLSTATE 42000] (Error 8624)" WTF? We hadn't made any code changes (SQL or otherwise) that affected this stored proc. One day, it just up and decided to stop working. Gooo-reeeaat. [groan]

Of course, one of the first things I do is a search of MSDN for that error. As you can see this is quite a common problem and the explanations cover a pretty wide area, but mi' compadre found an article that referenced the problem being caused by a join in a subquery on the original table. So she pulled that subquery out of the join statement, created a temporary table with the information and then added a join to the temp table in the original insert statement. It worked great for a week. Then [again] it just up and decided to stop working this past Sunday (1.2). Gooo-reeeaat.

At this point I'm kind of at my wit's end. My co-worker had spent a day researching this problem and finding the resolution while I was working on other things (just to be clear, she's smart as a whip and a very dedicated worker...so when she spent a day figuring out the problem I knew she wasn't just twiddling her thumbs during that time.). Unfortunately [for me] she was out yesterday which meant that I had to deal with the issue. After about an hour of playing around with the INSERT and SELECT statements I hit on something. Here are the facts:

  • The original stored procedure created the temporary table and then performed an INSERT into that table using a SELECT statement with several (10+) joins.
  • The INSERT statement was now consistently failing with the error: Server: Msg 8624, Level 16, State 1, Line x Internal SQL Server error.
  • The SELECT statement used for the INSERT would consistently work when run on it's own (not trying to insert rows into the temporary table)

Just for sh*ts and giggles, I decided to cut out the temp table creation and re-write the INSERT...SELECT...FROM statement to a SELECT...INTO...FROM statement so that the temporary table was being generated during the SELECT...INTO statement...and it worked...consistently! Weird.

I honestly have no idea why the SELECT...INTO statement works [for now] and the INSERT...SELECT statement doesn't [after it did for months]. It just doesn't make any sense to me because it's simply two different ways of doing the same exact thing. Kind of like driving to Sea-Tac...coming from the North you can take I-5 or I-405. Either one will get you there it's just a different route. Weird.

Anyway, a pretty typical [sh*t's broke again] day to start off 2006. :-\

~tod

growled on Sunday, January 01, 2006 2:36:13 AM (Pacific Standard Time, UTC-08:00)
barked at ramblings

It's New Year's Eve and here I sit writing a blog post. :-\ My wife went to the mall with her sister and our 15 year old niece for some 'girl time' this afternoon while I stayed home with our daughter. Actually, I'm well past the age where I need to go out and prove my virility by drinking heavily and flirting with hot chicks so I'm just fine spending some 1-on-1 time with my little girl at home. Also, I don't want to be on the roads tonight...too many stupid drunks out there for even the safest drivers to avoid.

Anyway, here's what I consider to be the best1 posts of justAnotherSDE after 12 months and 14,000+ page views in 2005. Enjoy...

See ya later 2005 and Happy New Year everyone!

~tod

1 'best' in this case is defined as what I consider to be the most interesting. Take 'em or leave 'em. ;-)