Solved

How to configure Data Sources via Group Policy

Posted on 2015-02-07
3
727 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 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 70

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

729 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