Tip: How to move your SQL db from live to development

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Tip: How to move your SQL db from live to development

Post by AbleMods » Wed Dec 05, 2007 5:29 am

Every so often I need to update my development db so it matches the live db. Here are the steps I take to do it.

1. Perform a backup of the live db to a backup file using the Backup database feature in the SQL console.

2. Download the backup file to your development db server. In my case, it's a separate WinXP machine on my LAN.

3. Open the development db SQL console. Right-click the Databases container and choose Restore Database.

4. When the restore window appears, select your AC7 database in the Destination pulldown on the right side.

5. For the restore source, set it to "From Device" and add the file your downloaded using the file chooser dialog.

6. Once a valid file has been selected, you will return to the main restore screen. The list of available backups to restore will be displayed below, in the Backup Sets window. Click the checkbox for the backup you want to restore.

7. On the left side of the Restore Databases screen will be a second option labelled "Options". Choose it and select the checkbox for "Overwrite Existing Database"

8. Click OK to begin the restore.

9. Once the restore is done, open your AC7 database, expand Tables and scroll down to the dbo.ac_StoreSettings table.

10. Right-click the dbo.ac_StoreSettings table and choose Open Table. The table records will appear to the right. Scroll down until you find an entry for FieldName=SSLEnabled. Set the value for that entry to False.

11. Move your cursor off the record to commit the table change to disk. Close the SQL console.

12. I restart IIS on my dev machine just for good measure. Probably not a requirement, but never hurts.

Try to log into your development store. If it attempts to redirect your admin login to an HTTPS: connection, you didn't do Step 10 correctly.

Remember, you've disabled SSL in this database. If you subsequently upload this database back to live, you MUST go into AC7 Admin and turn SSL support back on again after you restore the db on your live server.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

herchenx
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Mon Sep 24, 2007 4:10 pm
Location: Fort Collins, CO

Post by herchenx » Thu Dec 06, 2007 3:19 pm

what would you recommend as a process for this scenario:

We have a site at an IP address with a developer license running.
We need to switch this license to a production license
We will need to change the site to use the domain at the same time.

I am concerned that when we change the URL that the site will try to infinitely redirect to the old URL. I tested changing the FiledValue for Store_StoreUrl in teh ac_StoreSettings table, then hitting the new URL, but it keeps bouncing me back to the IP address.

I am also concerned that if we change the URL that the license key won't work.

Any ideas?

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Thu Dec 06, 2007 5:13 pm

My scenario was the same...

1. Change the site name to the production URL in AC7 Admin.
2. Change the IIS assigned IP to the production IP address.
3. Restart IIS.
4. Rename the ~/app_Data/CommerceBuilder.lic file to .old
5. Pull up a browser and go to your production URL.
6. The server should take you straight to a page that lets you enter an AC7 keycode. Enter your production code.

The site should now be functional at the production URL. Now get your SSL certificate assigned to your site in IIS and configure SSL in AC7.

It bounces back because the CommerceBuilder code will only generate URLs to which the license file is keyed.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply