Copied to clipboard

Flag this post as spam?

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


  • P.J. Melies 18 posts 108 karma points
    Apr 06, 2022 @ 01:41
    P.J. Melies
    0

    Migrate content from v8 to new v9 project

    I'm working on "migrating" one of our Umbraco Cloud v8 sites over to v9 and I'm following the documentation here.

    I have the new, blank v9 site running locally and I've also got the old v8 site running as well. I've copied the v8 database mdf files over to the umbraco\data folder in the v9 site and renamed them Umbraco8.mdf (.ldf). Now I'm trying to update the appsettings.json file's connection string as per the documentation above but I'm not familiar with how to properly specify the connection string to point to a particular mdf file.

    Currently I have

    "ConnectionStrings": {
        "umbracoDbDSN": "Data Source=(LocalDB)\\MSSQLLocalDB; AttachDbFileName=|DataDirectory|\\Umbraco8.mdf; Integrated Security=True; Connect Timeout=30; MultipleActiveResultSets=True"
    },
    

    but with this connection string the site doesn't go through the upgrade process like the documentation is telling me it should. Instead Umbraco is displaying a "Page Not Found" page and I'm pretty sure it's because I don't have the connection string correct.

    I get the same behavior if I instead overwrite the v9 mdf files with the v8 mdf files and then clear out the connection string altogether.

    Also, I'm not opposed to taking a backup of our v8 Development environment's database (bacpac) and restoring that into my localDB and then using a connection string to that db but when I tried to do that the import wizard failed with errors (see below).

        TITLE: Microsoft SQL Server Management Studio
    ------------------------------
    
    Could not import package.
    Warning SQL72012: The object [Heliosv8_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
    Warning SQL72012: The object [Heliosv8_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
    Error SQL72014: .Net SqlClient Data Provider: Msg 12824, Level 16, State 1, Line 5 The sp_configure value 'contained database authentication' must be set to 1 in order to alter a contained database.  You may need to use RECONFIGURE to set the value_in_use.
    Error SQL72045: Script execution error.  The executed script:
    IF EXISTS (SELECT 1
               FROM   [master].[dbo].[sysdatabases]
               WHERE  [name] = N'$(DatabaseName)')
        BEGIN
            ALTER DATABASE [$(DatabaseName)]
                SET CONTAINMENT = PARTIAL 
                WITH ROLLBACK IMMEDIATE;
        END
    
    
    Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.
    Error SQL72045: Script execution error.  The executed script:
    IF EXISTS (SELECT 1
               FROM   [master].[dbo].[sysdatabases]
               WHERE  [name] = N'$(DatabaseName)')
        BEGIN
            ALTER DATABASE [$(DatabaseName)]
                SET CONTAINMENT = PARTIAL 
                WITH ROLLBACK IMMEDIATE;
        END
    
    
     (Microsoft.SqlServer.Dac)
    

    How does one "Update the connection string in the Umbraco 9 AppSetting.Json file so that it connects to the Umbraco 8 database" as specified in the Umbraco Migrate Umbraco 8 Cloud project to Umbraco 9 documentation?

  • Ambert van Unen 175 posts 819 karma points c-trib
    Apr 06, 2022 @ 07:20
    Ambert van Unen
    0

    If you get the 'page not found' notification, is is your browser giving the 404 - page not found, or is it an umbraco page saying 'page not found'?

  • P.J. Melies 18 posts 108 karma points
    Apr 13, 2022 @ 02:00
    P.J. Melies
    0

    The 404 page was an Umbraco page.
    After further review I can see that the 404 was thrown because Umbraco DID upgrade my old v8 database but then couldn't find the template for the home page (I hadn't yet moved over any of our razor files or custom code to the new site).
    I was never presented with a page that said "Updating your site..." like I was expecting.

Please Sign in or register to post replies

Write your reply to:

Draft