Deploy ODBC

Tricky 1 Reputation point
2020-09-03T09:28:43.48+00:00

Hi,

I want to push odbc within System DSN but it's not working...

I don't see the new data source on my PC.

I have tried with registry, I can see the new entry in regedit but it doesn't show on ODBC.

Any idea?

Thank you.

T.

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Stephanie Yu 401 Reputation points
    2020-09-04T06:53:23.557+00:00

    Hello @Tricky ,

    Thank you for posting here.

    According to my extensive research, we can deploy ODBC through GPO.

    Group Policy includes the Data Sources preference extension. This extension allows you to centrally configure Open Database Connectivity (ODBC) data source names for user or computers.

    You can create and configure Data Source preference items for any domain-based Group Policy object (GPO). You can configure the settings by editing a GPO using the Group Policy Management Console.
    Creating a Data Source item
    To create a new Data Source preference item

    1. Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.
    2. In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Control Panel Settings folder.
    3. Right-click the Data Sources node, point to New, and select Data Source.
    4. In the New Data Source Properties dialog box, select an Action for Group Policy to perform.
    5. Enter data source settings for Group Policy to configure or remove.
    6. Click the Common tab, configure any options, and then type your comments in the Description box.
    7. Click OK. The new preference item appears in the details pane.

    This is the step for me to create a GPO (Computer Configuration) on Domain Controller.
    And on domain client, open cmd as an administrator, run gpresult /h C:\file.html to see that the group policy configuration is successful, and there are corresponding key values in the corresponding registry keys
    22558-image.png
    22578-image.png
    In order to better help you troubleshoot the problem, Could you please provide us more detail of the issue you encountered? Or share some more information as follows:

    1. Do you have one .xml file for configuring ODBC?
    2. How do you configure ODBC via GPO? User Configuration or Computer Configuration?

    User Configuration\Preferences\Windows Settings\Registry
    Computer Configuration\Preferences\Windows Settings\Registry

    User Configuration\Preferences\Control Panel Settings\Data Sources
    Computer Configuration\Preferences\Control Panel Settings\Data Sources

    3. Do you manually create ODBC connection in a computer, export the registry keys from registry hive, push them through GPPs?
    4. In response to your question "I don't see the new data source on my PC.", how does it not work, whether there is a specific error on client?
    Or whether we can see the configuration value through gpresult file after running gpresult /h on client?
    Or whether the corresponding registry key is changed what we set on the client?

    References:

    Deploy ODBC Settings via Group Policy
    https://www.petenetlive.com/KB/Article/0000805

    Two similar cases
    ODBC connection via GPO
    http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/2748dedd-97c9-455d-a265-9766c02c9898

    ODBC Data Source Administrator Error Operating System is not configured to run this application
    https://learn.microsoft.com/en-us/answers/questions/86107/odbc-data-source-administrator-error-operating-sys.html

    Best Regards,
    Stephanie Yu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Roel Janssens 1 Reputation point
    2021-05-17T13:05:49.317+00:00

    What registry keys did you use? I had the same issue, try below keys and use your own ODBC-Name and Server-Name

     [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
     "ODBC-Name"="ODBC Driver 17 for SQL Server"
    
     [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC-Name]
     "Driver"="C:\\WINDOWS\\system32\\msodbcsql17.dll"
     "Description"="ODBC-Name"
     "Server"="Server-Name"
     "Database"="master"
     "Encrypt"="Yes"
     "TrustServerCertificate"="Yes"
     "ApplicationIntent"="READONLY"
     "ClientCertificate"=""
     "KeystoreAuthentication"=""
     "KeystorePrincipalId"=""
     "KeystoreSecret"=""
     "KeystoreLocation"=""
     "Trusted_Connection"="Yes"
    
     [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBC.INI\ODBC-Name]
     "Server"="Server-Name"
     "Trusted_Connection"="Yes"
     "TrustServerCertificate"="Yes"
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.