Solved

How to configure Data Sources via Group Policy

Posted on 2015-02-07
3
465 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
3 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 500 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 21

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 68

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now