Archive for the ‘Uncategorized’ Category

How to Test MS SQL Connectivity

September 24th, 2009 by Paul Sterley | No Comments | Filed in Uncategorized

This is a fairly complicated subject, as SQL is a fairly complicated application.

 

Maybe you need to test connectivity to your SQL server as part of preparations for a failover.

Maybe you’re having some problems with getting a client application to connect and you want to make sure your SQL server is responding.

Maybe it seems to work locally but not remotely, and you want to gather more information on where you can connect from and where you cannot.

 

There’s no really simple methodology for testing this, because MS SQL can be configured in many different ways – using Windows authentication, using SA authentication, using TCP/IP, or Named Pipes, on different ports, even on dynamic ports.

 

So rather than present a step-by-step approach that will only work for one specific configuration, I’ll point you to some articles that will help you determine which way SQL is configured first – and then how to test it using that information.

 

 

This one is about enabling remote connections, but in the process it tells us where to look for the actual port number being used:

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

 

This one helps us figure out whether the server is using TCP/IP or Named Pipes, whether or not Dynamic Ports are bring used, etc:

http://support.microsoft.com/default.aspx/kb/265808

 

This one helps us use SQLCMD to connect to x instance with y port, giving a number of syntax examples:

http://msdn.microsoft.com/en-us/library/ms188247.aspx

 

If any of these links go missing, please send me a comment so I can replace them.

Tags: ,

Laserjet 2600n Point-and-Print Trouble with SBS2008 and 32-bit XP

April 2nd, 2009 by Paul Sterley | No Comments | Filed in Hardware, In the Windows Box, Uncategorized, Windows Server, Workstation OS

I loaded drivers on my SBS 2008 server for the HP Color Laserjet 2600n printer.

On my 32-bit XP workstation, I connected to the server via UNC path, right-clicked the printer, and told it to connect. This is usually sufficient to load the driver, and give access to the printer.

The symptom:
This time, although it connected successfully and I had a printer object for it, whenever I tried to print to it, Windows wanted to send a love note to Microsoft, and when I closed that dialog, Explorer crashed and restarted.

This works fine on the Vista computers in my network.

I right-clicked on the printer object and tried to get to Properties. Windows XP told me that I needed to install a driver for the printer. I gave it the proper driver and it showed me the properties. I tried printing again, and BANG! another Explorer crash. It turns out that no matter how many times I gave it that driver, it still thought it did not have the driver.

I tried a variety of different ways, from loading the drivers at the local console of the server, connecting from Windows XP and Vista workstations to \\server\printers and loading it there, across the network. I downloaded new drivers from HP and tried those.

Since this is a 2600n and has a JetDirect card, I realize that I could easily have created a port on the XP workstation and mapped directly to the printer instead of going through the server, but I was getting stubborn.

Finally, I tried something a little different.

I created a new port on the XP workstation. I used the “Local Port” option, but when it asked for a port name, I typed \\server\printersharename in the “Enter a port name:” field.

It works like a charm. The icon even looks like a network printer icon instead of a local one. I edited the printer name to be <printername> on <server> to make it look just like the other network printers, and I can manage its print jobs centrally.

There is one drawback to this approach: Terminal Services does not map back the printer when I do this. However, since it is networked printer on the same LAN with the server, and I do not often use this feature when connecting to other networks, it’s not an issue for me.

Tags: , ,

Writing Documentation that Doesn’t Suck

December 24th, 2008 by Paul Sterley | No Comments | Filed in Uncategorized

One of my personal goals is to reduce the number of documents I write with screen shots to zero. I may never achieve this goal 100%, but I will settle for eliminating unnecessary screen shots. When a document is written with precision, screen shots are unnecessary. It is much faster and simpler to add a few careful words than to take a screen shot, crop it, save it in a compressed format to keep the file size down, embed it in the document, and place the text and carriage returns around it in such a way as to not annoy and confuse the reader.

If you have to write one, here are a few pointers that (in my opinion) will make a better document:

Interacting with the audience:

One reason I dislike step-by-step documents with lots of screen shots is that step by step documents, in general, encourage people to disengage their brains. Why would you bother to think your way through a process and learn about it, when you have a document that grasps your nose ring firmly and jerks you through it?

Related to the previous point about disengaged brains, what happens if a mistake is made in the documentation, or the documentation is not updated when the process is, and the reader suddenly finds themselves halfway through a process with a document that does not match up? Answer: the user gives up, shrugs their shoulders, and complains loudly about it. If the user had instead been thinking their way through an intuitive process, they’ll know exactly where they are and how they got there, and where to go from there.

Then, of course, comes another scenario: The process has changed, the author has updated the text of the document, but did not update the screen shots. Now the text does not match the pictures, and the user has to try to figure out which one is correct.

