Copied to clipboard

Flag this post as spam?

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


  • Joe Dirte 21 posts 163 karma points
    Mar 25, 2017 @ 13:18
    Joe Dirte
    0

    Issues migrating from local DB to azure

    Hey guys, I've built up a local umbraco site using the SQLCE db and am ready to migrate it to production.

    One of the requirements is to leverage an Azure sql instance for the data store - simple enough right?

    I installed SQLCE Toolbox for VS and migrated my DB to azure. This was pretty seamless. Everything is laid down as it should be and tables are populated with data.

    I modified the connString for umbracoDbDSN to point to the new azure sql instance and am trying to build one last time before I publish

    <add name="umbracoDbDSN" connectionString="Server=tcp:hideo,1433;Initial Catalog=hideo;Persist Security Info=False;User ID=hideo;Password=hideo;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" />
    

    and blamo I get hit with a yellow screen of death.

    Error: Value cannot be null. Parameter name: sqlSyntax

    [ArgumentNullException: Value cannot be null. Parameter name: sqlSyntax] Umbraco.Core.Persistence.Repositories.PetaPocoRepositoryBase`2..ctor(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax) +84 Umbraco.Core.Persistence.RepositoryFactory.CreateDomainRepository(IDatabaseUnitOfWork uow) +44 Umbraco.Core.Services.DomainService.GetAll(Boolean includeWildcards) +48 Umbraco.Web.Routing.PublishedContentRequestEngine.FindDomain() +286 Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest() +26 Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +361 Umbraco.Web.UmbracoModule.

    If I roll things back to the local (SQLCE) everything works fine, so it's something with a connection string.... somewhere. (Yes local IP is whitelisted on azure sql firewall)

    Anyone have any thoughts, or article where this kind of migration is covered. I've had to piece together things from different sources so it is entirely possible (dare I say absolute) that I missed something.

  • Steven Harland 78 posts 518 karma points c-trib
    Mar 25, 2017 @ 15:54
    Steven Harland
    100

    You need to add the providerName attribute:

    <add name="umbracoDbDSN" connectionString="Server=tcp:hideo,1433;Initial Catalog=hideo;Persist Security Info=False;User ID=hideo;Password=hideo;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.SqlClient" />
    
  • Joe Dirte 21 posts 163 karma points
    Mar 25, 2017 @ 16:38
    Joe Dirte
    0

    Bah. I need to stop working on weekends.

    Thanks for slapping me awake Steven.

Please Sign in or register to post replies

Write your reply to:

Draft