Nop 4.2 MSSQL Database

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
hello
i have web site running under no 4.2 and had some issue happen and i need to start all over from zero. so i backup database and restore it in Microsoft SQL Mangment.
Then i have install new 4.2 live on web and want import some tables "product, customer" from old backup database to new Empty database.
is there solution or idea about this
thanks
3 years ago
You can generate script (for data only) from existing database by selecting your required table, then run this script on your new database.
You may follow this  https://dzone.com/articles/generate-database-scripts-with-data-in-sql-server
On step 3 select your required table
On step 5 select Data Only.
3 years ago
Hi
Thanks you.
is that step well deferent if i was use database as media storage location and with new one chose files system to save media. i well upload image product over again but the important is data
Regards
3 years ago
esmhos wrote:
Hi
Thanks you.
is that step well deferent if i was use database as media storage location and with new one chose files system to save media. i well upload image product over again but the important is data
Regards

Hi, Welcome.
In this case you can set IsNew to True (1) at all row in Picture Table. This will make sure to generate picture and thumbs from picture binary while retrieving the picture url. Take the same Picture Table and PictureBinary Table into your new Database.
Update [dbo].[Picture] set IsNew = 1

Note: There is a possibility of loosing all images as well.
3 years ago
RE:  "generate script (for data only) from existing database "
I do not think you can just do that without taking into consideration the IDENTITY fields (primary key).  You need to either understand / use  
  SET IDENTITY_INSERT tablename ON   (  OFF)
or not generate (or remove) the Id columns in your VALUES in script.
3 years ago
Hello
it working very good. thank you
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.