Finally, there is the situation where the author’s view of the program, having been tweaked and twisted, has checkboxes checked that the user does not, or vice versa – and now you have people that start wondering (and asking questions about) some checkbox that is not covered in the documentation. (I call these people rivet-counters, after the Star Trek fans who notice that the number of rivets in the wall of Sick Bay has changed from one season’s episodes to the next, and complain about it on forums. The IT world is full of jerks like that.)

Documents with text steps but not screenshots also have these problems to some extent, but the effect doesn’t seem as pronounced to me. I think screen shots, while helpful in small quantities, are mind-numbing when interspersed through a large document. Screen shots are good for showing a specific page when describing a particular point - but like most things, there can be too much of a good thing.
Logistics of document creation:

One reason why I dislike making documents with tons of screen shots is the sheer amount of effort involved with taking screen shots, cropping them, saving them to a compressed format to avoid making a document with an unnaturally high file size, and importing them into the document.

However, the creation and placement of the screen shots is just the beginning. MS Word, and most other document readers, have a very annoying feature. The arrow keys advance you from one line of text to another, totally disregarding images. So if you are arrowing down through a document, and watching the screen shots, you can find that most of a page has gone by quite suddenly. Sometimes you miss some text too. So you arrow back up and it scrolls up too far as well. It’s very disorienting. I find that with documents of this type, I spend more time trying to figure out where I was in the document than by actually getting anything out of it.

If you have to make a document like this, you can minimize the disorientation effect by placing the text that corresponds to an image BELOW the image – so when the document reader jumps, the text you’re seeing actually matches the image you are viewing.

You can also minimize the page-jump effect by filling the blank space at the bottom of a page with carriage returns. That way when you are arrowing down, and the arrow has gone faster than your eyeballs, or you’re not sure if it is the end of a page or not, you will actually see the white space before it suddenly jumps to the next page without warning.
One more point is that if the text of the document is written with precision, as it should be, pictures are completely unnecessary. Many documents say things like “Click the Advanced button.” But there are three different buttons on the screen labeled “Advanced”. Which one do you click on? The screen shot MIGHT show you that. Sometimes the author opens the screen shot up in MS Paint and puts a red circle around the correct button (and don’t get me started about how long it takes to write a document like THAT). Sometimes not. Even if they do, you still have to keep jumping between the text and the picture. The author could just as easily have written “Click the “Advanced” button in the “User Settings” area.” And a screen shot would NOT HAVE BEEN REQUIRED.
So as you can see, if one of these nose-ring documents with pretty pictures is not written with great care, which takes forever to do, they become quite annoying to people like me. I’d much rather look at a formatted-text document that uses words to great effect, not relying on pictures.

Tags: ,

Like getting free, useful information? Donate to Wikipedia!

December 22nd, 2008 by Paul Sterley | No Comments | Filed in Personal, Uncategorized

Wikipedia Affiliate Button

I use Wikipedia almost every day. It may be imperfect, but it’s still the best place on the web to get down-to-earth, quick information. I like it enough to spend a few bucks to keep it running. How about you?

Read the letter from the founder of Wikipedia on what it’s all about.

Tags:

SBS2008 - Unattended from Boot to Welcome

November 19th, 2008 by Paul Sterley | No Comments | Filed in Not in the Windows Box, Uncategorized, Windows Server

Yeah, it’s old news that SBS2008 setup can be done “unattended” with an answer file. Just run SBSAFG from the DVD, fill in the blanks, save the file to removable media, attach it to the target server, put the DVD in, turn it on, and…

Wait, what’s up with all of these prompts? I thought this was supposed to be unattended?

Well, yes, the SBS wizard portion is unattended, but you still have to go through the OS setup. You see, MS tried really hard to make the transition from OS install to SBS configuration seamless. What they really did, however, was remove the ability for us to make any fine adjustments after the OS load and before SBS installation. For example, partitioning and formatting additional disk volumes.

Anyway, the end result is that the SBSAFG generates an answer file that answers the SBS questions, but not the OS load questions.

Generating an answer file for the OS load is not nearly as simple as double-clicking an executable and filling out a structured form. It’s not even as simple as it was in 2003, where you could extract and run sysprep to generate an answer file, and then use a text editor to fill in the missing bits, with simple, easy to understand formatting.

Now, you need to download a huge program, install it, copy an even larger file from your installation media, catalog it, choose your OS version and type, start an answer file, add some things to various stages of setup, fill in the blanks, and then save the answer file. Some of those fields have tips to help you determine what needs to be typed in there. Others do not.

