Upgrading 3.6 to 4.0 + Changing database from SQLCE to SQLSERVER

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
Hi there,

tl;dr:

• nopCommerce 3.6 with SQL Compact database
• Need to upgrade to 4.0 with SQL Server database
• Able to convert SQL CE .SDF to .SQL (but might be doing it wrong)
• Can load up .SQL and execute query without errors
• nopCommerce 3.6 throws "Error Happened" dialog box alert on various screens (e.g. "Manage Products")
• I can has advice plz? :-)

Longer version:

I'm a web developer / sysadmin with a strong background in *NIX environments and all thing LAMP-stack, and I'm perhaps "intermediately comfortable" when it comes to MS / IIS environments. I should also mention that I have zero familiarity with nopCommerce.

No less, I am trying to help a new client with an existing nopCommerce 3.6 site that relies on an SQL Compact .SDF database.

It's my understanding that in order to upgrade to nopCommerce to 4.0, a number of database upgrades need to happen, none of which are possible with an SQL Compact database.

As such, my first step in all of this has been to work on migrating the SQL Compact .SDF database to an SQL Server database.

My first attempt went as follows:

• I used a 3rd-party program called "CompactView" to open the .SDF file and export it to a .SQL file
• I created an MSSQL Server 2014 database on the host
• I connected to the database with SQL Server Management Studio 14
• I opened the .SQL file and clicked "Execute Query"

The .SQL file is about 89.5 million lines, so it took a good half hour to execute, but reported errors when done. So, I dropped all of the tables out of the DB, and sought out a more "official" way of doing things.

I discovered that MS Web Matrix 3 (now discontinued, but still available) can convert .SDF to .SQL using the "msdeploy" tool, and so installed all the necessary software and was successfully able to convert using the following command line string:

msdeploy -verb:sync -source:dbFullSql="Data Source=F:\path\Nop.Db.sdf",sqlCe=true -dest:dbFullSql="F:\path\NopDB.sql"


This again gave me a .SQL file, which I made my second attempt with:

• I connected to the database with SQL Server Management Studio 14
• I opened the new .SQL file and clicked "Execute Query"

The query fully executed in about 10 minutes this time, thankfully with no errors.

With that done, I opened up /nopcommerce/App_Data/settings.txt and changed the parameters within as follows:

DataProvider: sqlserver
DataConnectionString: Data Source=tcp:MyDBHostname99.com;Initial Catalog=DB_12345_DatabaseName;User ID=DB_12345_DatabaseUsername;Password=whatever;Integrated Security=False;


nopCommerce fired right up and let me login, and initially everything appeared to be in good shape – but then I tried going into "Manage Products", and was hit with a generic "Error Happened" dialog box. Poking around in a few other areas of the nopCommerce administration, I received the same "Error Happened" dialog box again and again.

Now I don't expect anyone who reads to this to magically know what might be going wrong – however, if anything I've done so far is incorrect or missing some steps, I would be grateful for any information on how do actually do things correctly.

Otherwise, if this boils down to needing to look at error logs to determine the issues that are occurring, any guidance that could be lent to that regard (e.g. where to find error logs on the server) would be extremely helpful and appreciated!

Thanks in advance for taking the time to read this, and any help/advise that can be offered. :-)
6 年 前
Hello,

I just sent you a private message. Please check.

Thank you,
Atul
6 年 前
RE: "opened up /nopcommerce/App_Data/settings.txt and changed the parameters" ...  
Are you still running nopCommerce 3.60?
6 年 前
New York wrote:
RE: "opened up /nopcommerce/App_Data/settings.txt and changed the parameters" ...  
Are you still running nopCommerce 3.60?


That's correct, unfortunately.

The client was (all too patiently) trying to work with another "developer" over the course of 2-3 years, and they never saw fit to upgrade it along the way. The developer finally admitted that they were in over their head technically, and so the client recently sought us out for help.

Based on what I'm seeing, I'm starting to fear we might not be able to help this client much either.

Keeping my fingers crossed, though!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.