Click here to Skip to main content
15,358,946 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using MS Sql server and i need to create a replica of my Database for testing purpose and whenever any changes made on my database then the replica database will be automatically update or i update my replica database using any command. Is anyone suggest me the solution.

What I have tried:

I google it but not found any proper solution. i found only backup and restore and export data option in ms-sql. which is not the right solution for me.
Updated 12-Jul-21 3:23am

Your development DB shouldn't even be on the same server instance as the production DB, much less linked in any way to the actual data.

You should be using a local-to-your-dev-machine SQL server instance (Express is fine) and a separate copy of the DB as any tiny mistake on your part - and they are easy to make when you're in a hurry to fix something - can badly affect the production data.
Or better, representative sample data in the same table structure in a local copy so you don't have to worry about data protection and GDPR.

You - the developer - shouldn't have access to production data at all!
Database replication is not an easy subject, but you might try one of these solutions:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900