Adding a logging file for TraceListener

Debugging the third-party apps I maintain has become more difficult since my organization is eliminating local admin accounts, and the application’s obsolete paradigm of saving log files in application folders (i.e. Program Files) is impossible in my environment, and also complicated because I must be a remote admin to use remote debugging, and my development system does not exhibit the same behavior and runs a different operating system. The app already uses TraceListener for live debug logging, and I need to configure a listener. Since major refactoring Shall Be Avoided, a golf clap for a return to remote debugging in log files :\


In code:  (Trace is in System.Diagnostics)

Trace.Listeners.Add(new TextWriterTraceListener(“foo.log”));

Trace.WriteLine(“Application started.”, “MyApp”);

Trace.WriteLine(“about to do stuff…”, “MyApp”);

(do stuff)

Trace.WriteLine(“stuff is done…”, “MyApp”);

Trace.WriteLine(“Application finished.”, “MyApp”);

foreach (TraceListener listener in Trace.Listeners)

Or a modification to app.config:

<trace autoflush=”false” indentsize=”4″>
<add name=”fileLogger”
initializeData=”LogFile.log” />
<remove name=”Default” />


See also:

Create a Logger using the Trace Listener in C#

I like the looks of this:

NLog, log4net, and EntLib are all noted as prepackaged logging systems by



Posted in Uncategorized | Leave a comment

Database unit testing resources

Not strictly a linkdump, but a list of resources for database unit testing.

tSQLt, SQLunit, DBunit, dbForge

Posted in Linkdump, Programming, SQL Server, System/DB Administration | Leave a comment

Linkdump: SQL Server security through ActiveDirectory Groups, ConnectionString encryption

I swear I have a post or linkdump on this. Log now, search later!

Securing SQL Server using ActiveDirectory:

Connection String encryption:






Posted in Linkdump, SQL Server, System/DB Administration | Leave a comment

SQL Server linkdump: Create login, Relocate database and best practices, corruption repairs***

SQL Server 2005 Setup Checklist Part 2: After The Install



When should you put data and logs on the same drive?


SAN Storage Best Practices for SQL Server

SQL University: The Basics of Storage


Posted in Linkdump, SQL Server | Leave a comment

replace 2008 sienna door cable  

How to Replace Power Sliding Door Cables on 2004-2010 Toyota Sienna

Posted in Uncategorized | Leave a comment

AL in a nutshell

You can get the Players Guide and the DMs Guide from I’ll explain (long, maybe TL;DR) and then at bottom summarize what you’ll need to know.

