View Issue Details

IDProjectCategoryView StatusLast Update
0009541mantisbtdb mssqlpublic2015-03-15 19:58
ReporterReynoldTucanAssigned Todregad 
Status closedResolutionfixed 
PlatformWindows, PHP, MS SQLOSWindows XPOS Version
Product Version1.1.2 
Target Version1.3.0-beta.2Fixed in Version1.3.0-beta.2 
Summary0009541: Installation with MS SQL and odbc (odbc_mssql)

The standard option of selecting 'mssql' in config_inc.php or config_defaults_inc.php would not work for me. However, using a connection string as the host and setting the db type to 'odbc_mssql' would allow the tests to pass on "check.php".

$g_hostname = 'Driver={SQL Server};SERVER=MYSQLSERVER;DATABASE=Mantis;UID=mantislogin;PWD=mypass;';
$g_db_username = 'mantisdbuser';
$g_db_password = 'password';
$g_database_name = 'Mantis';
$g_db_schema = ''; // used in the case of db2

$g_db_type = 'odbc_mssql';

When attempting to install via "install.php", I could not get the installation to work using the MS SQL option in the drop down list. I suspected that it was because of the same reason described above - I needed to use odbc. So, as a quick fix I altered all of the lines reading "$g_db = ADONewConnection($f_db_type);" in "install.php" as shown below:

#$g_db = ADONewConnection($f_db_type); #comment this line out
$g_db = ADONewConnection('odbc_mssql') #hardcoded fix for an odbc_mssql connection

Obviously this hardcoded solution is not ideal for a generic release, but it worked in my instance and now Mantis is up and running great. I would suggest in the next release to add an ODBC MS SQL option to the drop down list of databases on the "install.php" page.

This might make things easier for people in my situation. Especially if they have limited php knowledge and can't fix the file for themselves.

TagsNo tags attached.




2008-09-27 17:16

reporter   ~0019473


I've just had an attempt at fixing a number of odbc_mssql issues in the latest development trunk (aka 1.2.x)

    odbc_mssql driver does not like using category_name in order by clause, instead it seems to be happier if using

    allow odbc_mssql to be used as a driver in the upgrade scripts.

    Add custom_field_cache_array_rows
    Fix mssql/postgres queries in custom_field project_links

    Fix mssql query issue - date_submitted is ambigious - we're after bug_table one.

    Fix ADODB odbc_mssql issues, fix mssql datadict
  • //if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls
    +//if ($ty == 'X') $fdefault = false;

These have been commented out as we've made possible values for custom fields as type X: ADODB doesn't allow 'type X' to be not null or have default values as some db's may not support it for some blob types - so far i'm not aware of any issues, and the behaviour of silently dropping DEFAULT/NOTNULL for blobs breaks updates for mssql.

    odbc_mssql seems to populate ->fields


2014-02-17 13:26

reporter   ~0039441

Marking as Suspended

MSSQL support is currently known broken. We are going to be replacing the DB Layer in Mantis to fix this properly after the next release.

I'd strongly advise using MYSQL for now.

The new DB layer already contains the appropriate fixes for MS SQL Support.



2014-03-27 19:12

reporter   ~0039771

MSSQL support is currently known broken. We are going to be replacing the DB Layer in Mantis to fix this properly after the next release.

I'd strongly advise using MYSQL for now.

The new DB layer already contains the appropriate fixes for MS SQL Support.



2014-05-16 15:00

reporter   ~0040315

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.




2015-03-14 14:02

developer   ~0049218

Despite the fact that I am not actually able to test whether the problem is truly resolved since I don't have access to a MSSQL server setup, I'm marking this issue as fixed in 1.3.x on the grounds that the recent updates in ADOdb (which contain many improvements in the MSSQL driver) are likely to address it.

Should the problem persist (using a nightly build or a version > 1.3.0-beta.1), feel free to reopen this issue or to create a new one.

Issue History

Date Modified Username Field Change
2008-08-14 12:54 ReynoldTucan New Issue
2008-09-27 17:16 grangeway Note Added: 0019473
2012-09-21 18:26 atrol Category installation => db mssql
2014-02-17 13:26 grangeway Note Added: 0039441
2014-03-27 19:12 grangeway Note Added: 0039771
2014-03-27 19:12 grangeway Status new => resolved
2014-03-27 19:12 grangeway Resolution open => suspended
2014-03-27 19:12 grangeway Assigned To => grangeway
2014-03-28 04:18 atrol Status resolved => assigned
2014-04-12 19:33 grangeway Target Version => 1.3.0-beta.1
2014-05-16 15:00 grangeway Note Added: 0040315
2014-05-23 15:08 grangeway Project mantisbt => @24@
2014-11-07 14:21 atrol Assigned To grangeway =>
2014-11-07 14:21 atrol Status assigned => new
2014-11-07 14:22 atrol Project @24@ => mantisbt
2014-12-08 02:10 atrol Target Version 1.3.0-beta.1 => 1.3.0-beta.2
2015-03-14 14:02 dregad Note Added: 0049218
2015-03-14 14:02 dregad Status new => resolved
2015-03-14 14:02 dregad Fixed in Version => 1.3.0-beta.2
2015-03-14 14:02 dregad Resolution suspended => fixed
2015-03-14 14:02 dregad Assigned To => dregad
2015-03-15 19:58 dregad Status resolved => closed