Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to configure Data Sources via Group Policy

Posted on 2015-02-07
3
Medium Priority
?
1,055 Views
Last Modified: 2015-03-01
Hi,

I require a group policy to connect client to an SQL Server.

I have configured a "Data Source" item in Group Policy and it configures correctly on the workstations.

I require the client to use port 1433, server is set up this way, however the group policy object sets up dynamic ports allocation in ODBC connector on the client.

Does anyone know how I can configure the client to use port 1433 using group policy?

I do not wish to update each machine individually.
0
Comment
Question by:Ethan Darwin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 79

Accepted Solution

by:
arnold earned 1500 total points
ID: 40597003
You can publish the ODBC connection in a GPO.

Note you need to deal with 32 and 64bit variants

HKLM\software\odbc\odbc.ini main (32bit or 64bit)
64bit system
HKLM\software\wow6432node\odbc\odbc.ini (32bit on 64 bit system)

Create the ODBC connection you want to push on one system, export the hierarchy, and then create two GPOs one for 64bit systems and one for into which ...


computer configuration\windows settings\security settings\registry
add key..

Another option you can use a startup script to import the reg -s file.reg where file.reg will have the exported hierarchy. Though this will import the key everytime the system boots unless your startup scripts has logic to limit the import only when the file.reg changes.
computer configuration\windows settings\scripts\startup

the client settings are stored in HKLM\software\MSSQLserver\<SQL NATIVE CLIENT version SNI9.0,SNI10.0, SNI11.0,SNI12.0 sql 2005,2008,2010,etc.>\tcp\Property1\
name (string)  Default port
value (dword) 1433 decimal

note the same rule applies here as before dealing with 64/32 bit chains.

the importance deals with the application you are running if you have two versions, 64 and 32 such that each is deployed to its respective system, then you need not concern with the wowo6432node hierarchy on the 64bit system, but if you have only a 32 bit application, or the possibility exists that a 32bit application can be installed on a 64 bit system, you would need to include the wow6432node hierarchy as well.
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 40597121
Have you looked at Group Policy Preference > Control Panel Settings > Data Sources >

From there you can create either a user or system ODBC as you would locally.

See if that works.
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40597134
If no port is provided, 1433 will be used for unnamed (default) instances, or if the Browser Service cannot be contacted. You should not need to do anything.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A safe way to clean winsxs folder from your windows server 2008 R2 editions
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question