Home | Blog | Publications | Photos | Services | About | Contact

Blog Archive - November, 2008

Back to Blog index.

Sat, 29 Nov 2008 09:29:13 GMT:
Getting to know "VSTS Lab Management"

After writing my article about automating software testing with Hyper-V, I got an e-mail from Microsoft India telling that they are keeping a blog about a similar functionality in the next Visual Studio 2010 release: Lab Management.

With this feature, software developers and testers using Visual Studio Team System 2010 can automate the process of testing thru virtualization, quite the same as I mention in my article.

If you are interested in Lab Management, take a look at this blog post from S. Somasegar, and this PDC PowerPoint slideset. Thanks go to S.M. from MSFT for letting me know about this blog.

Wed, 26 Nov 2008 19:52:11 GMT:
Finding the SQL Server service name and starting it from the command-line

Many developers need SQL Server on their development machines, but it might be that you don't want to allow SQL Server to start automatically when Windows starts. Starting a manual-startup Windows service is easy through the Computer Management GUI, but if you need to do this daily or even several times a day, it can get painful.

Luckily, you could automate the process by writing a simple script to start the service. The Windows command "sc" (short for "service controller") allows you to start (and stop) services. To use the utility, you need to know the name of the service you wish to start.

For instance, the service name for SQL Server 2005 or 2008 is by default "MSSQLSERVER", but changes if you install SQL Server with an instance name. To find the service names on your computer, simply run the command "sc query".

However, the important thing regarding this command is that by default, it only lists running (active) services. This is very easy to forget, and can cause you to scratch your head trying to figure why your service is now listed.

To find all services, is the command "sc query state= all". Note how you need to have a space between the state parameter and its value, "state=all" will not work.

Finally, to find your SQL Service name, use this command:

sc query state= all | find "SERVICE_NAME" |find "SQL"

Oftentimes, the service or instance name is in fully capital letters. Of course, your instance name must have the letters "SQL" in it with correct casing.

Once you have the service name such as "MSSQLSERVER", it's easy to start the service by typing:

sc start MSSQLSERVER

There you have it. And to make things even faster, you could store this command into a batch file, and put it for example on your development machine's desktop. Then it's very convenient to get the services running whenever you need.

Sun, 23 Nov 2008 11:28:30 GMT:
The options in tracking change data in SQL Server 2008

If you have already had the chance to study SQL Server 2008, you might have noticed that the database itself can help you with the old problem of finding changes made to the data. Yes, we already have triggers, but oftentimes you'd need to know afterwards, what tables or records have changed, and even how.

To help tackle this problem, SQL Server 2008 contains two features: Change Tracking and Chance Data Capture. Change Tracking is the simpler (and less resource-intensive) of the two, and provides an answer to the question, "has this row changed?" On the other hand, Change Data Capture (CDC) can answer this question, and also the question, "how has this row changed".

In effect, you could even use CDC as your "history" system, something like many ERP and version control systems provide. MSDN has a comparison of these two techniques available. Check it out.

Thu, 20 Nov 2008 15:51:32 GMT:
Automating Software Testing with Microsoft Hyper-V

Are you already using Windows Server 2008's Hyper-V virtualization? This technology is great for virtualization, but it is also great for software testing. Especially so if you have the knowledge to write some PowerShell scripts.

Hyper-V

Developer.com yesterday published my article titled "Automating Software Testing with Microsoft Hyper-V", which shows you how to do it.

Read the article to get the best out of Hyper-V in your software development/testing environment.

Mon, 17 Nov 2008 15:48:59 GMT:
TechEd USA 2009 date set

I learned today that the TechEd USA 2009 event will be held in Los Angeles next May, 11th to 15th. So, the event starts on Monday and ends the next Friday.

Sat, 15 Nov 2008 16:59:43 GMT:
Learn F# from Developer.com

I had the chance to investigate the F# language lately, and found it an interesting, though challenging alternative to more mainstream programming for instance with C#.

Developer.com today published my article about F#, titled "Getting Functional with F#". This article walks you thru the basics, and also gives you several code examples with a business-oriented developer in mind. If F# interests you, check the article out!

