When connecting to SQL Server the Client network configuration determines which network library will be used.
With SQL Server
comes the Client Network Utility which allows the setting of the library
and some other options. If you do not want to use the default settings (Named
Pipes/Auto Ansi To OEM conversion), you can either manually change the settings
on each computer or use a policy file.
In this article you will learn how to create a policy file
to automatically configure the Network Library settings for computers in your
domain You can then deploy that file on your domain controllers to automatically
configure the clients upon logon. (Remember that this only updates the settings
on the machine. This process cannot be used to install new network libraries on
Policy Files and Policy Templates
Policy files can be used for Windows 9x and Windows NT Clients. When logging on to a domain controller the information from the policy file will be applied to the local registry of the client.
With Windows NT and
Windows 9x ship predifined Policy templates which allow the setting of many
Operation System settings. This articles describes how to create a new
Policy Template to create Policies that update the registry information for the
SQL Server Network Library.
|How to - Step by Step|
|Step 1:||Creating the Policy Template|
The Client network configuration for SQL Server can be found in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\. For this example I will create policy entries for the network library, the "AutoANSIToOEM" option and the "Use international settings" option.
The Policy Template file (a normal text file) starts by specifying the relevant Section in the Registry. As these settings are machine related, the Class will be Machine:
For this class we create a new category called SQL Server. The exact string is specified a bit further down in the file (in the [strings] section).
To be open for further amendments I include another subcategory call DBLibrary.
Now the Policies can be defined. The first policy will allow you to select a network library.
The keyname specifies where the values are stored in the registry.
For this value a dropdown list is created. The entries
define all possible Network libraries that exist. Just delete the entries you do
not intend to use.
So that is the end of the first policy. In policy editor (POLEDIT.EXE) it will now look like this:
The following lines show, how the settings for AutoAnsiToOEM setting and the "Use international settings" can be set.
These lines define the values for checkboxes. For SQL Server the values ON and OFF are used.
|Step 2:||Save the Policy Template file|
|Now you can save the File as SQL.ADM in the INF directory (Under
|Step 3:||Use the Template with Policy Editor|
Then you can start Policy Editor and open the Template (Options, Template).
Once this is done, a Policy file can be created or modified.
|Step 4:||Create a new policy file|
|To create a new policy file click on File, New.
Here you can either define the settings for all computers in your network or create entries for the computers that run SQL Server Client Software.
Unfortunately there is no option to group computers. The
fastest way to specify the same settings to a group of computers is to add them
one by one. Then change the settings of one of the computers, use the Copy
command to copy your changes to the clipboard. Now you can select all the
computers to which you want to apply the settings and then paste the information.
|Step 5:||Save the Policy File|
Save the file as NTCONFIG.POL in your NETLOGON share. (Remember to save the file under SYSTEM32\REPL\EXPORT\SCRIPTS if you use replication).
The next time a user logs on the NTCONFIG.POL file will be parsed and the registry will be modified.
To quick check whether your Policy Template works, open your local registry with POLEDIT, change the entries and check the effect either with the SQL Server Client Network utility or with REGEDIT.
A warningIf you use system policies the local registries will be modified when a user logs on to the network. There is NO way to undo these registry changes. So make sure you only specifiy the settings for the computers you wish to update!
Download Policy Template filesEnglish Version: SQLE.ADM
German Version: SQLG.ADM
Please send comments