View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014095 | mantisbt | db mssql | public | 2012-03-26 07:05 | 2014-05-16 15:00 |
Reporter | marustik | Assigned To | dregad | ||
Priority | immediate | Severity | block | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
OS | Windows Server 2008 R2 | OS Version | W2008R2 | ||
Product Version | 1.2.9 | ||||
Summary | 0014095: Cannot initialize DB on SQL Server 2008 R2 | ||||
Description | Cannot install Mantis to MS SQL Database. Error messages is: BAD | ||||
Steps To Reproduce | We have two servers: I cretaed DB "MANTIS" on SQL server, created user "mantis" and gave him owner righst to DB "MANTIS". Then I went to page http://srv-mantis/mantisbt/admin/install.php and tried to install Mantis to DB but after click at "Install/Upgrade Database" I got this error at command "Schema DropColumnSQL ( mantis_tokens_table )": BAD | ||||
Tags | No tags attached. | ||||
Attached Files | datadict-mssqlnative.inc.php.patch (826 bytes)
--- D:/wamp/www/www.mantis.local/library/adodb/datadict/datadict-mssqlnative.inc-orig.php Sat Jun 09 07:29:03 2012 +++ D:/wamp/www/www.mantis.local/library/adodb/datadict/datadict-mssqlnative.inc.php Tue Aug 07 22:14:30 2012 @@ -189,8 +189,10 @@ $rs = $this->connection->Execute( "select name from sys.default_constraints WHERE object_name(parent_object_id) = '" . $tabname ."' AND col_name(parent_object_id, parent_column_id) = '" . $v . "'"); if ( is_object($rs) ) { $row = $rs->FetchRow(); - $constraintname = $row[0]; - $sql[] = 'ALTER TABLE '.$tabname.' DROP CONSTRAINT '. $constraintname; + if ($row) { + $constraintname = $row[0]; + $sql[] = 'ALTER TABLE '.$tabname.' DROP CONSTRAINT '. $constraintname; + } } $f[] = "\n$this->dropCol ".$this->NameQuote($v); | ||||
I had the same problem. I use WampServer, SQL Server Native driver and SQL Server 2005 Express and MantisBT v.1.2.11. I was able to install Mantis adding one condition to the <INSTALL_DIR>library\adodb\datadict\datadict-mssqlnative.inc.php file. It changes the DropColumnSQL method but I think the same condition should be added to the AlterColumnSQL method. |
|
Resolving as duplicate, please follow up in 0011524 |
|
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 |
|