As if that was not confusing enough, most of the tutorials on this are focused on deploying Vista using Windows Deployment Services. On a small, disregarded, deeply buried web page, I found a note saying that to deploy Windows 2008 with an answer file, just follow the Vista instructions and use Win2008 media.

Ready? Here we go:

Download and install the Windows Automated Installation Kit (992 MB). I believe this must be installed on Vista or Server 2008. I used Server 2008.

Copy the install.wim file from the SBS2008 DVD to the hard disk of the computer you are running the IAK on. I am not sure if it can be run from the DVD directly, but I didn’t want to listen to the drive whine/click/whir longer than necessary, or be prompted for the file again later, so I just went ahead and copied it.

Run Windows System Image Manager. 

  1. Right-click the Select a Windows Image, choose to select one, and browse to the WIM file.
    Choose the OS you want (in this case let’s go with ServerStandard, because we’ll be automating SBS2008 Standard).
  2. Choose to create a catalog for that OS.
  3. Right-click in the answer file section, and choose to create a new answer file.

Great! Now we have some components, and a framework of installation stages in the answer file. Now what?

You can have all kinds of fun with this, and here is a reference guide to help.

However, there is a small set of core pieces listed on this page that we need to put in there to make it unattended. Before you slam those in there, however, be aware that those pieces are required for a fully built, distributable instance of Vista, resealed and all. If you include all of those things, it will break your SBS2008 installation.

Below is a listing of what I put in there, the values I entered.
All of it goes into “1 windowsPE”.

Note: This is not XML-formatted text. Do not copy/paste this into an XML file, that will not work for you. Instead, look for these settings in the AIK. I am not planning to post a full XML file because your settings/requirements might be significantly different - so it is best if you build yours from scratch.

amd64_Microsoft-Windows-International-Core-WinPE_neutral
  InputLocale: 0409-000000409
  SystemLocale: en-us
  UILanguage: en-us
  UserLocale: en-us
\-> SetupUILanguage
      UILanguage: en-us
      WillShowUI: OnError
amd64_Microsoft-Windows-Setup_neutral
\-> DiskConfiguration
      WillShowUI: OnError
   \-> Disk[DiskID=”0”
         Action: AddListItem
         DiskID: 0
         WillWipeDisk: true
       \-> CreatePartitions
           \-> CreatePartition[Order=”1”]
                 Action: AddListItem
                 Extend: false
                 Order: 1
                 Size: 61500
                 Type: Primary
       \-> ModifyPartitions
           \-> ModifyPartition[Order=”1”]
                 Action: AddListItem
                 Active: true
                 Extend: false
                 Format: NTFS
                 Label: OS
                 Letter: C
                 Order: 1
                 PartitionID: 1
\-> ImageInstall
    \->OSImage
         WillShowUI: OnError
       \->InstallTo
            DiskID: 0
            PartitionID: 1
\-> UserData
      AcceptEula: true
      FullName: John Q. Public
      Organization: Your Company
    \->ProductKey
         Key: TM24T-X9RMF-VWXK6-X8JC9-BFGM2
         WillShowUI: OnError

Some notes about the above values:

The values in the first section assume US English installations. Check out the reference guide for your locale.

The disk configuration I specified wipes out any existing partitions and creates a single 65 GB partition at the start of the disk. Adjust as appropriate for your installation, and be careful not to wipe out an important partition on your server. I recommend duplicating your server’s disk structure on a white box and testing before you actually run this on your server.

The UserData section is unimportant, as it gets replaced later by the answers from the SBS answer file. These will get you through without requiring customization for each client.

The product key I used is a special key for unattended installations. It is not a “real” key, and you will need to replace it when it is time to activate. SBS2008 provides an easy mechanism in the activation UI for this.

Once you have inserted all of these items and typed in the values, it is time to save your answer file to removable media. I suggest also saving it to the same folder with the WIM file and the catalog, for later use.

A quick note about virtualization: When running SBS2008 setup on a Hyper-V platform, the display size goes to 1600×1200 pixels. I tried adding display settings in every stage of setup, to no avail. When done, I was still looking at a 1600×1200 desktop. If I figure this out later, I’ll post an update. This issue does not happen on ESXi.

So, now that we have the initial OS answer file, we need to create the SBS answer file. This step is fairly straightforward.

You can run the SBSAFG executable straight from the DVD, or copy it to a workstation somewhere and run it there. It does not like being run over the network, I have found, but it executes locally on Windows 2008, Windows 2003, and Windows XP without fuss. I did not try it with Vista, but I assume it would work there as well.

Fill out the form as you wish, and save the file to the same removable media you put your OS answer file on. Thankfully, they use different file names, so there will not be a conflict.

Now you’re ready to attach your removable device, insert your SBS2008 DVD, and build a system.

Good luck!

Tags: , , , , , ,