Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>(assuming that OP intended continual, real time schema and data synchronization)</em></p> <p><strong>Short Answer:</strong></p> <ul> <li>Schema - No - in an evolving system under development, UAT will likely already be ahead of production, and UAT will have changes intended for future production rollouts.</li> <li>Data - Perhaps (in order to get good, recent, representative data), although any schema differences may need to be adapted. An alternative would be to apply a fake data generator.</li> </ul> <p><strong>Rationale</strong></p> <p>By 'mirror' I'm assuming that you don't mean real-time direct mirroring or replication (UAT testing typically requires painstaking data test cases to be set up which would get overwritten).</p> <p>Here's how we do it in a corporate environment, FWIW</p> <p>At defined intervals, at usually approximately 1 month intervals</p> <ul> <li>The last prod database backup is restored over the QA environment (UAT refresh)</li> <li>An environment 'conversion' script is run on each database refreshed after restore (e.g. to point configuration, or to obfuscate sensitive financial, customer or user data, etc)</li> <li>All UAT scripts which weren't yet in PROD are then run against the databases (you will need good discipline with script management change control to easily track this - we still don't get this right all the time). After a refresh we do <em>not</em> directly compare UAT and QA and simply roll forward the changes back into UAT.</li> <li>This serves as good smoke testing / debugging, as these same vNext scripts would need to be run against Production at the point of Production release.</li> <li>Modern systems may not require explicit / external version migration scripts (e.g. Entity Framework Code First Migrations would attempt to upgrade the database schema at first run), although there may be risks to doing this when applying these to legacy or shared databases.</li> </ul> <p>Some other considerations</p> <ul> <li>In an enterprise environment where systems are integrated with each other, it is advisable to refresh all system's databases at the same time, so that shared data and keys are 'in synch'</li> <li>In many corporates, changes in the UAT environment (including data refreshes) can require change control board approval, since UAT availability is critical to new system rollouts and may affect many projects.</li> </ul> <p>Just a note on the 'script' cycle to synchronise schemas - in our environments:</p> <ul> <li>DEV is free for all - any developer lead can make DDL or data changes. </li> <li>QA and UAT are locked down - scripts need to be generated (usually by SQLCompare) and then sent to DBA's for execution (in QA) and approval and execution (UAT). (We are looking at ways of automating deployment to QA, however we do need to keep each script in SCM)</li> <li>These scripts are then checked into source control and tracked 'per environment'</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload