Friday, January 02, 2009

See behind the SQL Server curtain with the Internals Viewer for SQL Server

Notes from SQL Server Premier Field Engineer - Internals viewer for SQL Server

“…

I am guessing I won't be making big news if I tell you that SQL Server database is just a collection of 8K pages. Each page serves different purpose. There are data pages, which hold actual rows in tables, there are index pages which make up index, SGAM/GAM pages which track extents, PFS pages which track free space on pages in the database, IAM pages, overfow pages and many others... … If all this sounds familiar, let me tell you that there is actually a better way :). Danny Gould developed an awesome tool Internals Viewer for SQL Server which integrates with SQL Server Management Studio and allows you easily drill into individual pages and better understand the relationships between them and overall architecture of SQL Server storage engine.

Give it a serious try and have fun playing and learning internals of Microsoft DBMS !”

CodePlex - Internals Viewer for SQL Server

“Internals Viewer is a tool for looking into the SQL Server storage engine and seeing how data is physically allocated, organised and stored.

All sorts of tasks performed by a DBA or developer can benefit greatly from knowledge of what the storage engine is doing and how it works

Features

  • Integration with SSMS (SQL Server Management Studio) 2005 and 2008
    • The application is installed as a SSMS add-in
    • Internals information integrated into the Object Explorer
    • Transaction Log viewer integrated into the Query Results
  • Allocation Map
    • Displays the physical layout of tables and indexes
    • Displays PFS status
    • Overlay pages in the Buffer Pool
  • Page Viewer
    • Displays Data pages including forwarding records and sparse columns
    • Displays Index pages
    • Displays allocation pages (IAM, GAM, SGAM, DCM, and BCM pages)
    • Displays pages with SQL Server 2008 row and page compression

…”

Sometimes you need to see behind the curtain and into the depths. This utility, for which the C# source is available too, sounds like it is one of those tools that can come in handy during a SQL Server spelunking expedition.

This utility also provides a working example of how to integrate into SQL Server Management Studio, so it’s like a two for one deal ;)

Free Download Manager (FDM) 3.0 Released

Free Download Manager - FDM 3.0 is released!

“Dear all! We have released Free Download Manager 3.0!
We are happy to announce that FDM is seeing the New Year in with a different look and feel of its own.

What’s new:

  • Manage your downloads in Apple Safari and Google Chrome, making use of the seamless FDM integration
  • Set priorities within a single torrent download, or even exclude separate files from downloading
  • Share your data with other users in a peer-to-peer network
  • Automate the virus checking of your downloads
  • New structure of FDM’s settings

Free Download Manager 3.0 is available for free download here. Enjoy! “ [Post leached in full]

Some interesting new features for a cool tool…

Wednesday, December 31, 2008

Top Office Templates – Not just business stuff going on…

Office At Work - Most popular templates in 2008

“So we've seen which how-to articles were the most popular this year, but what about templates? I'm a big fan of the free Office Online templates and regularly try to point out some of the hidden gems contained on the website, so I was really interested to see which templates have been downloaded the most over the year...

  1. Fax cover sheet (Professional design)
  2. Technology business brochure (2-pg, 11 x 17)
  3. Memo (professional theme)
  4. PTA agenda
  5. Chronological CV (minimalist theme)

…”

Seeing a PTA Agenda in the Top 5 Office templates downloaded just struck me as funny. And given the year we’ve had, we need some funny in our lives… ;)

Actually I think it’s pretty cool, and the Office Online team should be pretty happy, having a template like that in the top 5. I feel it seems to mean that “normal/causal” consumers are using the Office Online site. The other four can be chalked up to power and business users, but the PTA Agenda… well… (of course the little voice in my head is telling me that it was the business and power users who found and downloaded that template for their partner in parenting because they were tired of having to do it manually or seeing them do it on paper… in any case, it’s a win… ;)

7-Zip Update Released (v4.63)

7-Zip - SourceForgeRelease Name: 4.63

Changes:
- 7-Zip now can unpack ZIP archives encrypted with PKWARE-AES.
- Some bugs were fixed.

…”

image

7-Zip is my compression tool of choice and so an update is always nice to see…

 

