Friday, June 18, 2010

Windows 7 and Sysprep

I needed to build some Windows 7 images and as I've used sysprep previously on XP and Vista, it seems like the way to go.  Turns out Win 7 sysprep is pretty close to Vista's, although some of the components have changes.  In short, I used the same options/configuration from my Vista unattend.xml file to build a Win 7 one, and it works fine (you do need to install the newer Win 7 AIK though).  More details here (I didn't do everything that Brian did, but its a good starting point).

Edit:  Mark Minasi has several posts about Sysprep in his Windows Networking Tech Page newsletter.  Specifically "Hands-Off Vista Installs with Answer Files and Windows System Image Manager" in Issue #60, "Using and Automating Vista's Sysprep" in Issue #62 and "You Can Sysprep More Than Three Times... Here's How" in Issue #7.  Lastly, this thread from Minasi's forums may be helpful.

Edit:  You may well be downloading the OS from your MSDN subscription as your starting point, as I did.  In my case, that raised a few questions.

1) There are different types/editions of many product in MSDN's subscriber downloads ('N', 'K', 'KN', etc).  This page explains the differences for Windows 7:

Is there any special SKU version of Windows 7 that exists? (Windows 7 N, Windows 7 K, Windows 7 KN, Windows 7 E)
Yes, there is Windows 7 N, Windows 7 K, Windows 7 KN and Windows 7 E, where each editions of Windows 7 will also have in these flavors other than standard version.
Windows 7 N: Windows 7 N is meant for European market, and includes the same functionality as Windows 7, except that it does not include Windows Media Player and related technologies such as Windows Movie Maker.
Windows 7 K: Windows 7 K is meant for Korean market, and includes the same functionality as ordinary Windows 7, except that it includes links to a Media Player Center Web site and a Messenger Center Web site.
Windows 7 KN: Windows 7 KN is meant for Korean market, and includes the same functionality as Windows 7 K, except that it does not include Windows Media Player and related technologies such as Windows Movie Maker, links to download Windows Live Messenger, or links to a Media Player Center Web Site and a Messenger Center Web site.
Windows 7 E: Windows 7 E is meant for European Commission countries, including UK, and includes the same functionality as ordinary standard flavor of Windows 7, except that it does not include Internet Explorer 8 (IE8).
 2) There are different types of keys as well, as explained by this page:


Key TypeDescription
Not ApplicableNo key is needed to install this product.
RetailThis key allows multiple activations and is used for retail builds of the product.  In many cases, 10 activations are allowed per key, though often more are allowed on the same machine.
Multiple ActivationYou can use the same key to activate multiple copies of the software. MAKs are generally used with Volume Licensing builds of a product.  Typically you will only be provided one MAK for a given edition of a product.
Static Activation KeyA key is required for installation of the product, but the key does not require activation, so it can be used for any number of installations.
Custom KeyThis custom key provides special actions to activate or install.
VA 1.0This is a multiple activation key.
OEM KeyThis is an Original Equipment Manufacturer key that allows multiple activations.
AA Retail KeyThis retail key is for Academic Alliance programs and allows one activation. These keys are issued in batches.
AA Lab KeyThis lab use key is for Academic Alliance programs and allows multiple activations.
AA MAK KeyThis is a multiple activation key for Academic Alliance program customers.
AA VA 1.0This volume license key (VA 1.0) is for Academic Alliance programs and allows multiple installations.

SQL Server and Row-Based Security

Here's an interesting article on how one company implemented row based security in SQL Server.  I'm considering using this technique (or some variation) to replace our application's implementation of 'partitioning', 'roles' and 'data synchronization to hardware'.  It would have the great benefit of replacing 3 different patterns, each of which has its own unique complexities with just one pattern.

Precompiling LINQ Queries

Julie Lerman has posted an article on MSDN on the hows and whys of precompiling LINQ queries.  Worth reading, as the hows aren't necessarily as obvious as you might think.

Dynamic SQL Can Be Good

Right or wrong, I've always believed dynamic SQL was a bad idea, both because the SQL can't be saved to the execution plan cache, but more importantly, it opens the door to SQL injection attacks.  While those concerns are valid, Jonathon Roberts posts an article demonstrating the good (and in this case, arguably necessary) use of dynamic SQL.

The State of HTML5

Jacob Gube posted recently on the state of HTML5 and about developing HTML5 apps.  Check it out.

OT: KRAs (Key Result Areas)

A previous company I used to work for used the KRA concept successfully.  Something to think about.

Monday, June 14, 2010

NoSQL, Non Relational Databases and Object Databases

If you haven't yet encountered NoSQL, it's about non-relationship databases.  Here is a guide to many links on the subject.  Also, here are some links on 'db4o', an object database: http://db4o.com/; http://versant.com/; http://www.codeproject.com/KB/database/LINQ_for_db4o.aspx.

Server Side Data Paging Using SQL Server

Paul White is writing a series of articles on various ways to do server side paging--that is retrieve the total count of rows in a result set, as well as a single 'page' (or subset) of that same data.  Part I, Part I Discussion; Part II, Part II Discussion;

Additionally, Robert Cary has written an article (article, discussion) on the same topic, and so has Lawrence Moore (article, discussion).

Thursday, June 10, 2010

Using Try-Catch Blocks to Handle T-SQL Errors

Bill Graziano has an article on using 'Try Catch' blocks in SQL Server 2005 and above to handle errors.

Using SQL Server Schemas

Alexander Kuznetsov has a post on how he uses schemas to organize and control access to his databases.

Wednesday, June 2, 2010

SQL Server and Google-like Text Searchs

If you need to perform Google-like text searches against your SQL Server databases, here is an article on doing so in SQL Server 2008 using Full Text Search.