Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to configure Data Sources via Group Policy

Posted on 2015-02-07
3
Medium Priority
?
1,319 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 80

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 24

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
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:…

783 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