Page 1 of 1

Changing the database connection

Posted: Sat Nov 08, 2008 10:19 am
by Reddirt
I have pre-production store running on a web host. I've also installed Able on my PC.
I did a .bkp of the database on the web host using SQL Server Manager and created a new dbms on my PC and restored the dbms from the web host (the downloaded .bkp file).

1) How can I change the web.config file to point to the new database on my PC?

2) What is the best method of keeping the web host and PC sites in synch?
Use Visual Web Developer or Beyond Compare?

Thanks,
Reddirt

Re: Changing the database connection

Posted: Mon Nov 10, 2008 5:12 am
by mazhar
1) How can I change the web.config file to point to the new database on my PC?
From the admin side navigate to the Configure > Security > Database. You can change the database string on this page.
Or You can manually change the connection string in the App_Data/database.config file. Read the following post,
viewtopic.php?f=42&t=8827

Re: Changing the database connection

Posted: Mon Nov 10, 2008 12:19 pm
by WylieE
Reddirt wrote:
2) What is the best method of keeping the web host and PC sites in synch?
Use Visual Web Developer or Beyond Compare?

Reddirt
This is is something I've been digging through and trying to see what would work best for us. Sorry, I don't have a solution, but maybe we can work through it together.

Our scenario:
We do our development on an in-house server and have our production web/SQL servers located at a large hosting company. The outside company manages the servers for us but we have ftp and SMS access to the servers. This only differs from AC customers using hosting companies in that we own the servers and don't share with anyone else.

I'll presume you're like us in that you do your development and testing on one server and want to push/synchronize/publish your tested changes to your production server. Beyond Compare has been convenient for pushing file changes to the production site. However, it does not handle the SQL table changes. This is where we're still researching. What is the best way to synchronize SQL table changes? We must keep in mind the production tables will always have more recent customer & order activity and we wouldn't want to accidentally push old data.

As an alternative, would it be better to pull a copy of the production database to the local development server, make & test changes, then manually make the changes to the production site? This could be extremely tedious if major changes are made.

Comments, suggestions, school of hard knocks from the folks that have had live sites for a while?

Re: Changing the database connection

Posted: Thu Nov 20, 2008 11:49 am
by WylieE
Just a quick follow up here. We've been using Beyond Compare to synchronize our site files between our development server and production site.

I've recently stumbled across a program that is essentially Beyond Compare for SQL. It is called SQL Data Examiner. http://www.sqlaccessories.com/ We've used this a few times to synchronize tables and it has worked flawlessly. Really cool!