[SOLVED]Switching from SQLite to MS SQL causing uSync problem
g
I'm encountering the following error while setting up my Umbraco project with uSync. I was working with SQLite locally, but I want to use MS SQL in the production environment. I started experiencing these errors after switching to MS SQL. Can you please assist me?
j
What sort of issues specifically? I worked through this yesterday and it was a case of adding the correct connection string details into appsettings.json:
Copy code
"ConnectionStrings": {
    "umbracoDbDSN": "[your MS SQL connection string];",
    "umbracoDbDSN_ProviderName": "Microsoft.Data.SqlClient"
  },
g
I get the following error when my appsetting.json file goes live via iis as follows BootFailedException: Boot failed: Umbraco cannot run. See Umbraco's log file for more details. -> Umbraco.Cms.Core.Exceptions.BootFailedException: Runtime mode validation failed for Production: Runtime minification setting needs to be set to a fixed cache buster (like Version or AppDomain) in production mode.
Copy code
json
{
  "$schema": "appsettings-schema.json",
  "Serilog": {
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information",
        "System": "Warning"
      }
    }
  },
  "Umbraco": {
    "CMS": {
      "Runtime": {
        "Mode": "Production"
      },
      "Global": {
        "UseHttps": true
      },
      "ModelsBuilder": {
        "ModelsMode": "Nothing"
      },
      "WebRouting": {
        "UmbracoApplicationUrl": "https://t.ifgc.org/"
      }

    }
  },
"ConnectionStrings": {
    "umbracoDbDSN": "Server=dnm;Database=dnm;User Id=dnm;Password=dnm;",
    "umbracoDbDSN_ProviderName": "System.Data.SqlClient"
}
}
Can you share an example appsetting.json
j
If things aren't working in the project where you've migrated the database type, might be worth creating a fresh Umbraco project with a MS SQL connection to check if there's anything missing? For reference, here are the appsettings.json & appsettings.Development.json which work in MS SQL:
g
I created a new umbraco project with msql and imported it with usync, but it gave a blocklist error.
what is the easiest way for me to create and migrate a new umbraco project
j
"it gave a blocklist error." What error specifically? What you're doing sounds correct.
k
yeah - do you have any specific errors, ? there should be no diffrence as far as uSync is concerned, but there are some DB diffrences in that SqlLite uses TEXT fileds in some places where MSSQL tables have VARCHAR(somenumber) so you could in theory get 'This will be Truncated" errors swapping but they do tend to be rare
g
my problem was solved when i changed db collation thank you for your help
14 Views