I want to create a test environment database that is refreshed from the production database every month or as needed (they would both be on the same server). It would not just be data refreshing because if I make changes to the schema I would like that to be updated as well. What would be the best way?
I have tried some powershell commands but most of them are for one time duplications like this. If powershell is the way to go I would like it to look for that database and if it exists I would like it to update.
SQL Server 2014 – Create/Update Test Database from Production
powershellsql serversql server 2014ssis
Related Question
- Sql-server – Preferred Methods of copying a new database from Development to Production
- Sql-server – Deploying SQL Server database changes from test to production server
- Sql-server – Scripting the copy of SQL Server production database to test environment
- Sql-server – What’s the best method to refresh only a few tables within a test database from production
- Sql-server – One way Synched Dev Database from Production Database
- SQL Server – How to Create a Test Copy of Production Database Updated Daily
- SQL Server – Creating Development/Test Environment for TB Reporting Database
Best Answer
Here is a very quick TSQL prototype that you could put into a SQL Agent job