Solved

How to configure Data Sources via Group Policy

Posted on 2015-02-07
3
647 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 78

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 22

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 69

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

726 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