What is the Windows Server 2003 Terminal Services Session Directory?

A. Imagine that you have multiple terminal servers and instead of letting users connect to one of them by individual name (which is problematic), you create a Network Load Balanced (NLB) cluster that collects all the terminal servers into a terminal server farm and users connect to the DNS name or the IP address of the NLB. The incoming connections are then automatically distributed to one of the terminal servers in the NLB cluster. However, if a user disconnects from a session (which means the session is still available on the terminal server) and later attempts to reconnect, the NLB cluster may redirect the user to a different terminal server instance and thus a new session is created on that terminal server.

The solution is a terminal server Session Directory server, which keeps track of user sessions in a simple database. When a user requests a new connection, the Session Directory server checks for the user account and if a disconnected session is found, the server directs the user to resume that existing session.

The Session Directory can run on any server, but ideally, it shouldn't run on any of the terminal servers in the farm. One note, only terminal servers running Windows 2003 Enterprise Edition can communicate with session directory--not the standard edition. To enable the Session Directory on a server, perform these steps:

  1. Log on as Administrator to the server that will host the Session Directory.
  2. Start the Microsoft Management Console (MMC) Computer Management snap-in (Start, Programs, Administrative Tools, Computer Management).
  3. Expand "Services and Applications" and select Services.
  4. Right-click Terminal Services Session Directory and select Properties.
  5. Set the Startup type to Automatic and click OK.
  6. Now select the "Terminal Services Session Directory" and click Start.
The Session Directory database is now stored in the %systemroot%\system32\tssesdir folder, and if you look at the files, you'll see it's an Extensible Storage Engine (ESE) database (the same kind that Microsoft Exchange Server uses). The installation also creates a group called "Session Directory Computers" to which you must manually add the computer accounts of each terminal server that will participate with the Session Directory. (The computer account is the name of the computer with a $ at the end (e.g., savdalts01$.)

To configure the terminal servers to use Session Directory, configure each terminal server via the Session Directory setting under Server Settings of the MMC Terminal Services Configuration snap-in. Alternatively, you can use the Group Policy setting under Computer Configuration, Administrative Templates, Windows Components, Terminal Services, Session Directory. Set the "Terminal Server IP Address Redirection" and "Join Session Directory" to Enabled; set "Session Directory Server" to the name of the session directory server and "Session Directory Cluster Name" to the name of the NLB terminal server cluster. The settings will take effect after Group Policy has refreshed. The only setting you might to check on the terminal servers is the NIC that users are redirected to (if you have multiple NICs), as the figure shows.

TAGS: Windows 8
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.