What if I’m a developer or QA person using a copy of production database to do my work. What if my copy of production is now out of date and I want to refresh my data with the data as it is on production.
Below is a video of how to refresh a virtual database to the freshest data from the source database:
This example uses the free version of Delphix called “Delphix Express” and “Landshark” demo environment consisting of two VMs a source VM with a source database and a target VM with no database originally where we provision a virtual database.
The first thing to do in this setup of Express with Landshark is turn on changed data collection by Delphix from the source. The demo environment turns this off by default (though a normal install of Delphix this would be on) , so the first thing to do is turn it on.
To access the data collection settings, click on the data source. The data source in this case is “Employee XE DB”. Click on it:
Then we see
click on the arrow underlined in red above. This opens up a detailed card on the data source:
in the bottom left of the card is a button that says “disable”. Slide it to enabled. Now Delphix will start gathering data changes from the source. We are going to make data changes on the source and then refresh a virtual database on the target so it see the new data.
Steps
Enter some new data on the source. We can enter data using the web application. The web application is accessible through IP address of the source VM followed by “:1080″ which designates the port the web application is running on as in http://172.16.160.160:1080
We can enter new employees in the bottom left. Say we enter “Larry Ellison”. So now the source data has data that is not in the currently running virtual database on the target machine.
Delphix will automatically capture these changes but is on the order of a minute or two behind the source changes. If you want to test this out quickly, as in the video above, you can take a snapshot of the data on the source which ensures that Delphix captures the data. To do this click the camera icon on the data source:
Now to refresh the virtual database on the target machine called “devdb”, click on the devdb line on the left of the Delphix console
Click on the up arrow (underlined in red above) which will pop out the detailed card on the virtual database:
In the bottom right of the card are a number of functions:
The functions are
Migrate virtual database to a different machine
Upgrade the Oracle version
Rollback
Refresh
Snapshot
Stop
We are going to use 4. Refresh which is the disk icon with V in the middle. When we click on this we will get a list of snapshots of source we can refresh to:
By default the most recent snapshot is active. You can click on other snapshots to “refresh” to older points in time. You can also click the slider on top of the snapshot cards to access a timeline where you can slide a pointer to the exact time you want to refresh to. In our case we want the most recent data, which is selected by default, and then click “Refresh” in the bottom right.
Now if we go into the target we application we will see “Larry” show up:
The above web application is going through the target which is on 172.16.160.161 where as the web application and database were we added the data as one 172.16.160.160.
Summary
All the above steps were taken in the administration UI for Delphix Admins but users can refresh through the self service interface. See the last blog post before this for an example of a users refreshing an environment. In normal cases we don’t go through most of the above steps. Delphix by default automatically collects changes from the source and all we have to do is click on the virtual database of interest, and click on the “refresh” icon for the database and then click the “provision” button and then we are refreshed with data on the source database.
Comentários