Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • shenyi bao 5 posts 75 karma points
    Dec 28, 2016 @ 16:43
    shenyi bao
    0

    migrate sql ce to sql server 2014

    Hello, I installed umbraco on slq ce and used "ExportSQLCE40.exe "Data Source=umbraco.sdf;" umbraco.sql" to load tables to sql server 2014.

    Finally, I tried to repalce "umbracoDbDSN" with following sql server 2014 conenction and got the error.

    I already test this connection string and it works fine in vs 2015.

    Does umbraco support SQL server 2014? Any changes should be done to web.config.

    Thanks,

    Shenyi

    Error:
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'IIS APPPOOL\Bobydo'.
    Source Error: 
    Line 123:            //Guard.ArgumentNotNull(action, "action");
    Line 124:
    Line 125:            this.ExecuteAction(() => { action(); return default(object); });
    Line 126:        }
    Line 127:
    Source File: C:\Umbraco-CMS7.5.6\Umbraco-CMS-release-7.5.6\src\Umbraco.Core\Persistence\FaultHandling\RetryPolicy.cs    Line: 125 
    

    Web.config:

    <add name="umbracoDbDSN"
    providerName="System.Data.SqlClient"
    connectionString="Data Source=localhost;Initial Catalog=Umbraco;Integrated Security=True;MultipleActiveResultSets=True" />
    
  • shenyi bao 5 posts 75 karma points
    Dec 28, 2016 @ 23:48
    shenyi bao
    0

    My developement environemnt: 1. SQL server 2014 2. use windows authentication to log on SQL server 2014 3. IIS 7.5 to create website to Umbraco-CMS-release-7.5.6\src\Umbraco.Web.UI folder

    I figured it out with following steps. 1. convert Sql ce to sql query file using "ExportSQLCE40.exe "Data Source=umbraco.sdf;" umbraco.sql" download from http://exportsqlce.codeplex.com/downloads/get/160019 2. check your applicaiotn pool Identity right click application pool and repalce default account with windows account that has sql permision 3. find a bug in code src\Umbraco.Core\Persistence\PetaPoco.cs "else if (dbtype.StartsWith("SqlClient")) _dbType = DBType.SqlServer; " was missed. 4. Now my first umbarco website works fine.

            if (dbtype.StartsWith("MySql")) _dbType = DBType.MySql;
            else if (dbtype.StartsWith("SqlCe")) _dbType = DBType.SqlServerCE;
            else if (dbtype.StartsWith("Npgsql")) _dbType = DBType.PostgreSQL;
            else if (dbtype.StartsWith("Oracle")) _dbType = DBType.Oracle;
            else if (dbtype.StartsWith("SQLite")) _dbType = DBType.SQLite;
            else if (dbtype.StartsWith("SqlClient")) _dbType = DBType.SqlServer; 
    
  • Nicola Ayan 7 posts 76 karma points
    Feb 05, 2018 @ 12:17
    Nicola Ayan
    0

    I had to install the SQL Server Compact 4.0 Runtime for the above to work. Here's a step-by-step guide on how I was able to achieve this: https://blog.nicolaayan.com/2018/02/how-to-migrate-sdf-database-to-sql-server/

Please Sign in or register to post replies

Write your reply to:

Draft