HgLab Setup Failed

Kim's Avatar

Kim

25 Jun, 2013 03:27 PM

HgLab could not set up HgLab 0.3.9.0 due to the following error:

Could not perform Setup to version 0.3.9.0
HgLab.Core.Framework.Servicing.ServicingException: Could not perform Setup to version 0.3.9.0 ---> HgLab.Core.Framework.Servicing.ServicingException: Could not execute DbMigrationTask for running version 0.0 and target version 0.3.9.0 ---> HgLab.Core.Framework.Servicing.Db.DbMigrationException: Cannot upgrade to '0.1.450' ---> HgLab.Core.Framework.Servicing.Db.DbMigrationException: Cannot execute 'insert into [Setting] (ID, [Module], [Property], [Value])
  values ((select coalesce(max(ID), 0) + 1 from [Setting] where ID < 10000), N'application', N'instance-identifier', replace(lower(newid()), '-', ''));
insert into [SchemaInfo] (Version) values (20121217075632);

' ---> 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, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 95
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.ApplyMigration(SqlTransaction sqlTransaction, SqlConnection sqlConnection, String migration) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 103
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 76
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, Version migrationVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 83
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(SqlTransaction sqlTransaction, SqlConnection sqlConnection, List`1 migrationVersions) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 65
   at HgLab.Core.Framework.Servicing.Db.DbSchemaMigration.UpgradeDatabase(Version currentVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Db\DbSchemaMigration.cs:line 53
   at HgLab.Core.Framework.Servicing.Impl.DbMigrationTask.InternalExecute(Version runningVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\DbMigrationTask.cs:line 12
   at HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line 21
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Task.Execute(Version runningVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Task.cs:line 30
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.ExecuteTaskSequence(IEnumerable`1 taskSequence, Version runningVersion, Version targetVersion) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 64
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformSetup(String fullName, String login, String emailAddress, String password) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 84
   --- End of inner exception stack trace ---
   at HgLab.Core.Framework.Servicing.Impl.ServicingManagerService.PerformSetup(String fullName, String login, String emailAddress, String password) in d:\Projects\hglab\src\HgLab.Core\Framework\Servicing\Impl\ServicingManagerService.cs:line 93
   at HgLab.Areas.Dashboard.Controllers.SetupController.Setup(SetupModel model) in d:\Projects\hglab\src\HgLab\Areas\Dashboard\Controllers\SetupController.cs:line 40

  1. Support Staff 1 Posted by Anton Gogolev on 25 Jun, 2013 04:27 PM

    Anton Gogolev's Avatar

    Kim,

    What version of SQL Server are you using?

  2. 2 Posted by Kim Walta on 25 Jun, 2013 05:32 PM

    Kim Walta's Avatar

    Hi Anton,
    It's currently using SQL2005. Our administrator thought that would be okay.
    Will have him move it to the 2008 version. Thanks for replying. Could you
    give an explanation why it wouldn't work on SQL2005 so I can tell my admin?

  3. Support Staff 3 Posted by Anton Gogolev on 26 Jun, 2013 08:35 AM

    Anton Gogolev's Avatar

    Kim,

    This "insert" statement uses SQL Server 2005-incompatible syntax ( see
    http://decoding.wordpress.com/2008/10/11/sql-server-insert-into-with-subquery/
    ).
    I'll see what I can do here with SQL Server 2005 support.

  4. 4 Posted by Kim Walta on 26 Jun, 2013 01:04 PM

    Kim Walta's Avatar

    Anton,
    Thank you for the explanation! I appreciate it.

    -Kim

  5. Anton Gogolev closed this discussion on 02 Jul, 2013 07:50 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

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

 

19 Dec, 2019 06:58 AM
21 Aug, 2019 09:07 AM
30 Jul, 2019 08:59 PM
31 May, 2019 02:29 PM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM