View Issue Details

IDProjectCategoryView StatusLast Update
0009541mantisbtdb mssqlpublic2015-03-15 19:58
ReporterReynoldTucan Assigned Todregad  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformWindows, PHP, MS SQLOSWindows XP 
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)
Description

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".

Example:
$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.

Activities

grangeway

grangeway

2008-09-27 17:16

reporter   ~0019473

Hello,

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

  1. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=7ea2b2f46a0f1a3320d2dfe98c8660fcf4f80d3c
    odbc_mssql driver does not like using category_name in order by clause, instead it seems to be happier if using c.name.

  2. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=fd80f0844c0581c94ef42015537972224bd90cd4
    allow odbc_mssql to be used as a driver in the upgrade scripts.

  3. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=d07f0b61e48a5ecbd8d0ccd65a417763ff84653a
    Add custom_field_cache_array_rows
    Fix mssql/postgres queries in custom_field project_links

  4. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=50912296eac829f95b58fdc959986a3cd933d821
    Fix mssql query issue - date_submitted is ambigious - we're after bug_table one.

  5. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=f09ca8df67acf35b55b25f3b8ae9040603ac1e5f
    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.

  1. http://git.mantisforge.org/?p=mantisbt.git;a=commit;h=7c5183e2398ee8374df87c0ae549cef50af6b888
    odbc_mssql seems to populate ->fields
grangeway

grangeway

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.

grangeway

grangeway

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.

grangeway

grangeway

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 paul@mantisforge.org

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

Thanks
Paul

dregad

dregad

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.