Related Past Post XRef:
.Net (C#) Interface for the 7-Zip DLL (7z.DLL)
7zSharp to your .Net Archive/Unarchiving Rescue - LGPL .Net Wrapper for 7z

Tuesday, December 30, 2008

Deadlock avoidance when using redirected StandardInput, StandardOutput and StandardError with System.Diagnostics.Process

Lucian's VBlog - System.Diagnostics.Process: redirect StandardInput, StandardOutput, StandardError

“Sometimes you want to launch an external utility and send input to it and also capture its output. But it's easy to run into deadlock this way...

The deadlock in this case arises because "cat" (a standard unix utility) first reads from StandardInput, then writes to StandardOutput, then reads again, and so on until there's nothing left to read. But if its StandardOutput fills up with no one to read it, then it can't write any more, and blocks.

The MSDN documentation says, "You can use asynchronous read operations to avoid these dependencies and their deadlock potential. Alternately, you can avoid the deadlock condition by creating two threads and reading the output of each stream on a separate thread." So that's what we'll do...

Using threads to redirect without deadlock

' GOOD CODE: this will not deadlock.

Using p As New Diagnostics.Process

    p.StartInfo.FileName = "sort"

    p.StartInfo.UseShellExecute = False

    p.StartInfo.RedirectStandardOutput = True

    p.StartInfo.RedirectStandardInput = True

    p.Start()

    Dim op = ""

    ' do NOT WaitForExit yet since that would introduce deadlocks.

    p.InputAndOutputToEnd("world" & vbCrLf & "hello", op, Nothing)

    p.WaitForExit()

    p.Close()

    Console.WriteLine("OUTPUT:") : Console.WriteLine(op)

End Using

[GD: Click through for the InputAndOutputToEnd code block]

…”

I’ve got a redirect StdIn/StdOut/StdErr related project on the books and this tip might come in handy

Monday, December 29, 2008

A little VSTS VPC download help – Steve lists all 10 parts for easier FDM’ing

How Steve Got Burned Today - TFS and VSTS 2008 "All-up" Hyper-V Image Links for Free Download Manager

“Here are the download links for the Hyper-V version of the new TFS/VSTS 2008 "all-up" virtual machines that I posted about last week.  I'm mostly putting these here so that I can find them, but I think others may find them useful as well.

These links are compatible with the Free Download Manager tool.  Just copy them to the clipboard then open FDM and select File | Import | Import list of URLs from clipboard or just use the Ctrl + Shift + V hotkey.

…”

Steve provides a simple list of the new Hyper-V VSTS VHD links, making it much easer to download all 10 parts of the RAR via a download utility like FDM.

 

Related Past Post XRef:
Visual Studio Team System & TFS VPCs Updated – Now all the updates, Power Tools, SP’s, 12/31/2009 expiration AND Hyper-V versions!

Sunday, December 28, 2008

File and Directory Path help from the man who brought us NDepend

CodePlex - NDepend.Helpers.FileDirectoryPath

“NDepend.Helpers.FilePathDirectory is the library used by the tool NDepend to handle common path operations. Benefits of the NDepend.Helpers.FilePathDirectory over the .NET Framework class System.IO.Path include:

  • Strongly typed File/Directory path.
  • Relative / absolute path conversion.
  • Path normalization API
  • Path validity check API
  • Path comparison API
  • Path browsing API.
  • Path rebasing API
  • List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)

NDepend.Helpers.FilePathDirectory is 100% unit-tested and tests code is provided with the source code.

…”

There are some features here that we reinvented recently ourselves, plus tons I really like the sound of (plus I dig that the unit tests are already there ;)… Next update to that project I’m going to have to see if we can use this instead. We’ll have to get approval from “on high” since this is a LGPL licensed project, but that should pose too much of a hindrance…

(via Patrick Smacchia [MVP C#] - What is Microsoft waiting for providing a descent path API?)

Visual Studio Snippet Editor v2 Released – Formerly known as the “Visual Basic Snippet Editor” it now lives on in the source (VB) available world.

CodePlex - Snippet Editor

“The Snippet Editor allows for easy management and creation of code snippets for Visual Studio.

This is the Snippet Editor, formely known as the VB Snippet Editor as linked to from the MSDN VB site.
Features include:

  • Complete snippet file management
  • basic syntax coloring
  • replacement highlighting
  • drag and drop file organisation

snippet_editor

The Snippet Editor is a stand-alone exe suitable for all versions
of Visual Studio 2005 and 2008 including the Express editions:

…”

Nice! Very cool to see this quite old utility updated and its source released.

(via @ Head - Snippet Editor is now on CodePlex)

 

Related Past Post XRef:
Snippet Designer Released – Making VB, C#, XML Snippets the easy way… (VS2008)
Visual Basic Snippet Editor 2005 version 1.1 Released
Visual Basic (and C#, J#, XML) Code Snippet Editor