In order to deploy my application I would like to copy db schema and content from my devel maschine to a production server. Even better, I’d like to be able to regularly communicate changes in the devel db to the production db by completely resetting the production db to an exact copy of the devel machine.
With mysql this would be easily accomplished by dumping the prod db to a file and loading the dump into the target db. Unfortunately, I couldn’t find similar functionality on my SQL Server (Express). The import/export functions I have been finding either only concern the schema, not the data, or they work on one table at the time, meaning that they don’t copy relationships between tables.
Copying a complete db would seem like a common problem so I hope there is a solution out there. Any advice?
Cheers,
Duffy
For a simple way of copying a database in sql server you will need to do backup and restore.
3 Steps:
1.)Steps on how to backup the database http://msdn.microsoft.com/en-us/library/ms187510.aspx
2.) In target server create a new database.
3.) Restore database. Right click on the newly created database and follow these steps…
http://msdn.microsoft.com/en-us/library/ms177429.aspx
And you are done!
If you want a real-time synchronization, you might wanna try replication… 🙂
Try reading this thorough documentation of replication. Check this out this will surely help you 🙂
http://technet.microsoft.com/en-us/library/ms151198.aspx