1. In AL, players control their character choices – race, class, background, feats, etc – and cannot be limited by the DM. They are allowed anything in the PHB, and some restricted things in one other book of their choosing. A.k.a, “PHB+1 book”. They can also pick a background out of any AL source. New players won’t be aware of the +1 books, and experienced players should be able to show you the book and explain the features in use. Anyone doing something you feel is strange should be able to back it up with documentation, or at your discretion you may choose to not allow it at your table.
a. Abilities are assigned with the 27-point buy system in the PHB, so a score range of 8-15, plus racial modifiers. The point-buy system generates what is called the Standard Array, which some people choose to use. (15 14 13 12 10 8, before racial modifiers.)
b. Hit points are max at first level (die type plus con mod), then each level thereafter the static number in the PHB (average + 0.5) plus con mod. For example, a rogue (d8 die type) with CON 14 (+2) starts with 10hp, and gains 7 each level thereafter.
c. Starting equipment/cash is not rolled; it is simply whatever is listed for background and class.
d. Factions are like political groups or unions or mafia, and provide free raise-dead services for their members until 6th level. (If raised this way, they get no experience and cannot replay that session.) There’s a free document on “Factions and the Adventurers League”, that describes them in depth. Their names, generally from “goodish” to “less goodish”: Harpers, Order of the Gauntlet, Emerald Enclave, Lords’ Alliance, Zhentarim.
e. Evil alignments are restricted. Only Lawful Evil, no Neutral Evil or Chaotic Evil. And LE only if you are in the Lords’ Alliance or the Zhentarim factions. The AL Player’s Guide has some rules about playing cooperatively; basically, you are expected to work together toward goals and not foil other players. The player who has a major problem with this may be asked to leave the table by the DM or organizer.
2. Characters are allowed to join to other tables/games out of sequence, so at the end of every session the DM must provide closure by awarding experience, gold, renown, and downtime, and also magic items if any were found. (The players decide who gains magic items, with the DM randomly determining in case of disagreement. Characters with lower count of magic items get first pick.) This also means someone may come in with a fresh character at the start of any adventure, even (with some DM discretion) in the middle of a multi-part.
a. If you are running a multi-part adventure, at your discretion you are able to require incoming characters to consume resources to reflect progress through previous phases.
3. Log sheets track each character’s adventures played and rewards gained. A DM is entitled to review log sheets of any character at the table. If the player is unable to back up their character or a feature with documentation on the log sheet or related certificates, the DM is able to disallow use at their table.
a. Players are not required to use the usual formats for character sheets or log sheets. This is an accessibility requirement for AL openness to all players, but it also means people can use smartphones or tablets or laptops at will. You don’t need to tolerate disrespectful behavior like playing Candy Crush, but you cannot restrict players to paper sheets either.
4. It’s nice when you’re specifically running DDIA05, which is primarily to introduce the game to players new to D&D. This makes things easier on you in a few ways.
a. DDIA05 takes characters quickly from levels 1 to 5 by using milestones. Any character is legal for play as long as they are levels 1-5, but not 6+.
b. The milestones assign pre-calculated experience (and, I think, also downtime and renown) for each part of DDIA05, but gold depends on player actions.
c. Most new players especially in DDIA05 should simply use pre-gen characters. Organizers typically provide stacks of pre-gens.
5. You gain rewards for DMing! AL PDFs typically state how much exp, gold, and downtime you gain as a reward “package”, or you gain per 2 hours played in the hardcovers. The package can be applied to any of your characters at any time. Track it on your own DM log sheet. The DM Quest Rewards list can be downloaded free from
6. In a convention environment, AL DMs must stick to a strict time schedule for their table. If that means cutting content short or eliminating encounters, do what you need to do to wrap up the table on time. (Personal note: When I’m running behind I try to cut out less important stuff in the middle, and leave the final encounter if possible. It’s the big finish, which everyone remembers.)
a. In that light, I try to let the players do the role-playing. DM roleplaying toward each player can take a long time and that often cuts down on the amount of content covered.

1. Encourage pre-gens for fresh players. If they make a character, they don’t roll anything.
2. Factions are how you save your game.
3. DMs end each session by awarding exp, gold, downtime and renown. And magic items.
4. Players decide where/what they will play next.
5. Use log sheets to record your rewards, as a player and as a DM.
6. Play nice! (This does not apply to DMs. Mwuhahaha.)
7. DDIA05 simplifies things for you.
8. Watch your time.

Posted in RPG / D&D | Leave a comment


This question came up at the office today:

Do you drink a lot

<awkward pause>

of coffee?

Posted in Office, Quote of the Day | Leave a comment

Removing Email from msdb Database

Posted in Uncategorized | Leave a comment

Linkdump: PowerPivot, Power View

Learning Path

For more information about PowerPivot, see
A Walkthrough of PowerPivot for Excel 2010
What’s New in Microsoft SQL Server 2012 PowerPivot

For more information about Power View, see
Introducing Microsoft Power View
Getting the Most Out of Microsoft Power View

For an example of content that leverages both PowerPivot and Power View, see
Tyler Chessman’s Excel 2013 U.S. Debt Workbook

For more information about Excel 2013, see
Excel 2013: Implications for PowerPivot and Excel Data Import Users, Part I
What’s New for Excel 2013 Developers

Posted in Uncategorized | Leave a comment

DAX formatter by Marco Russo and Alberto Ferrari


Posted in Business Intelligence, Linkdump | Leave a comment