none
Is Application Name not supported by the OLE DB Driver for SQL Server RRS feed

  • Question

  • I changed my client application to use the new SQL Server OLE DB driver instead of the OLE DB provider because I have to use encryption and trust the self-signed server certificate.

    Encryption works fine, but I can't use the Application Name parameter on the connection. I have set the application name but it does not appear in the sys.dm_session_view. In the session view, the application (program_name) is called "Microsoft Windows operating system", not the one I set.

    Similarly, the packet size cannot be changed also.

    Has anyone ever encountered this problem, what could be the solution?


    Tuesday, October 8, 2019 10:53 AM

Answers

  • Connection Builder is a Microsoft tool, this is the oledb32.dll, running with OpenDSLFile + filename parameters. If is it bug, it is Microsoft's bug, not Embarcadero's bug.

    Sorry, since you specifically mentioned CodeGear TADOConnection, I assumed that was the connection builder component you were having problems with.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    Thursday, October 10, 2019 11:19 AM

All replies

  • A ran a quick test via ADO and found both "Application Name=" and "App=" set the application name properly. Can you post your connection string and the API you are using?


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    Tuesday, October 8, 2019 11:22 AM
  • I don't know why, but it is working, if I use the same connection string in my C++ Builder.

    First time I tested the connection from the Connection Builder when I create the UDL. The Application Name lost and not appeared on the server while I test the connection from the Builder.

    Then I have done more tests and find that, the Application Name parameter is working if I set the CodeGear TADOConnection to use the UDL and I connect the database in CodeGear form designer. In this case I see the entered name in the System view of sessions.

    My UDL is:

    [oledb]
    ; Everything after this line is an OLE DB initstring
    Provider=MSOLEDBSQL.1;Password=*****;Persist Security Info=True;User ID=*****;Initial Catalog=MIT;Data Source=ocaqmon-drpc120;Application Name="Test";Initial File Name="";Use Encryption for Data=True;Trust Server Certificate=True;Server SPN="";Authentication="";Access Token=""

    I don't know why the app name feature does not work in Connection Builder, but it will working well in my app.
    Packet size changing is also working.

    Thanks for your assistance Dan!

    Tuesday, October 8, 2019 12:51 PM
  • Hi Németh.Zoltán,

     

    Would you please refer to  Make It Easier for the DBA: Give SQL Connections the Application’s Name! ?

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, October 9, 2019 7:06 AM
  • Hi,

    Yes, of course I did exactly that.

    Regards

    Zoltán Németh

    Wednesday, October 9, 2019 10:08 AM
  • I don't know why the app name feature does not work in Connection Builder, but it will working well in my app.

    Packet size changing is also working.

    Be aware that UDL files are inherently insecure because the credentials are stored in clear text.

    I suspect a bug in the Connection Builder component. You might report this to the vendor (Embarcadero).


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    • Proposed as answer by pituachMVP Wednesday, October 9, 2019 1:30 PM
    Wednesday, October 9, 2019 11:32 AM
  • Yes of course, I don't store login information in clear text, I used UDL files for testing new SQL Server clients only.

    Connection Builder is a Microsoft tool, this is the oledb32.dll, running with OpenDSLFile + filename parameters. If is it bug, it is Microsoft's bug, not Embarcadero's bug.

    Wednesday, October 9, 2019 5:02 PM
  • Hi Németh.Zoltán,

     

     I  recommend you to submit it to the Microsoft feedback at this link https://feedback.azure.com/forums/908035-sql-server . This site will serve as a connecting point between you and Microsoft, and ultimately the large community for you and Microsoft to interact with. Your feedback enables Microsoft to offer the best software and deliver superior services, meanwhile you can learn more about and contribute to the exciting projects on Microsoft feedback.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, October 10, 2019 9:48 AM
  • Connection Builder is a Microsoft tool, this is the oledb32.dll, running with OpenDSLFile + filename parameters. If is it bug, it is Microsoft's bug, not Embarcadero's bug.

    Sorry, since you specifically mentioned CodeGear TADOConnection, I assumed that was the connection builder component you were having problems with.


    Dan Guzman, Data Platform MVP, http://www.dbdelta.com

    Thursday, October 10, 2019 11:19 AM