error when installing

Dean's Avatar

Dean

22 Feb, 2013 06:32 PM

Windows 7, SQLExpress 2008 R2. I'm doing the initial install and I get this error:

Cannot upgrade to '0.1.321'

HgLab.Core.Framework.Db.DbMigrationException: Cannot upgrade to '0.1.321' ---> HgLab.Core.Framework.Db.DbMigrationException: Cannot execute 'insert into Setting
values ((select coalesce(max(ID), 0) + 1 from [Setting]), N'security.catalogs.integrated.integrated', N'enable-integrated-authentication', N'true'); insert into SchemaInfo values (20121030191502);
' ---> System.Data.SqlClient.SqlException: Subqueries are not allowed in this context. Only scalar expressions are allowed. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at HgLab.Core.Framework.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 95 --- End of inner exception stack trace --- at HgLab.Core.Framework.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 100 at HgLab.Core.Framework.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 76 --- End of inner exception stack trace --- at HgLab.Core.Framework.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 81 at HgLab.Core.Framework.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, List`1 migrationVersions) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 65 at HgLab.Core.Framework.Db.DbSchemaMigration.UpgradeDatabase(Version currentVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Db\DbSchemaMigration.cs:line 53 at HgLab.Areas.Dashboard.Controllers.SetupController.Setup(SetupModel model) in d:\Projects\hglab\src\HgLab\Areas\Dashboard\Controllers\SetupController.cs:line 51

  1. Support Staff 1 Posted by Anton Gogolev on 23 Feb, 2013 01:27 PM

    Anton Gogolev's Avatar

    Dean,

    Thanks for reporting! I'll try to reproduce the issue.

    Is this a fresh install on a newly created, empty database?

  2. 2 Posted by Dean on 24 Feb, 2013 05:14 AM

    Dean's Avatar

    Yes, a brand new, empty database.

  3. Support Staff 3 Posted by Anton Gogolev on 28 Feb, 2013 11:43 AM

    Anton Gogolev's Avatar

    Dean, sorry for the long wait.

    That's all very strange. Folks at DBA.SX say this is highly unlikely: http://dba.stackexchange.com/q/35386/11154

    If you could try executing the offending SQL

    INSERT INTO [Setting]
                ([ID],
                 [Module],
                 [Property],
                 [Value])
    VALUES      ((SELECT COALESCE(max(ID), 0) + 1
                  FROM   [Setting]),
                 N'security.catalogs.integrated.integrated',
                 N'enable-integrated-authentication',
                 N'true')
    

    in SQL Server Management Studio to see if this causes any errors, that would be great.

    Otherwise, we can schedule a TeamViewer session so that I could debug this issue more thoroughly.

    Thanks!

  4. Support Staff 4 Posted by Anton Gogolev on 01 Mar, 2013 09:31 AM

    Anton Gogolev's Avatar

    Dean,

    Just to make sure you're really running under SQL Server 2008 R2: could you please show me the output of this command on your SQL Server instance where hglab database is running:

    select @@version

  5. Anton Gogolev closed this discussion on 22 Aug, 2013 07:56 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM
21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM

 

18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM