Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14679 META: DB layer 2.0
  3. MDL-17969

Implement native MS sql server drivers (freetds and sqlsrv)



    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Database:
      Microsoft SQL
    • Affected Branches:
    • Fixed Branches:


      For now we have only adodb based legacy drivers for ms sql server. We have several options in 1.9x, unfortunately the level of support and quality does not meet mysql or pgsql drivers.

      I appears that the FreeTDS/mssql driver works fine in Linux, but there are some problems running it on Win 32 platforms (luckily we are now testing newly compiled dlls that could improve the situation).
      There is another alternative - Microsoft released recently new sql server PHP driver, unfortunately this driver works only on win32 platforms.

      Solution is to create two native DML drivers - freetds/mssql and brand new sqlsrv.

      Known problems:
      1/ session locking support missing - db sessions do not work, we will have to find some equivalent to get_lock() mysql feature
      2/ encoding conversions in sqlsrv driver - it does not support utf-8
      3/ review and testing of new moodle 2.0dev code (last 12 months)

      I guess this could take roughly 21 days to get it ready for production use. More time will be required for continual review and testing of new code in HEAD

      MS provided us with free licenses for development - at least there would not be any extra license costs for testing of this closed, proprietary database, but I doubt anybody will do this in his/her free time




            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created:
                Fix Release Date: