Migrating SQL Server 2014 Express SOHODOX based DB to a new machine

Migrating SQL Server 2014 Express SOHODOX based DB to a new machine


Note: The instructions in this article will only work for...
  • users who only want to move the SQL Server installation to another machine to improve performance.
  • users using the latest version (v10) of SOHODOX.
  • SOHODOX is configured with the DB Engine utility (a utility which converts your Access DB to SQL Server 2014 Express based DB). 
  • SOHODOX is using a SQL Server instance name SDXSQLEXPRESS
If you are using your own version or own instance of SQL Server Express edition, please write to support@sohodox.com

Backup the existing DB...
  • Take a backup of the existing DB using the SOHODOX Backup utility
  • Transfer the zip file (usually on the Desktop) created by this utility on the new machine.
  • On the new machine, extract the 'MainDB_sdx(DateTime).bak' and 'MainDB_sdx_cache(DateTime).bak'  from the zip file to the C:\Temp folder. (Please create the folder if it does not exist)
  • Rename MainDB_sdx(DateTime).bak  to  MainDB_sdx.bak
  • Rename MainDB_sdx_cache(DateTime).bak  to MainDB_sdx_cache.bak
Install the DB Engine utility...
  • On the new machine, download the SOHODOX DB Engine utility
  • Run the utility. 
  • Once the 'SOHODOX DB Engine Installer (SQLE) v3.0.0.10' dialog is launched, hit the Ctrl key. 
  • Select the option 'Only Install DB Engine'. 
  • Enter the email ID and click on Start.
  • Wait for the installation to be completed.
Restore DB to SQL...
  • Open the Command Prompt as Administrator.
  • Copy and Paste the command below...

    sqlcmd -E -S .\SDXSQLEXPRESS –Q "RESTORE DATABASE [MainDB_sdx] FROM DISK='C:\Temp\MainDB_sdx.bak' with stats=10"

  • You should receive a message 'Restore Database successfully processed'.
  • Copy and Paste the command below...

    sqlcmd -E -S .\SDXSQLEXPRESS -Q "RESTORE DATABASE [MainDB_sdx_cache] FROM DISK='C:\Temp\MainDB_sdx_cache.bak' with stats=10"

  • You should receive a message 'Restore Database successfully processed'.
Reconfigure SOHODOX 
  • Go to the machine on which SOHODOX is installed in server mode.
  • Press the Windows + R button. The Run dialog will be launched.
  • In the Open: textbox, type the following command…

    "C:\Program Files (x86)\Sohodox Desktop\Sohodox.exe" /reconfiguremaindb
    (We are assuming SOHODOX is installed in C:\Program Files (x86)\Sohodox Desktop if it is installed in another location then please modify the command by entering the correct location)

  • Now a dialog will launch. It will ask you to enter the credentials to login to MS SQL Server. 
                  Machine Name: Enter the  new machine name on which MS SQL Express is installed

                  For the Connection details...
                  (Please refer to a email sent to you earlier with the Subject 'SOHODOX DB Engine Connection Details'.). 
                  
                  If you do not have the email, please contact us.
  • Click the Test connection button to make sure the connection is successful.
  • Start SOHODOX.
Stop SQL Server Service on the old machine

We would recommend you to stop the service SQL Server (SDXSQLEXPRESS) running on the existing machine on which SOHODOX is installed.

To do this...
  • Press the Windows + R button. The Run dialog will be launched.
  • In the Open: textbox, type services.msc
  • Click OK. The Services dialog will launch.
  • Double-click the SQL Server (SDXSQLEXPRESS)  service.
  • Click the Stop button under Service Status.
  • Click OK.
  • Double-click the SQL Server (SDXSQLEXPRESS)  service. 
  • Set the Startup type to Disabled.
  • Click OK
Note: You can uninstall SQL Server from the old machine after confirm SOHODOX is working fine for a few days without any problems.