Jeff Gilbert's Web blog at myITforum.com

This posting is provided "AS IS" with no warranties, and confers no rights :-)
Deploying SQL Server 2005 with SP2 Using an OSD Task Sequence (Part 2)

The first thing that you need to do before deploying SQL Server 2005 and SQL Server 2005 SP2 using a task sequence is to create the packages and programs that the task sequence will use. If you haven't done that yet, go read part 1 of this post!

After the required packages and programs are created, and successfully distributed to distribution points, we can get started. I'm going to break this post down into the following sections:

  • Creating the task sequence
  • Advertising the task sequence
  • Monitoring the task sequence actions
  • Verifying the install did what it was supposed to

Creating the task sequence

The package source is just the SQL Server 2005 RTM installation media. The interesting bits are all in the program properties.

  1. Navigate to the Task Sequences node in the Configuration Manager console (System Center Configuration Manager \ Computer Management \ Operating System Deployment\Task Sequences). Right-click Task Sequences and select New\Task Sequence to start the New Task Sequence Wizard.
    1. Select the Create a new custom task sequence option.
    2. Type a name for the task sequence, give it a comment if you want to, and click Next—don't select a Boot image (I named mine Install SQL Server 2005 w/SP2).
    3. Click Next on Summary page, let the wizard finish, and then click Close on the Confirmation Page. The new task sequence should appear in the results pane.
  2. Right-click the task sequence you just created and click Edit.
  3. In the Task Sequence Editor, click Add and select New Group. Give the group a name (I named mine Install SQL Server 2005 w/SP2).
  4. Highlight the top group name and click Add\New Group. Give this subgroup a name (I named mine Install SQL Server 2005).
  5. Highlight that group name, and then click Add\General\Install Software. You should see an install software task with a red X now (it will remain red X'd until you select a package and program to run).
    1. Name the Install Software task (I named mine Installing SQL Server 2005).
    2. Leave Install a single application selected. Click the Browse button and select the package that you want to use and then select the program that you want to deploy (this is the package/program that installs SQL 2005 RTM for me). The red X should now be a green check mark.
  6. Highlight the install software task and click Add\General\Restart Computer.
  7. Highlight the top group name again and click Add\New Group. Give this subgroup a name (I named mine Install SQL Server 2005 SP2). Drag the new group underneath the previously created task sequence group.
  8. Highlight that group name, and then click Add\General\Install Software.
    1. Name the Install Software task (I named mine Installing SQL Server 2005 SP2).
    2. Leave Install a single application selected. Click the Browse button and select the package that you want to use and then select the program that you want to deploy (this is the package/program that installs SQL 2005 SP2 for me). The red X should now be a green check mark.
  9. Highlight the install software task and click Add\General\Restart Computer.

If all goes well, you should now see something like this screen shot in the Task Sequence Editor Window and you can save and close it:

 
 

Advertising the task sequence

Of course, task sequences do no good if you don't advertise them to clients.

  1. Right-click the newly created task sequence and select Advertise to start the New Advertisement Wizard.
  2. Ensure the correct task sequence is selected and click Browse to select the collection that you want to advertise this task sequence to. If you don't want this advertisement to include subcollections (I don't), then de-select the Include members of subcollections option.
  3. On the Schedule page, configure the schedule that you want this advertisement to use. Because I'm doing this in a lab and I want it to install right now (or as close to it as possible), I create a mandatory assignment time for as soon as possible. I also check the options to Ignore maintenance windows when running this program and Allow system restart outside of maintenance window.
  4. On the Distribution Points page, you need to select an option for how the package contents will be accessed. Because I like to ensure that all required files are present before beginning major software installations to avoid transient network issues during installation that could cause the install to fail, the two options I'm looking at are: Download all contents locally before starting task sequence and Download content locally by running task sequence. From those two available choices, I'm going to pick Download content locally by running task sequence and here's why:

When you configure an advertisement to Download all contents locally before starting task sequence, the content is stored here in the client cache directory—and they are not deleted after the task sequence finishes:

When you configure the task sequence advertisement to Download content locally by running task sequence, the content is stored in a temporary task sequence directory—and they are deleted when the task sequence finishes:

