For various reasons, I have a situation where the data in the SQL Server 2005 database hosted by my ISP is more up to date than the data in the matching SQL Server Express database on my own PC. I now want to synchronise these two databases but don't know how to do it.
Because I am still developing my ASP.NET 3.5 app, which has not yet been opened up to users, I am only used to synchronising in the other direction by first using the Database Publishing Wizard within Visual Web Developer 2008 Express to create a suitable script associated with my SQL Server Express database and then running this script in SQL Server Management Studio Express while connected to my online database. However, I have no idea how to reverse this process (which I guess will become a regular requirement once my app goes live). Assistance would be much appreciated.
David
![]() |
0 |
![]() |
I would get a copy of SqlCompare http://www.red-gate.com/products/SQL_Compare/index.htm and SqlDataCompare http://www.red-gate.com/products/SQL_Data_Compare/index.htm
They will pay for themselves almost the 1st time you use them; to synchronise 2 databases will take less than 10 minutes (probably less than 5).
Simon
Sharing Knowledge Saves Valuable Time!
www.sjmdev.com
![]() |
0 |
![]() |
Hi Simon,
Thanks for the suggestion, but at £245 (GBP) each for the standard editions, these products are not cheap. I am developing an app for a non-profit making organisation and funds are very tight. I was hoping that there was a way to do what I want using Microsoft SQL Server Management Studio Express......David
![]() |
0 |
![]() |
Could you connect to the other database with Visual Web, and attempt the publish from the other direction (reversing your current process)?
But to be honest that thought scares me a little as I suspect it may overwrite changes you've made to your development database. I have heard good things about this free tool http://www.xsqlsoftware.com/LiteEdition.aspx... but I've not used it much so I can't vouch for how good it is.
RedGate do offer a package deal (bundle) for both programs http://www.red-gate.com/products/sql_bundles/index.htm it's only £345 so quite good value compared to buying them both separately, though I appreciate that may still be too much for the budget. But if its an on-going thing then it will pay for itself.
Simon
Sharing Knowledge Saves Valuable Time!
www.sjmdev.com
![]() |
0 |
![]() |
What is the nature of your access to the database at your ISP? For example do you have console access? In which case:
![]() |
0 |
![]() |
ganseki:
Could you connect to the other database with Visual Web, and attempt the publish from the other direction (reversing your current process)?But to be honest that thought scares me a little as I suspect it may overwrite changes you've made to your development database. I have heard good things about this free tool http://www.xsqlsoftware.com/LiteEdition.aspx... but I've not used it much so I can't vouch for how good it is.
Simon,
I might be able to do the reverse process using VWD but it's going to take me a while to learn how to set up the connection. I'll also check out your link. Thanks for the info.David
![]() |
0 |
![]() |
TATWORTH:
What is the nature of your access to the database at your ISP? For example do you have console access? In which case:
- Export a database creation script from the remote database.
- Use the script to create a new database locally.
- Export say CSV files, table by table from the remote database.
- Copy the files locally.
- Load them using SSIS to the new local database.
If it is just read a lookup table, you could create a web service accessible only by the fixed IP address of your local PC and bring data back using the web service.
I'm a bit of a newbie so I don't really know what you mean by console access. I can certainly connect to the online database via Microsoft SQL Server Management Studio Express and my ISP enables some admin tasks via a Helm control panel. So far, I've haven't noticed if I have access to SQL Server Integration Services (but I'm a little doubtful about that).
![]() |
0 |
![]() |
>console access
Are you able to log on to the remote server with local administrator rights? It sounds like you have not got that level of access.
The web service method is probably the only way, unless you can back up the remote database and retrieve the backup. - Does you control panel allow that?
Who is your ISP?
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
![]() |
0 |
![]() |
I'm almost certain that I don't have local admin rights for the hosted database (shared Windows hosting by http://csnewmedia.co.uk/).
So far, I haven't spotted any database backup tools in Helm but I'll keep looking....
![]() |
0 |
![]() |
>So far, I haven't spotted any database backup tools in Helm but I'll keep looking....
If no database backup on the remote service, then you have to consider writing a web service anyway to do a backup (or import data).
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
![]() |
0 |
![]() |
TATWORTH:
If no database backup on the remote service, then you have to consider writing a web service anyway to do a backup (or import data).I'm only about half way through designing my application (having bought my very first ASP.NET textbook just over 3 months ago). One of the things I have yet to consider in any detail is what I do with the data that users will eventually create when the website goes live.
The app is for processing entries to an annual international photographic competition. For the 2008 competition, all entry forms were submitted on paper and entered by my colleagues into an Access 2003 database I wrote for the purpose. This database had a 'front end' and a 'back end', as is normal with Access apps, and the back end was a standard Access Jet database. I converted this back end into a SQL Server Express database and then used this to create the database for my new website (intended to permit online entries for 2009). A few weeks after the closing date for entries the judging will take place, a process that will probably continue to be handled by my Access app.
Plan A is to modify my Access front end to work with the SQL Server Express back end (a non-trivial task) and then synchronise it with the online version on a regular basis right up to the closing date (and do my backups locally). I'm not yet sure if there is a better Plan B.....
Whatever happens, I certainly need to find a reliable and affordable synchronisation tool. How complicated do you think it would be to write my own web service for this purpose, as you have suggested?
David
![]() |
0 |
![]() |
ganseki:
Could you connect to the other database with Visual Web, and attempt the publish from the other direction (reversing your current process)?Simon,
I am pleased to report that I was able to connect to my online database in the Database Explorer window of VWD and then run the Database Publishing Wizard to create a script. I then opened up Management Studio Express and connected to my local SQL Server Express databases. With the target database highlighted, I then executed this new script. All the new data that was in my online database was then successfully transferred to the SQL Server Express version.I'm still waiting for some feedback from XSQL about their free LiteEdition product. It may be that this will offer some additional benefits; time will tell. In the meantime, I do now have what appears to be a viable solution to my problem. Thanks for suggesting what I should have thought of myself!
David
![]() |
0 |
![]() |
Just needed a fresh pair of eyes on the problem I guess
Pleased you got it working
Simon
Sharing Knowledge Saves Valuable Time!
www.sjmdev.com
![]() |
0 |
![]() |