Lab Exercises
- Optional Advanced Exercise - Perform a Storage Performance Test through the CLI
- Exercise 1 - Delphix Data Platform Configuration
- Exercise 2 - Create the "delphix_db" User
- Exercise 3 - Validate the Source Environment with Hostchecker
- Exercise 4 - Add a Source Environment and Link a dSource
- Exercise 5 - Validate the Target Environment with Hostchecker
- Exercise 6 - Add Target Environments
- Exercise 7 - Provision a VDB
- Exercise 8 - Refresh a VDB
- Exercise 9 - Rewind a VDB
- Exercise 10 - Set a New Retention Policy
- Exercise 11 - Create and Save a Hook Operation Template
- Exercise 12 - Create a VDB Template
- Exercise 13 - Provision a VDB with Hook and VDB Template
- Optional Advanced Exercise - Measure Network Performance Test through the CLI
- Optional Advanced Exercise - Configure Delphix Replication
Lab Solutions
- Exercise 1 - Delphix Data Platform Setup
- Exercise 2 - Create the "delphix_db" User
- Exercise 3 - Validate the Source Environment with Hostchecker
- Exercise 4 - Add a Source Environment and Link a dSource
- Exercise 5 - Validate the Target Environment with Hostchecker
- Exercise 6 - Add Target Environment
- Exercise 7 - Provision a VDB
- Exercise 8 - Refresh a VDB
- Exercise 9 - Rewind a VDB
- Exercise 10 - Set a New Retention Policy
- Exercise 11 - Create and Save a Hook Operation Template
- Exercise 12 - Create a VDB Template
- Exercise 13 - Provision a VDB with Hook and VDB Template
Perform these exercises when instructed by your Delphix Instructor.
In this exercise, you will:
- Log into the Delphix Data Platform prior to configuration via the Delphix Command Line Interface (CLI)
- Perform a Storage Test
- View the Storage Test results
As an advanced exercise, this lab has no corresponding Lab Solution. Instead, we will walk through the steps to get you acquainted with your lab system and the Delphix CLI.
- On your Lab Server desktop, double-click on Terminal
- Type: ssh sysadmin@10.0.x.10 ('x' is your Student Number assigned by your instructor)
- If you receive a prompt asking you if you are sure you want to connect, enter: Yes
- Enter the password: sysadmin
- Escape to the standard CLI prompt by typing discard and then press the enter key
- You are now at the root of the Delphix CLI as a System Administrator
- Create a storage test by typing: storage test create and press the enter key
- List the default storage test parameters by typing: get
- Override the duration and set it to 5 minutes: set duration=5
- Begin the storage test by typing: commit
Note: The actual duration of the test may vary depending on the performance
of the attached storage. It is expected that this test will take anywhere
between 6 - 8 minutes to complete with duration set to 5.
Example Storage Test Configuration
- View the storage test results
- Get back to the storage test section of the CLI by typing: storage test and press the enter key
- Type the command
list
and press the enter key You should see the completed test listed. - Type
select
followed by the name of the test from the list. For example:select STORAGE_TEST-1
- Enter the result command by typing:
result
- Then type:
commit
In this exercise, you will:
-
Access the Delphix Data Platform GUI for the first time
-
Set up the Delphix SYSADMIN user
-
Configure Timezone Preferences
-
Configure Network Settings
-
Configure Storage
-
Complete the Delphix Data Platform configuration
-
Set up the DELPHIX_ADMIN user
-
Connect to your Delphix Data Platform using Chrome on your lab server (see the Important IP Addresses section of the Getting Started guide above).
-
Set the new sysadmin password to: delphix
-
Configure the Delphix Data Platform with the following details:
-
NTP on using pool.ntp.org with your local timezone
-
Default network settings
-
Three 8GB volumes in the data pool
-
Uncheck the "Enable phone home service" box in the Serviceability tab
-
Default Authentication Service options
-
Registration is not required for this lab
-
Completed and saved System setup.
-
-
Log in with the initial delphix_admin user credentials
-
Set the new delphix_admin password to: delphix
You will know this is successful when you see the main Delphix UI screen with
a single group (Untitled) on the left hand side.
Related Links
The delphix_admin and sysadmin User
Roles
Setting Up the Delphix Data
Platform
In this exercise, you will:
- Create a Delphix DB User on your source database
-
Use Terminal to SSH into your Linux Source (see the Important IP Addresses section of the Getting Started guide above).
-
Untar the hostchecker_linux_x86.tar file in your home directory
-
Inside the hostchecker folder run the createDelphixDBUser.sh command
export ORACLE_SID= orcl export ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1 cd hostchecker ./createDelphixDBUser.sh
-
Use the following details during the running of this script:
-
Instance Name: orcl
-
Delphix DB User Username: delphix_db
-
Delphix DB User Password: delphix_db
-
Decline the SELECT ANY DICTIONARY privilege. This is a sweeping privilege that is not required, but optional.
-
The script should configure and create the user without error.
In this exercise, you will:
- Use the 'hostchecker' program to run validation tests on your Linux Source
-
Use Terminal to SSH into your Linux Source (see the Important IP Addresses section of the Getting Started guide above).
-
Go to the hostchecker directory created in the previous exercise and type: ./hostchecker.sh
Note: If you exited your session or created a new session after completing the previous exercise, you need to set your environment variables again.
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
- Run hostchecker for a source and perform the following checks:
- Check on the delphix homedir
- Check the following ports on your Delphix Data Platform (10.0.x.10): 8415, 8341, 50001, and 873
- Check the Oracle installation for your current $ORACLE_HOME value
- Check the oratab file
- Check all instances on the machine
- Check for ssh connectivity
- Check for sudo privileges as the delphix user
- Check sshd_config for timeout
- Check the toolkit path of: /u01/app/toolkit
Were all tests successful? If not, which ones failed and why?
Note : The sshd_config test will return a WARNING response, which is
normal in a production installation due to permissions on the file. If
hostchecker is run as root for this test, it will perform the test properly.
In this exercise, you will:
- Connect Delphix to your Source Oracle Database server
- Create an Oracle dSource by syncing with your Source Oracle Database
- Create a Delphix Group to hold your dSource object
-
Log into the Delphix Data Platform as delphix_admin
-
Add your Linux Source as an Environment with the following details:
- Host OS: Unix/Linux
- Server Type: Standalone
- Environment Name: Source
- Host Address: 10.0.x.20 ('x' will be your Student Number )
- OS Username: delphix
- OS Password: delphix
- Toolkit Path: /u01/app/toolkit
Now, link the orcl dSource:
- Add the orcl dSource with the following details:
- DB Username and Password: The username/password you created in Exercise 2
- Use a new Group called: DB Sources
- Accept defaults for the Loading Options and Hooks
You will know this is successful if the dSource completes in the Actions pane without Errors. Click on Actions in the top menu bar if you don't see this pane.
In this exercise, you will:
- Use the 'hostchecker' program to run validation tests on your Linux Target
-
Use Terminal to SSH into your Linux Target A (see the Important IP Addresses section of the Getting Started guide above).
-
Untar the hostchecker_linux_x86.tar file in your home directory
-
Set the Oracle environment variables for the delphix os user as follows:
export ORACLE_SID= orcl export ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
-
Run hostchecker for a target and perform the following checks:
- Check on the delphix homedir
- Check the following ports on your Delphix Data Platform (10.0.x.10): 8415, 873, 22, 80, 443
- Check the Oracle installation for your current $ORACLE_HOME value
- Check for ssh connectivity
- Check the oratab file
- Check for sudo privileges as the delphix user
- Check sshd_config for timeout
- Check the toolkit path of: /u01/app/toolkit
If you have completed all of the checks and they have returned SUCCESS and ALL
OK, you have completed this exercise.
Note : The sshd_config test will return a WARNING response, which is
normal in a production installation due to permissions on the file. If
hostchecker is run as root for this test, it will perform the test properly.
In this exercise, you will:
- Connect Delphix to your Target Oracle server
-
Add your Linux Target Environment with the following details:
- Environment Name: Target
- Host Address: 10.0.x.30 ('x' will be your Student Number )
- OS Username: delphix
- OS Password: delphix
- Toolkit Path: /u01/app/toolkit
You can verify that this is complete by waiting for the Create and discover environment "10.0.x.30" action to complete on the right hand side of the screen in the Actions pane. Once it is complete, the Target environment will appear on the left side of the Environments page.
In this exercise, you will:
- Create a VDB called devdb
-
Select the orcl dSource and Provision a VDB with the following details:
- Destination Environment: Target
- Database Unique Name: devdb
- SID: devdb
- Database Name: devdb
- Mount Base: /mnt/provision
-
Add the VDB to a new group called DB Targets
-
Complete the VDB creation
It may take a couple minutes for the VDB creation to complete. You can monitor the progress on the left-hand side of the screen next to the devdb object in the DB Targets group. On the Actions pane on the right-hand side of the screen, you should see the Provision virtual database "devdb" item move to the Recently completed pane without error. Once the VDB is created, you can verify that the VDB is operational by:
-
SSH to Linux Target as the delphix user
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select name from v$database;
In this exercise, you will:
-
Create a new table on your source database
-
Snapshot the dSource
-
Refresh your VDB - devdb
-
Verify the new table appears on the VDB
-
Connect to your Linux Source server as the delphix user via SSH
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
create table sourcetab as select * from dba_objects;
-
Go back to the Delphix Data Platform GUI
-
Take a snapshot of the orcl dSource
-
Select the devdb VDB and click the Refresh button
-
Refresh the devdb VDB using the latest snapshot from the orcl dSource
Once the refresh has completed, you can log into devdb to confirm.
-
Connect to your Linux Target server as the delphix user via SSH
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select count(*)
from sourcetab;
If this returns a count of rows, the snapshot/refresh was successful.
In this exercise, you will:
-
Take a snapshot of the devdb VDB
-
Corrupt the devdb VDB to introduce a bootstrap error
-
Rewind the devdb VDB to recover from the error
-
Take a snapshot of the devdb VDB and note the time
-
Connect to your Linux Target server as the delphix user via SSH
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
delete from sys.obj$;
commit;
shutdown abort;
startup;
Note that the database is unable to come online due to a bootstrap error. The devdb database is now corrupted. Now we will rewind the VDB to the last good snapshot to fix this.
-
Select the devdb VDB
-
Select the snapshot associated with the date/time you recorded prior to corrupting your database.
-
Rewind the VDB to the snapshot you took prior to the corruption.
Once the rewind operation is complete, you can confirm the rewind was successful by connecting to the server again and querying the database:
-
Connect to your Linux Target server as the delphix user via SSH
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select count (*)
from dba_objects;
The count should come back clean, and the database is online
There are four types of Policies in Delphix. In this exercise, you will:
-
Create a Retention Policy
-
Set the new policy to keep snapshots and logs for 30 days, along with 3 monthly snapshots
-
Apply the policy to the VDB we created in the previous exercise
-
Navigate to Manage -> Policies
-
Create a new retention policy for devdb with the following details:
- Name: Long Term
- 30 days of snapshot and log retention
- 3 monthly snapshots taken on the 1st of the month
In this exercise, you will:
-
Create a Hook Operation Template called Create APPUSER
-
Insert code into the template that will log into a database and add a user named appuser
-
Create a new Hook Operation Template called: Create APPUSER
- Type: Shell Command
- Contents (enter exactly):
$ORACLE_HOME/bin/sqlplus / as sysdba << EOF
create user appuser identified by appuser;
grant connect, resource to appuser;
exit;
EOF
IMPORTANT: Make sure the carriage returns you see here are the same in the pasted contents.
- Finish and verify the Hook Operation Template appears in the list.
In this exercise, you will:
-
Create a VDB Configuration template called 1G Template
-
Set a custom Oracle parameter for this template
-
Navigate to Manage -> VDB Config Templates
-
Create a new Template with the name: 1G Template
-
Add a parameter to the template with the details:
- Name: memory_target
- Value: 1G
You can verify that this was successful by returning to the VDB Configuration Templates Wizard and clicking on the 1G Template item.
In this exercise, you will:
-
Create a VDB called qadb on Target
-
Use the VDB Configuration Template we created previously
-
Use the Hook Operation Template we created previously
-
Log into the VDB
-
Verify the VDB Configuration Template and Hook Operation Template were successful
-
Select the orcl dSource and Provision a VDB with the following details:
- Destination Environment: Target
- Database Unique Name: qadb
- SID: qadb
- Database Name: qadb
- Mount Base: /mnt/provision
- Configuration Template: 1G Template
- Group: DB Targets
- Configure Clone hook: Create APPUSER
-
Complete the VDB creation
It may take a couple minutes for the VDB creation to complete. You can monitor the progress on the left-hand side of the screen next to the qadb object in the DB Targets group. On the Actions pane on the right-hand side of the screen, you should see the Provision virtual database "qadb" item move to the Recently completed pane without error. Once the VDB is created, you can verify that the VDB is operational by:
-
SSH to Linux Target as the delphix user
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=qadb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
show parameter memory_target
connect appuser/appuser
This will verify that the VDB is online with the VDB Configuration Template we specified, and that the APPUSER user was created by our hook.
In this exercise, you will:
-
Log into the Delphix Data Platform CLI as delphix_admin
-
Perform a network latency test to Target
-
Perform a network throughput test to Target
As an advanced exercise, this lab has no corresponding Lab Solution. Instead, we will walk through the steps to get you acquainted the Delphix CLI for delphix_admin.
-
On your Lab Server desktop, double-click on Terminal
-
Type:
ssh delphix_admin@10.0.x.10
('x' is your Student Number assigned by your instructor)- If you receive a prompt asking you if you are sure you want to connect, enter: Yes
- Enter the password:
delphix
- You are now at the root of the Delphix CLI as a Delphix Administrator
-
Create a network latency test by typing: network test latency create
- List the default/required parameters by typing: get
- Set the remoteHost value to the TargetA environment IP address: set remoteHost=10.0.x.30 ('x' will be your Student Number )
- Begin the test by typing: commit
Example Network Latency Test Submission
- View the results of the latency test:
- Get to the latency test section again by typing: network test latency
- List the completed tests by typing: ls
- Type "select" followed by the name of the test from the list. For example:
select 10.0.1.30-2015-09-18T12:47:19.711Z
- View the results of the test by typing: get
Example Network Latency Test Results
- Create a network throughput test
- While still logged into the CLI, return to the root by typing: cd /
- Begin a network throughput test by typing: network test throughput create
- List the default/required parameters by typing: get
- Set the remoteHost value to the TargetA environment IP address: set remoteHost=10.0.x.30 ('x' will be your Student Number )
- Begin the test by typing: commit
Example Network Throughput Test Submission
-
View the results of the throughput test:
-
Get to the throughput test section again by typing: network test throughput
-
List the completed tests by typing: ls
-
Type "select" followed by the name of the test from the list. For example:
select 10.0.1.30-2015-09-18T13:13:08.152Z
-
View the results of the test by typing: get
-
Example Network Throughput Test Results
Note: This exercise is only possible if your classroom has been configured
with 2 or more students.
In this exercise, you will:
-
Set up a replication profile
-
Replicate your entire Delphix Data Platform to another Delphix Data Platform
-
View the replicas in the target Delphix Data Platform
As an advanced exercise, this lab has no corresponding Lab Solution. Instead, we will walk through the steps to get you acquainted the Delphix Replication capability.
-
In the Delphix GUI, select System and then Replication on the top menu bar
-
Add a Replication Profile called DR Replica
1. Click the _plus sign_ next to Replication Profiles on the top left
2. Enter a Replica Profile Name: **DR Replica**
3. For Target Engine, enter the Delphix Data Platform IP address for the next student in your classroom environment. If you are the last student, use the Delphix Data Platform IP address for Student 1. For example, in a class with 3 students:
1. Student 1 Delphix Data Platform is at 10.0.1.10, and they will replicate to 10.0.2.10
2. Student 2 Delphix Data Platform is at 10.0.2.10, and they will replicate to 10.0.3.10
3. Student 3 Delphix Data Platform is at 10.0.3.10, and they will replicate to 10.0.1.10
4. Ask your instructor if you have any questions or confusion about this configuration.
4. Enter the User Name: **delphix_admin**
5. Enter the Password: **delphix**
6. Do not enable Automatic Replication or configure Traffic Options
7. For the Objects Being Replicated, select: Entire Delphix Data Platform
8. Click Create at the bottom when ready.
Replication Profile Configuration
-
Start the Replication by clicking the Replicate Now button on the top right of your screen.
-
Click Replicate to confirm you are ready to begin.
-
Once the initial full replication is complete, you will see a message stating "Last Replication Successful."
Example Successful Replication
- Check the results on your target Delphix Data Platform
1. In your lab server browser, enter the IP address you used for the Target Engine in your replica profile. For example, if you are Student 1, your Delphix Data Platform is at 10.0.1.10, and your target would have been 10.0.2.10.
2. Log in as user delphix_admin with the password delphix
3. Observe the dropdown list under Datasets on the top left corner of your screen. It should have _Default_ _shown_ which is the default **Namespace** for Delphix replica targets.
4. In order to see the replica objects, click on the dropdown list and select the second entry, which should reflect the hostname of the source Delphix Data Platform that sent the replica.
Note: The hostname shown in the labs is based on the default hostname given
to the Delphix Data Platform in Amazon AWS, consisting of the prefix "ip"
followed by the IP address separated by hyphens.
Example Received Replica
-
While still logged into your target Delphix Data Platform, click on System and then Replication
-
Observe the Received Replicas section at the bottom, indicating and verifying the target's receipt of replication data.
1. Note: The _Failover Now_ option will not work for these labs due to namespace collisions. This is an inherent outcome to plan for when using Active/Active replication.
-
Connect to your Delphix Data Platform using Firefox on your lab server. The IP address will be 10.0.x.10, where "x" is your Student Number.
-
Review the Welcome page to understand the setup process
-
Set an email address and new password for the sysadmin user and click Next.
-
Configure Delphix to use NTP time with the pool.ntp.org NTP server. Change the timezone to your local timezone. Then click Next.
-
Review the network configuration and click Next. Do not make any changes to this section.
-
Review the disk layout and click Next. Do not make any changes to this section.
-
Review the Serviceability options and uncheck the "Enable phone home service" box then click Next.
-
Review the Authentication Service options and click Next. Do not make any changes to this section.
-
Click Next on the Registration page without making any changes.
-
Review the summary and click Submit to complete the System configuration.
Figure 1 Delphix Setup Summary Screen
-
Click Submit to save the configuration.
-
Click OK to acknowledge completion
-
Log in with credentials:
1. Username: delphix_admin
2. Password: delphix
Figure 2 Delphix Data Platform Login
- Set an email address and new password for the delphix_admin user
Figure 3 Delphix Data Platform Home Page
-
Connect to your Linux Source by opening Terminal on your Lab Server and running: conn 10.0.x.20 ('x' will be your Student Number ).
-
Observe the name and location of the hostchecker package by running the command: ls -ltr
-
Expand the hostchecker package by running: tar -xvf hostchecker_linux_x86.tar
-
Type: cd hostchecker
-
Observe the files present in this folder, which we will be using again: ls -ltr
-
Set the Oracle environment variables below:
1. export ORACLE_SID= **orcl**
2. export ORACLE_HOME= **/u01/app/oracle/product/11.2.0/dbhome_1**
-
Run the command: ./createDelphixDBUser.sh
-
Press Enter to accept the default instance name (orcl)
-
Enter the Delphix DB User Username: delphix_db
-
Enter the Delphix DB User Password: delphix_db
-
Type 'n' and press enter to accept the default to grant SELECT ANY DICTIONARY
Figure 4 hostchecker createDelphixUser.sh
-
Connect to your Linux Source by opening Terminal on your Lab Server and running: conn 10.0.x.20 ('x' will be your Student Number ).
-
Set the Oracle environment variables below:
1. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
2. export ORACLE_SID=devdb
3. export PATH=$ORACLE_HOME/bin:$PATH
-
Ensure you are inside the hostchecker location with the command: cd /home/delphix/hostchecker
-
Run Hostchecker utility by typing1 the command: ./hostchecker.sh
-
Indicate that this machine is a "source" by typing: source
-
Review the available checks that can be run on this system
-
Type "1" and press Enter. The script will check homedir permissions and return SUCCESS and ALL OK.
- Type "3" and press Enter.
1. Enter an IP address of: 10.0.x.10 ('x' will be your **Student Number** ).
2. Enter the port: 8415
3. The script will test the port and return SUCCESS and ALL OK.
-
Repeat the previous step for the following ports: 8341, 50001, and 873
-
Type "5" and press Enter.
1. Type "1" to select the current ORACLE_HOME value, and press Enter
2. The script will test the Oracle Home and return SUCCESS and ALL OK
- Type "6" and press Enter.
1. Type "0" to select all Oracle Instances, and press Enter
2. The script will test the Oracle Instances and return SUCCESS and ALL OK
-
Type "7" and press Enter. The script will test the /etc/oratab file and return SUCCESS and ALL OK
-
Type "8" and press Enter.
1. Enter a password of: delphix
2. The script will test the SSH connectivity to the host and return SUCCESS and ALL OK.
- Type "9" and press Enter.
1. The script will return a WARNING due to permissions. This is normal.
- Type "10" and press Enter.
1. Enter a password of: delphix
2. The script will test sudo privileges and return SUCCESS and ALL OK
- Type "11" and press Enter.
1. Enter a path of: /u01/app/toolkit
2. The script will test the path and return SUCCESS and ALL OK
- Type "quit" to exit hostchecker.
Add Source Environment
-
If you are not already logged in, login to your Delphix Data Platform as delphix_admin using the password you set in the last exercise.
-
In the top menu bar, click Manage and then Environments.
-
Click on the fly-out menu next to Environments and select Add Environment.
-
Provide the following details in the Add Environment Wizard
Host and Server
-
1. Host OS: **Unix/Linux**
2. Server Type: **Standalone**
Click Next
- On the Environment Settings tab, enter the following details
1. Environment Name: **Source**
2. Host Address: **10.0.x.20** ('x' will be your **Student Number** )
3. OS Username: **delphix**
4. OS Password: **delphix**
5. Toolkit Path: **/u01/app/toolkit** 
Figure 6 Add Source Environment
-
Click Submit
-
You can view the status of the environment creation and discovery by clicking on the Actions menu on the top right-hand side of the page. Clicking on the job in the Actions pane will allow you to track its progress
Figure 7 Environment Creation Progress
- View the Environment details
1. Click on the Environment on the left on review information on the Details tab
-
1. Click on the Databases tab to view any discovered database installations and databases
-
On the top menu bar, click Manage , then Datasets
-
Click the plus sign next to the word Datasets on the top left portion of your screen and select the Add dSource option.
-
The Welcome page for the dSource Wizard will be displayed. Review the instructions to get an overview of the process and click Next.
-
Enter the following information on the Source tab
1. Select the **_orcl_** database from Data Source list
2. Choose delphix from the Environment User drop-down list (default)
3. Enter the DB Username and Password:
1. DB Username: **delphix_db**
2. DB Password: **delphix_db**
4. Click _Verify Credentials_
- Under the dSource Configuration tab we will provide a user-friendly name for the dSource and create a new Dataset Group to place it in.
1. Enter " **orcl** " for the dSource name
2. Click on the Add Dataset Group link and enter " _DB Sources_ " in the Name field. 
Figure 9 dSource Configuration
-
Click Next
-
On the Data Management tab, accept the default values and
-
Click Next
-
Accept the default policies
-
Click Next
-
No Hooks will be added at this point. Click Next
-
Review the summary and click Submit
- Wait for the dSource to be created
-
Connect to your Linux Target A by opening Terminal on your Lab Server and running: conn 10.0.x.30 ('x' will be your Student Number ).
-
Observe the name and location of the hostchecker package by running the command: ls -ltr
-
Expand the hostchecker package by running: tar -xvf hostchecker_linux_x86.tar
-
Type: cd hostchecker
-
Run hostchecker.jar with the command: ./hostchecker.sh
-
Indicate that this machine is a "target" by typing: target
-
Review the available checks that can be run on this system
-
Type "1" and press Enter. The script will check homedir permissions and return SUCCESS and ALL OK.
Figure 12 Hostchecker Target Options
- Type "3" and press Enter.
1. Enter an IP address of: 10.0.x.10 ('x' will be your **Student Number** ).
2. Enter the port: 8415
3. The script will test the port and return SUCCESS and ALL OK.
-
Repeat the previous step for the following ports: 873, 22, 80, 443
-
Type "5" and press Enter.
1. Type "1" to select the current ORACLE_HOME value, and press Enter
2. The script will test the Oracle Home and return SUCCESS and ALL OK
-
Type "6" and press Enter. The script will test the /etc/oratab file and return SUCCESS and ALL OK
-
Type "7" and press Enter.
1. Enter a password of: delphix
2. The script will test the SSH connectivity to the host and return SUCCESS and ALL OK.
- Type "8" and press Enter.
1. The script will return WARNING due to permissions. This is normal.
- Type "9" and press Enter.
1. Enter a password of: delphix
2. The script will test sudo privileges and return SUCCESS and ALL OK
- Type "10" and press Enter.
1. Enter a path of: /u01/app/toolkit
2. The script will test the path and return SUCCESS and ALL OK
- Type "quit" to exit hostchecker.
-
If you are not already logged in, login to your Delphix Data Platform as delphix_admin using the password you set in the last exercise.
-
In the top menu bar, click Manage and then Environments.
-
Click on the fly-out menu next to Environments and select Add Environment.
-
Provide the following details in the Add Environment Wizard
Host and Server
-
1. Host OS: Unix/Linux
2. Server Type: Standalone
Click Next
- On the Environment Settings tab, enter the following details
1. Environment Name
2. Host Address: 10.0.x.30 ('x' will be your **Student Number** )
3. OS Username: delphix
4. OS Password: delphix
5. Click Validate
6. Toolkit Path: /u01/app/toolkit 
Figure 13 Add Target Environment
-
Click Submit
-
You can view the status of the environment creation and discovery by clicking on the Actions menu on the top right-hand side of the page. Clicking on the job in the Actions pane will allow you to track its progress.
-
View the Environment details
1. Click on the Environment Name on the left on review information on the Details tab
-
1. Click on the Databases tab to view any discovered database installations and databases
-
Go the Datasets Home page by Clicking on the Manage menu and selecting Datasets
-
Expand the DB Source group and click on the orcl dSource object. This will reveal the Timeflow for the dSource by default.
-
Hovering over the Timeflow snapshot will reveal icons to provision a VDB, view LogSync and other information.
Click on the Provision VDB icon
Figure 14 Provision VDB
- On the Target Environment tab, use the following information
1. Choose _Target_ under the list of Environments
2. Verify that the Installation Home is set to /u01/app/oracle/product/11.2.0/dbhome_1 (11.2.0.1.0)
3. Ensure that the Environment User is set to delphix
4. Click Next
Figure 15 Provision VDB - Target Environment
- Enter the details below on the Target Configuration tab
1. Database Unique Name: **devdb**
2. Database Name: **devdb**
3. SID: **devdb**
4. Mount Base: **/mnt/provision**
Figure 16 Provision VDB - Target Configuration
-
Click Next
-
On the Configuration tab, we will provide a user-friendly name for the VDB as well as assign it to a new group.
1. VDB Name: **devdb**
2. Click Add Dataset Group
1. Enter _DB Targets_ for the Group Name
2. Click Add
3. Verify that the _DB Targets_ Group is selected
4. Masking Job should be set to None
5. Check the box next to Enabled for _Auto VDB Restart_
6. Click _Next_
Figure 17 Provision VDB - Configuration
-
On the Policies tab, accept the defaults and click Next
-
Accept the defaults on the Hooks tab and click Next
-
Verify the summary information, and click Submit
Figure 18 Provision VDB Summary
It may take a couple minutes for the VDB creation to complete. You can monitor
the progress on the left hand side of the screen next to the devdb object in
the DB Targets group. On the Actions pane on the right hand side of the
screen, you should see the Provision virtual database "devdb" item move to
the Recently completed pane without error.
Once the VDB is created, you can verify that the VDB is operational by:
-
Using Terminal on your lab server, SSH to your Linux Target server at 10.0.x.30 ('x' will be your Student Number ).
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select name from v$database;
-
Open Terminal on your Lab Server desktop and type: ssh delphix@10.0.x.20 ('x' will be your Student Number )
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
create table sourcetab as select * from dba_objects;
-
Go back to the Delphix Data Platform in your browser (click the Delphix logo to go back to the main screen if required)
-
Click on the orcl dSource object on the left side of your screen (expand DB Source group if needed)
-
Click the Camera Icon on the top-right to take a snapshot
-
Click on the devdb VDB on the left side of your screen
-
Click the Timeflow tab
-
Click the Refresh button on the top right next to the snapshot icon.
-
There are two options for refreshing the VDB, choose the "Faster" option to refresh from the most recent snapshot and click Next.
- Click the Submit button
Figure 22 Refresh VDB from dSource
Once the refresh has completed, a new VDB snapshot will be generated and
reflected in the Timeflow.
Figure 23 VDB Refresh - Post Refresh
Log into devdb to confirm.
-
Open Terminal on your Lab Server desktop and type: ssh delphix@10.0.x.30 ('x' will be your Student Number )
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select count (*)
from sourcetab;
Figure 24 Validate Refresh
If this returns a count of rows, the snapshot/refresh was successful.
-
On the Delphix main screen, select the devdb VDB
-
Click the Camera icon on the top right to take a snapshot of the VDB
-
A new snapshot card will be created on the devdb Timeflow. Make a note of the date/time for the latest snapshot card.
-
Open Terminal on your Lab Server desktop and type: ssh delphix@10.0.x.30 ('x' will be your Student Number )
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_SID=devdb
sqlplus / as sysdba
delete from sys.obj$;
commit;
shutdown abort;
startup;
Figure 26 Corrupt VDB
Note that the database is unable to come online due to a bootstrap error. The
devdb database is now corrupted. Now we will rewind the VDB to the last good
snapshot to fix this.
-
In the Delphix Data Platform (web browser), click on the devdb VDB if it is not already selected
-
Click on the Timeflow tab and select the snapshot associated with the date/time you recorded prior to corrupting your database. This will most likely be the latest snapshot.
-
Hover over the snapshot to reveal the Rewind button.
-
Click the Rewind VDB button on the Timeflow
- Confirm that you wish to rewind the VDB by clicking Rewind.
Figure 28 Rewind VDB Dialog
Once the rewind operation is complete, you can confirm the rewind was
successful by connecting to the server again and querying the database:
-
Open Terminal on your Lab Server desktop and type: ssh delphix@10.0.x.30 ('x' will be your Student Number )
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=devdb
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
select count
from dba_objects;
-
In the top menu bar, click on Manage and then Policies
-
Click the Retention tab, click +Retention
-
Provide the following details:
1. Policy Name: **Long Term**
2. Keep Logs for: **30 days**
3. Keep Snapshots for: **30 days**
-
Click the Show a dvanced link
-
Click the checkbox next to Keep 3 Snapshot(s) on 1 st of every month
Figure 30 Create Retention Policy
-
Click Next
-
On the Datasets tab click the checkbox for the devdb
-
Click Submit
Figure 31 Apply Retention Policy
Expand the policies menu to validate that the new Long Term policy has been
applied to the devdb VDB.
Figure 32 Retention Policy Settings
-
In the top menu bar, click Manage , then Operation Templates
-
Click the plus sign under the word Templates in the Hook Operation Templates Wizard
-
Provide the Name : Create APPUSER
-
Ensure Type is set to: System Shell Command
-
Under Contents , enter the following code:
$ORACLE_HOME/bin/sqlplus / as sysdba << EOF
create user appuser identified by appuser;
grant connect, resource to appuser;
exit;
EOF
Figure 33 Create Hook Operation Template
-
Click Create
-
Verify the Hook Operation Template is in the list, then click Close
- Figure Verify Hook Operation Template
-
In the top menu bar, click Manage , then VDB Config Templates
-
Click the plus sign next to the word VDB Config Templates and select New Template from the drop-down.
-
Name: 1G Template
-
Click Create
-
Click the pencil icon on the top right of the VDB Configuration Templates screen
-
Click the plus sign on the top right to add a new parameter
1. Double-click the row to enter a new value
- In the row that is now highlighted, enter the following information:
1. Name: **memory_target**
2. Value: **1G**
- Click the checkmark to save the Template.
Figure 35 Create VDB Configuration Template
-
Return to the Delphix home screen by clicking the Delphix logo on the top left of the screen
-
Click on the orcl dSource object in the Datasets panel
-
Select the latest Snapshot, click the Provision button
-
On the left hand side of the Target Environment tab, click the Target environment Target
-
Click Next
-
On the Target Configuration tab, enter the following details:
1. Database Unique Name: **qadb**
2. SID: **qadb**
3. Database Name: **qadb**
4. Mount Base: **/mnt/provision** (this should already be filled in)
- Click the Show advanced link and check the box next to Configure VDB Config Templates
Figure 36 Provision VDB w/ Config Template
-
Click Next
-
Click the 1G Template that we created earlier from the Select template drop-down list
Figure 37 Apply VDB Config Template
-
Click Next
-
Accept the default VDB Name - qadb
-
Select DB Targets from the Datasets Group drop-down list, then click Next
-
Accept the default policies and click Next
-
On the Hooks tab with Configure Clone already selected on the left side of the Provision VDB Wizard , click the plus sign on the right hand side of the wizard and select "Create New from Template" from the drop-down list
-
Enter the name QA APPUSER for the Hook Operation and click the Create button
- Click on the Create APPUSER template we created earlier, then click Import
Figure 39 Configure Clone Hook Operation Template
- Click Next
Figure 40 Provision VDB Summary
- Verify the summary information, and click Submit
It may take a couple minutes for the VDB creation to complete. You can monitor
the progress on the left-hand side of the screen next to the qadb object in
the DB Targets group. On the Actions pane on the right-hand side of the
screen, you should see the Provision virtual database "qadb" item move to
the Recently completed pane without error.
Once the VDB is created, you can verify that the VDB is operational by:
-
Using Terminal on your lab server, SSH to your Linux Target server at 10.0.x.30 ('x' will be your Student Number ).
-
Enter the username: delphix
-
Enter the password: delphix
-
Run the following commands:
export ORACLE_SID=qadb
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus / as sysdba
show parameter memory_target
connect appuser/appuser
This will verify that the VDB is online with the VDB Configuration Template we
specified, and that the APPUSER user was created by our hook.
Figure 41 View VDB Parameters