Search This Blog

2021-06-17

MS SQL Server - Create OLE DB Connection File

Product: MS SQL Server
Version: All

I am surprise to find that there is not much information in the Internet to create an OLE DB connection file in Windows.  Most of the information are creating OLE DB connection through software such as SSIS, Excel, DB utilities.

Following is the process to create OLE DB connection file, which can be used to specify the desire MS SQL Server OLE DB version:

  1. Open Windows Explorer and navigate to the desire directory to create the OLE DB connection file
  2. In Windows Explorer, right click on the empty area, and pick New > Text Document
  3. Enter desire connection file name, such as "test1.udl"
  4. Now you will see the icon for "test1.udl" as shown below


  5. Open up the properties screen by doing Alt-Double-Click to see the pop up window below


  6. Click on tab "Connection"


  7. Enter the DB configuration values
    1. Server name and port, separate by comma
    2. Choose Windows integrated authentication or DB
    3. For DB authentication, fill in username and password
    4. Choose whether want to save password, if Windows Group Policy allow by your company's ActiveDirectory server
    5. Select the database name to use after login
  8. After configured, click on button "Test Connection" to confirm that the machine can login to remote MS SQL Server
  9. You can further pick your desire OLE DB driver from the "Provider" tab



No comments: