Installation problem

Lorenz Lammersdorf asked on October 4, 2017 16:27

Hi all,

I've a confusing problem. I try to install K10 on two local machines, one running Win7, the other Win10. The installation works perfectly on Win7, but it fails on Win10:

[2017-10-04 15:08:10] Creating DB "K10"...

[2017-10-04 15:08:10] Database "K10" created.

[2017-10-04 15:08:10] Creating DB objects...

[2017-10-04 15:08:10] Data creation failed Folder with default data must exist.

[2017-10-04 15:08:10] Failed to install database.Message: [DataConnection.HandleError]: 

Query: 
UPDATE [CMS_SettingsKey] SET KeyDefaultValue='10.0', KeyValue='10.0' WHERE KeyName='CMSDBVersion'

Caused exception: 
Invalid object name 'CMS_SettingsKey'.

Stack Trace: 
   at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex)
   at CMS.DataEngine.AbstractDataConnection.ExecuteNonQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
   at CMS.DataEngine.SqlInstallationHelper.InstallDatabase(String connectionString, String scriptsFolder, String dbObjectsErrMessage, String defaultDataErrMessage, LogMessage log, String dbSchema)
   at Installer.InstallationManager.InstallDatabase()
Invalid object name 'CMS_SettingsKey'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.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, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at CMS.DataEngine.AbstractDataConnection.ExecuteNonQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

[2017-10-04 15:08:10] Installation failed.

The database is created, but it has no tables.

This happens no matter if I try to install the database in SQL Server or use Kentico's localdb. The user is the same domain user and he has the same access rights on both PC.

Any ideas?

Thanks, Lorenz

Recent Answers


Rui Wang answered on October 4, 2017 16:59

Is the SQL server running on the Win10 machine or a separate SQL server? Can you try to make a backup of the DB you setup for the site running on Win7 and restore it for Win10?

0 votesVote for this answer Mark as a Correct answer

Matt Nield answered on October 4, 2017 18:20

Try running the installer on Windows 10 with elevated permissions (i.e. Run as administrator). I've had a couple of issues with SQL and file copies in the past installing on Windows 10 that simply go away when you install as admin. Also, make sure you select the 'overwrite database' option when you try again or delete the failed DB first.

0 votesVote for this answer Mark as a Correct answer

Lorenz Lammersdorf answered on October 5, 2017 10:21

hi matt, hi rui,

running the installer as admin changes nothing, it still fails while installing the database. if i start the browser based installation at http://localhost:8080/cmsinstall/instal.aspx afterwards the setup of the database works without a problem.

the sql server is on the same machine as kentico.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on October 5, 2017 15:42

is the SQL server setup correctly on the Win10? If you can't make a back up from Win7 database and restore in Win10, then there is something wrong with the SQL server.

0 votesVote for this answer Mark as a Correct answer

Matt Nield answered on October 5, 2017 16:15 (last edited on October 5, 2017 16:17)

Lorenze,

So what you're saying is that when you install by KIM or Kentico_10_0.exe, the DB has no objects created and fails. But when you use the web install, everything is fine?

If each of the two environments had their won DB then that might - as Rui says - point to SQL configuration issues. It seems odd that it wouldn't create tables but does not complain about connectivity. That to me would point to a difference in the permissions used by each user and that the web installation is using a different user than that of the installation application. Can you confirm whether or not you're using the same user for both?

0 votesVote for this answer Mark as a Correct answer

Lorenz Lammersdorf answered on October 6, 2017 08:13

good morning,

yes, kentico_10_0.exe fails, but the web installer runs without problems. it's the same database, the same sql server user id (I tried windows and sql server authentification) and the same windows user account (who is local admin). the problem seems to be that kentico_10_0.exe creates the database, but it doesn't write the

<add name="CMSConnectionString" connectionString="...

part of web.config. after the installer stops the connectionstrings definition in web.config looks like this:

<connectionStrings>
    <clear />
</connectionStrings>

rui, yes the datbase setup is correct. it's basically an out-of-the box sql server installation and it works for everything except the kentico installer.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on October 6, 2017 15:01

Lorenz, have you tried my suggestion by make a backup of the CMS database from your Win7 instance, copy the .bak file to Win10 instance, and do a direct resort to SQL server on Win10. Does that work?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.