Next, articles about ASP.NET MVC and Hyper-V are coming up, so stay tuned.

Wed, 12 Nov 2008 15:56:19 GMT:
For the record: Windows Vista version numbers

As you might recall from my previous posts, finding operating system or application version numbers can be difficult once years go by and the service packs and updates have all been installed. So, here are two screenshots from Windows Vista, i.e. "Windows NT 6.0". Firstly, the RTM version:

Windows Vista RTM

Then, the Service Pack 1 (SP1) version:

Windows Vista SP1

So just for the record, the Vista version numbers are:

Mon, 10 Nov 2008 15:39:49 GMT:
Windows turns 25

Using Windows? Can you say from the top of your head how long Windows has been here with us? Today, it's 25 years! Quite a milestone in the IT industry.

My first Windows version was Windows 3.0 back in the 1990s, but of course, Windows 1.0 was already announced in 1983. Here's a screenshot of the beast (from Wikipedia):

Windows 1.0

While recalling the history, it's also fun to remember the old applications that have greatly contributed to the success of Windows. eWeek lists top 25 applications of the PC. Remember all those?

Sat, 08 Nov 2008 12:59:11 GMT:
Two recent oops: odd error messages and their solutions

I happen to have quite many machines, both virtual and physical, that I use to test various things. Most of these machines have Visual Studio installed, some have Expression products, and some have server applications like SQL Server 2005 and 2008 installed.

And yes, I confess I sometimes forgot which is which, and thus I sometimes run into error messages that appear to be difficult to solve, but in the end are very easy puzzles. So here goes, two recent "oops".

Number 1: Trying to install Expression Blend 2 SP1 on a machine that only has Expression Blend 1 installed. As you can guess, didn't work out so well. But the problem is, the error message you will get is by no means very helpful. It goes like this:

---------------------------
Microsoft Expression Blend 2 Service Pack 1
---------------------------
Microsoft Expression Blend 2 Service Pack 1 may have failed to install. Windows Installer returned error code 1605.
---------------------------
OK
---------------------------

So, if you happen to run into this kind of error message, you know what's going on. The lesson: doing a quick glimpse into the Start menu tells Expression Blend is installed, but if you aren't careful, you might miss the version number.

Number 2: Updating an older Visual Studio 2005 project and testing the new F# compiler at the same time might not be a good idea. My intention was to access an SQL Server database and read data from there with F#.

But this can be doomed if you happen to have lingering assembly references into assemblies that are only good for older .NET versions, or even .NET Compact Framework. So, I got this error message when trying to open an connection to the SQL Server database:

Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry
point named 'PAL_LocalAlloc' in DLL 'dbnetlib.dll'.
   at System.Data.SqlClient.SqlConnection.Open()
   at .$Test._main() in
   C:\Source\FSharpDBTest\AccessSQL.fs:line 24

Not very helpful! First I thought my virtual machine would have for some reason multiple dbnetlib files, but then I went to check the F# project references. Remember, to access System.Data.SqlClient, you don't need to reference System.Data.SqlClient.dll, as System.Data.dll will do just fine!

By the way, I didn't find much information on the Internet about either of these error messages, so here goes. "Gotcha!"

Wed, 05 Nov 2008 15:55:41 GMT:
Learn ASP.NET MVC in Finnish from CodeZone

Just few days ago, I had the chance to author a short introduction to ASP.NET MVC application structure on the Finnish CodeZone site. The article is named "ASP.NET MVC -sovellusten rakenne tutuksi", and as you can guess, it's in Finnish. Download it as a PDF file here.

Enjoy!

Sun, 02 Nov 2008 19:24:05 GMT:
Finding Microsoft PDC material online

Microsoft PDC 2008 is now over, and tons of useful and exciting information was delivered to us. No matter whether you were there in Los Angeles or at home, you can see and hear many of the session on PDC online. The best place to go is www.microsoftpdc.com, where you can find direct links to Silverlight videos and PowerPoint slideshows.

Also, quite a lot of content is hosted on Channel 9's own PDC 2008 page, also worth checking out.

As always, there's so much material and so little time. :-)

 

› Blog Archive