need help generating a script in SSMS

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
I have a small project which will require the following:

I need you to restore a backup of my sql server express 2012 database onto your sql server 2012 instance.
You will need to generate a sql script of the DATA ONLY of my dbo.Pictures table so that I can execute it over my new shared hosting database.

I am unable to do this because my local dev system is just 32bit, and the table and it's data is too large, so I get the OutOfMemoryException.

You will need 64bit architecture and plenty of RAM to achieve it, because just doing the /3gb boot switch didn't work for me. There are about 3,600 records with binary data.

I will pay via paypal.


also related...and something might preclude my need for assistance:

In media settings in admin area...if I click "CHANGE" from database storing of images, will it just generate the appropriate images into the /content/images/thumbs/ folder? Nevermind my question, I found this:
https://www.nopcommerce.com/boards/t/28506/mooving-images-from-database-to-file.aspx#115744

Steve
9 years ago
RE: " ...execute it over my new shared hosting database."

Note that just INSERTing picture records into the Picture table can be problematic...

The Id column is a foreign key in other tables.  Are you importing other entities from current DB too?
E.g. Product_Picture_Mapping table has a PictureId column.
9 years ago
embryo wrote:


also related...and something might preclude my need for assistance:

In media settings in admin area...if I click "CHANGE" from database storing of images, will it just generate the appropriate images into the /content/images/thumbs/ folder? Nevermind my question, I found this:
https://www.nopcommerce.com/boards/t/28506/mooving-images-from-database-to-file.aspx#115744

Steve


Hi

I had the same problem moving a smaller database with a few hundred products and despite having a 64bit machine with 16gb of ram I came up against the same issue.

So it did exactly what you are proposing after taking a back up of the database I switched Nop to store images in the file system, and it worked perfectly for me, then I could move the database without any problems.
9 years ago
New York wrote:
RE: " ...execute it over my new shared hosting database."

Note that just INSERTing picture records into the Picture table can be problematic...

The Id column is a foreign key in other tables.  Are you importing other entities from current DB too?
E.g. Product_Picture_Mapping table has a PictureId column.


Yes..I already generated scripts for all the other objects and have the site functioning...but with an empty pictures table..
(I generated a script for just the schema of the Pictures table) [ http://www.thistleandclover.co

I'm not sure what to do really. Godaddy support assured me that it was a simple single button click operation from within their own site...lies.

Once they set up my new hosting account and I had all my site files copied over to the new account and my backup made, per their suggestion, I cancelled the old hosting account, which killed my running SQL Server database.

When I discovered that I had been lied to and that there was no way to migrate a SQL database from their old hosting plans to their new ones I called them on it and they then sold me a $79 "migration service", which they promised would be done by day's end.

The next day when I called them (not done) they said that the person I was talking to was misinformed..they can't even migrate a SQL Server database from old to new Plesk hosting accounts...refund

I had no running database any longer to be able to generate the scripts on, so I had to restore that backup onto my local PC (running 2008 R2)..failed...so I upgraded to 2012, and it worked.

When I typed this initial post, I wasn't thinking....I realize now that I can't just "Change" from database to file system storing because my current database has no binary data in it's pictures table to convert.

I made a backup of my site prior to doing the 3.40 upgrade, which I still have. It contains all the binary data that I will need generated into script.

I am open to any and all suggestions at this point. I shudder to think that we'll have to manually re-add all our product and category photos...

Thanks,
Steve
9 years ago
If you upload your backup file to the host file system, then you should be able to restore the database.  If you want to try it now that you've already restored most from the scripts, then I recommend you create a new database (and you should probably also backup your new db too :)  If you create a new db, and restore successfully, be sure to change the connection info in /App_Data/Settings.txt
9 years ago
New York wrote:
If you upload your backup file to the host file system, then you should be able to restore the database.


That's very misleading information...
Had it been possible to simply upload and restore the backup from godaddy's old hosting account into their new plesk account, I'd have never gone through any of this mess.

You can upload it OK, but it absolutely is impossible to upload and restore a backup on the plesk panel that was generated on any server other than from that same plesk panel account login...the only backup i can generate or restore on the plesk panel is the same one that i created through plesk and built via script (and is missing the data I need)
...you also cannot do a restore operation through SSMS because godaddy restricts users from doing so...nor can users use the copy database wizard, or even create a new database..

Believe me when I say that I will forever preach about the horrors of Godaddy support. Their migration path from one type of hosting account to another is so lacking that it is impossible to do on their system, and they say cannot be done by anyone in the organization. They REQUIRE that their shared hosting customer download and install SQL Server 2012, learn to use SSMS and follow the generate scripts method I have followed. Did you hear that??...they REQUIRE that you use 3rd party software, yet immediately parrot the line: "But we don't support any 3rd party software." I'd say it was ludicrous if I hadn't already shed tears over it.

As I said, I have already performed the operation...a few times...it just fails to complete due to lack of available memory on my PC....so I know exactly how long it should take.

The restore of a backup file onto your PC will take about as long as it will take you to download the 488 mb bak file, and generating the script should also take less than 5 minutes to do...then you'd need to email or make the script available for download somewhere.

UPDATE: I am no longer looking for someone to perform this operation for me...thanks

Steve
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.