Global Data Management Forum

 View Only
  • 1.  Is the directory clidriver really mandatory when published

    Posted Tue May 21, 2024 09:17 AM

    Hello

    I don't really understand why the clidriver directory should be copied when publishing an CLI application ?

    1. This lead to a big increase in the size of the final single executable file (+70Mo instead of +8Mo for a npgsql for exemple)
    2. This add a directory clidriver in the output directory where the executable is generated

    I believe (may be i am wrong) that theses files are only for testing cli/odbc connections isn't it ? 

    The DB2 .Net drivers shouldn't be included in the IBM.Data.Db2.dll only ?

    So why preserving the clidriver directory ?



    ------------------------------
    Romain FERRATON
    ------------------------------



  • 2.  RE: Is the directory clidriver really mandatory when published

    Posted Sun May 26, 2024 05:25 AM
    Edited by Krzysztof Duśko 30 days ago

    Hi, I also encountered issue with size of driver  and unfortunately these components are needed.. Whis IBM.Data.Db2.dll is only (very fat) wrapper over native C/C++ driver. Most of files inside clipdriver are needed. This is really a shame like you mention driver shoudynt be so big.. For example C# netezza driver is about 0,5 MB without any dependencies. 

    If you have many aps using DB2 driver on one machine you can mitigate this issue with AppDomain.AssemblyResolve Event (System) | Microsoft Learn or use proper "plugin pattern" Create a .NET Core application with plugins - .NET | Microsoft Learn - in both cases you can direct apliaction to find ddl's in external direcotry (one for one PS)  



    ------------------------------
    Krzysztof Duśko
    ------------------------------



  • 3.  RE: Is the directory clidriver really mandatory when published

    Posted Sun June 02, 2024 12:33 PM
    Edited by Romain FERRATON Sun June 02, 2024 12:33 PM

    Thanks for the answer Krzysztof 

    Do you think IBM will produce a pure C# driver for DB2 one day instead of a C++ driver wrapper ? Or it is just a dream that will never happended ?



    ------------------------------
    Romain FERRATON
    ------------------------------



  • 4.  RE: Is the directory clidriver really mandatory when published

    Posted 30 days ago

    well.. Its question for IBM. But in my opinion this will not happen any time soon if any



    ------------------------------
    Krzysztof Duśko
    ------------------------------