Technically, the install will run successfully using files from either location (and most likely even if you run it from a distribution point), but the problem I have with using the client's local cache directory is that the source files are not removed after installation. Even though I'm using a setup.ini file located on a hidden share and not located with the source files in this instance, you might not always do that and a savvy user could get ahold of those cached SQL Server setup files, proceed to run amok on the network, and then I've got a bunch of unauthorized SQL installations to account for. Besides that, it just takes up a bunch of hard drive space on clients unnecessarily (over a gigabyte in this case for SQL Server 2005 and SP2).

  1. On the Interaction page, select Show the task sequence progress.
  2. Finish out the wizard to complete the advertisement process.

Now, you can just wait until the targeted computer retrieves the machine policy that contains the advertisement information for the task sequence to kick off, but I'm not that patient so I manually initiate a machine policy retrieval & evaluation cycle to get the party started.

Monitoring the task sequence actions

There are a couple of ways to monitor the task sequence as it goes through the motions that you have configured for it. You can use the Configuration Manager console and reports to view the status of the task sequence execution or you can watch the progress from a targeted machine…or both I suppose. I'll walk you through each of these methods next.

Monitoring task sequence execution from the Configuration Manager console

As soon as you advertise the task sequence to a collection, the Configuration Manager console OSD home page updates and displays the status of the new task sequence advertisement:

As the task sequence execution proceeds, clients send in task execution status messages, and the home page refreshes, you can follow the status in the console using the color coded chart:

If you don't want to wait, or you want to see an individual computer's task sequence execution progress, you can view Web reports that detail the progress by clicking the task sequence name in the console. There are a total of three reports that drill down and display more detailed information about the task sequence status:

Status summary of a specific task sequence advertisement. This report shows the status summary of all resources that have been targeted by an advertisement.

Drilling down by clicking an execution state value you get:

All system resources for a specific task sequence advertisement in a specific state. This report will show a list of computers that are targeted by the specific task sequence advertisement and are currently in the specified state.

Click a computer name for that particular computer's status gets you:

History – Specific task sequence advertisements run on a specific computer. This report shows the status for each step of a task sequence. If no record is returned, it means the task sequence has not yet started.

The last one is the one that I like. It displays detailed information about each step taken during the task sequence execution for a particular computer. I like to open this report for a test computer and watch the actual task sequence in action by refreshing the page every now and then. Of course, nothing beats watching the task sequence execution at an actual computer that is running it though.

Monitoring task sequence execution from the client computer

After a client computer receives the task sequence notification policy it displays the notification in the system tray to alert you that it is going to run (I set a mandatory installation time of as soon as possible for this example):

You can follow the progress of these initial stages by watching the client's execmgr.log which hands off logging to the <install dir>\CCM\Logs\SMSTSlog\smsts.log file. Anyway, clicking the notification gives you the option to run the task sequence or wait for the countdown to complete. When the task sequence starts, installation progress messages are displayed on the screen.

 

The install software task (to install SQL Server 2005):


The restart computer task that comes after the install software task in the task sequence:

 

After the computer restarts, the task sequence waits for the Configuration Manager client to reinitialize and then continues on its merry way:

 

 


The install software task to install SQL Server 2005 SP2:

 

 

The restart computer task that comes after the install software task in the task sequence and we're all done:

 

Verifying the task sequence did what it was supposed to

The OSD home page gives you a good overall view of the task sequence status and by viewing the Web reports you can even more detailed information about whether or not the task sequence was successful. This part is just verifying that the task sequence did what it was supposed to do—install SQL Server 2005 and then SQL Server 2005 SP2.

On the targeted computer, open up SQL Server Management Studio (it is there now right?!), right-click the server name and click Properties. The General page of the server properties should look something like this:

 

 

Here you can verify some of those setup.ini file settings that we told SQL setup to use, and ensure that SP2 was successfully installed—the version number should be 9.00.3042.00. If it says something like 9.00.1399.06 (SQL Server 2005 RTM) then you know the service pack installation didn't stick. Here's a handy link while I'm thinking about it: How to identify your SQL Server version and edition.

You should also check the SQL Server setup and service pack setup summary logs. If you used my .ini file, then these logs are at the following locations respectively:

  • %Program Files%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Summary.txt
  • %Program Files%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\Summary.txt.

And that is that. This is just one example of how to use task sequences to install software outside of normal OSD tasks, but I hope it has been helpful and gets you thinking of other ways that you can use this powerful new feature of Configuration Manager. Happy task sequencing!!!

~Jeff

 

 

Published Friday, October 31, 2008 2:33 AM by jgilbert

Comments

No Comments