Unzip the file to an installation directory, e.g. “/var” for linux or “C:\” for windows.
This will create a directory called midvision. This location will now be referred to as $MV_HOME, e.g. “/var/midvision” for linux or “C:\midvision” for windows.
Edit the remote agent orchestration file.
If you plan to use a remote agent to run the deployments on the target servers then you will need to edit the remoting server file, putting in the host name of the server it will accept deployment requests from. Find the hostname of the machine you have installed the application to then type hostname from a command prompt.
e.g:
| Windows |
Linux |
C:\Users\user1>hostname |
[root@cloud ~]# hostname |
user1-MV |
cloud.server.com |
Goto $MV_HOME/remoting and edit the file midvision-remoting-server.xml. On line 43 change line:
<resource type=”auth.servers”>gui@localhost</resource>
To gui@hostname e.g.
<resource type=”auth.servers”>gui@user1-MV</resource>
Start the server and the remoting agent.
Goto $MV_HOME/bin and the run the start-up scripts to start the web app and the remote agent.
| Windows |
Linux |
| start-web-app.bat |
start-web-app.sh |
| start-remoting-server.bat |
start-remoting-server.sh |
Wait until you see “INFO: Server startup in“ in the output logs of the tomcat console and then go to http://localhost:9090/MidVision. You will be presented with a license page. Request a trial license from MidVision by emailing licensing@midvision.com. Once you have been emailed the license, enter the values on the screen and you will then be presented with the login page. Enter the default username “mvadmin” and the default password “mvadmin” then click “Login”.
Note: This demo uses a Hypersonic in-memory database. This means if the web application process is killed from the Task Manager or a “kill” command then all data will be lost. To ensure that your data is stored to a file when the application is stopped, run the “stop-web-app.sh” or “stop-web-app.bat” script which is in the $MV_HOME/bin directory.
Use the Plugin Manager to Install the Oracle DB Demo
Ensure the web application is started. Go to “Help / Plugin Manager” the “Available Plugins / Patches” tab. Click the “Install” button on the “Oracle DB Example App” Plugin and then “Yes” to confirm, the project files will be downloaded to the $MV_HOME/projects directory. Once the download is complete the plugin will appear in the “Installed Plugins / Patches” tab.

Plugin Manager Installed Plugins - Oracle DB Example App
Alternatively, download the latest zip file from http://www.midvision.co.uk/wordpress/dnld/plugins/demo_projects_311/rapiddeploy-demo-projects-3.1.1-SNAPSHOT-oracle-db.zip and unzip in the root of your RapidDeploy installation (MV_HOME).
Configure the Resources.
Create the Projects
Go to “Resources/Projects/Add Project” then enter the following information (remember to change $MV_HOME with the actual location).
| Field |
Value |
| Name |
ORACLE_DB_RECREATE_TABLESPACE_AND_USERS |
| Description |
ORACLE_DB_RECREATE_TABLESPACE_AND_USERS Project Mastered By MidVision |
| Owner |
mvadmin |
| Deployment Type |
codeDeploy |
| Collection Type |
DB_ORACLE_INSTANCE_10G |
| Log Directory |
$MV_HOME/logs/ORACLE_DB_RECREATE_TABLESPACE_AND_USERS |
| Project Root Directory |
$MV_HOME/projects/ORACLE_DB_RECREATE_TABLESPACE_AND_USERS |
| Properties Directory |
$MV_HOME/projects/ORACLE_DB_RECREATE_TABLESPACE_AND_USERS/db/config |
| Build Store |
$MV_HOME/buildstore |
| Promotion Store |
$MV_HOME/promotionstore |
| Deployment package search string |
ORACLE_DB_RECREATE_TABLESPACE_AND_USERS |
| Properties file identifier |
conf |
| Master in Database |
True (selected) |

Oracle DB Recreate Tablespace and Users Project Definition
Then click “Create”. Now add another project.
| Field |
Value |
| Name |
ORACLE_DB_CONFIGURE |
| Description |
ORACLE_DB_CONFIGURE Project Mastered By MidVision |
| Owner |
mvadmin |
| Deployment Type |
codeDeploy |
| Collection Type |
DB_ORACLE_INSTANCE_10G |
| Log Directory |
$MV_HOME/logs/ORACLE_DB_CONFIGURE |
| Project Root Directory |
$MV_HOME/projects/ORACLE_DB_CONFIGURE |
| Properties Directory |
$MV_HOME/projects/ORACLE_DB_CONFIGURE/db/config |
| Build Store |
$MV_HOME/buildstore |
| Promotion Store |
$MV_HOME/promotionstore |
| Deployment package search string |
ORACLE_DB_CONFIGURE |
| Properties file identifier |
conf |
| Master in Database |
True (selected) |
Then click “Create”.

Oracle DB Configure Project Defintion
Now edit the project named ORACLE_DB_CONFIGURE and then click “Discover” and click “Ok” to confirm.
This will search the project configuration directory and look for the environment definition files and create any servers, environment, instances and deployment components it finds in to the application database. The environments are defined by the file names defined in the project properties directory. The structure of the environment filename is this:
SERVER.ENVIRONMENT.INSTANCE.APPLICATION
In a Oracle DB context this relates to:
SERVER.DB.SCHEMA.APPLICATION
As the project ORACLE_DB_CONFIGURE has a pre-configured environment definition, the discovery will create a new server named “oracledbserver01”, a new environment named “XE” and a new instance named “demo_ref_owner”. We will now configure the connection details to the server, environment and the instance.
Configure the Server
Goto “Resources/Targets/Servers” then edit the server named “oracledbserver01″. Edit these fields (remember to change $MV_HOME with the actual location):
| Field |
Value |
| General Tab |
|
| Display Name |
oracledbserver01 |
| Hostname |
127.0.0.1 |
| Build Store: |
$MV_HOME/buildstore/remote |
| OS Type: |
<Select your OS type> |
| Version: |
<Set your OS version> |
| Allow Deployments: |
True |
| Connection timeout (ms): |
2000000 |
| Remoting Tab |
|
| Agent Enabled for deployments: |
True |
| Agent Enabled for discovery: |
True |
| Remote Agent Port: |
20000 |
| Agent Path: |
|
Then click “Save”.

Server General Tab - oracledbserver01

Server Remoting Tab - oracledbserver01
Click edit on the server named “oracledbserver01″ and then click “Test Agent” and click “Yes” to confirm. The application will then check it can communicate with the remote agent. You should see the following output:
Test Success
The test connection completed successfully.
If the test was successful.
Configure the Oracle DB Environment (XE)
Go to “Resources / Targets / Environments” edit the environment named “XE”. Enter the following values (remember to change $ORACLE_HOME with the actual location):
| Field |
Value |
| General Tab |
|
| Display Name |
XE |
| Parent Server display name |
oracledbserver01 |
| Owner |
mvadmin |
| Software Product: |
Oracle 10G
|
| Environment Type: |
Unknown |
| Software Version: |
10 |
| Binary Path: |
$ORACLE_HOME |
| Connectivity Tab |
|
| Admin Port: |
|
| Connection String: |
jdbc:oracle:thin:@localhost:1521:xe |
| Connection Class: |
oracle.jdbc.pool.OracleConnectionPoolDataSource |
| Environment Admin Username: |
sys |
| Environment Admin Password: |
password |
Then click save.

XE Environment Definition - General Tab

XE Environment Definition - Connectivity Tab
The connection details in the oracle environment definition are used when you request a schema snapshot from within RapidDeploy. The connection details are set as the SYSDBA user. For an Oracle environment a snapshot at the environment level will return all the schema for users definitions and all their grant rights.
Configure the Instance
Go to “Resources / Targets / Instances” edit the instance named “demo_ref_owner”. This is the name of the schema profile that we will snapshot (with oracle a schema is the user). Enter the following values (remember to change $ORACLE_HOME with the actual location):
| Field |
Value |
| General Tab |
|
| Instance Name |
demo_ref_owner |
| Parent Environment name: |
XE |
| Parent Server display name |
oracledbserver01 |
| Owner |
mvadmin |
| Collection Type: |
DB_ORACLE_INSTANCE_10G |
| Software Version: |
10 |
| Binary Path: |
$ORACLE_HOME |
| Allow deployments |
True |
| Connectivity Tab |
|
| Hostname |
|
| Port: |
|
| Username: |
demo_ref_owner |
| Password: |
owner_password |
| Alias: |
|
Then click Save.

demo_ref_owner Instance General Tab

demo_ref_owner Instance Connectiviy Tab
The connection details in the oracle instance definition are used when you request a schema or data snapshot from within RapidDeploy. The connection details are set as the user who’s schema you wish to snapshot. For an Oracle instance, a snapshot at the instance level will return all the schema of the user objects.
Edit a Connection
Now you have configured a server, environment and instance you can are almost ready to run the first job. The project ORACLE_DB_RECREATE_TABLESPACE_AND_USERS comes predefined with the oracle scripts and orchestration we wish to run. The connection details for the scripts are defined in the project environment definition files. We need to change the password for the sysdba to be the sysdba of your database instance. Go to Environment -> Edit/Promote then select the project “ORACLE_DB_RECREATE_TABLESPACE_AND_USERS” and click the button to edit the environment configuration then select Resources -> Script Connections. Edit the password for the connection named “sys” then click “Save”.

Database Connection - sys
Now click “Save Changes” to write the environment changes to the file system.
We can now create package to deploy.
Create a Deployment Package
Now the logical environment settings have been checked we need to create a deployment package from the contents of the project.
Go to “Resources / Software Management / Packages” then select the project ORACLE_DB_RECREATE_TABLESPACE_AND_USERS. Now click “Add Package Wizard”. Enter the name ORACLE_DB_RECREATE_TABLESPACE_AND_USERS_0_0_1 the select “Click to finish”, then click “Next”. Click “Create This Deployment Package” and click “Yes” to confirm. When the deployment package has been created you will see this message:
Success
The object: ORACLE_DB_RECREATE_TABLESPACE_AND_USERS_0_0_1.jar was created.
Run a Job – Create Tablespace, users and roles
Now start the install job. Go to “Job / New Job”. Select the project ORACLE_DB_RECREATE_TABLESPACE_AND_USERS the open the server tree and select the DB we wish to deploy to (oracledbserver01.XE.sys.shapes_db), then click “Next”.
Select the version (which is the file you you created in the earlier step). Then select “Skip to finish” and then click “Next”. Click “Execute Request” then click “Yes” to confirm. The Oracle scripts will start to execute in the target server. You can click the “View Progress” button on the job and you should see the deployment log files.
In this job the following tasks are executed:
- Execute a script to drop the users and delete the tablespaces
- Delete the directory
- Make the directory
- Check there is at least 500Mb of free space on the target server at the directory.
- Check the directory is writable
- Execute a script to create the tablespaces, users and roles.

Running Job - ORACLE_DB_RECREATE_TABLESPACE_AND_USERS
When the job has finished you will see the text:
Job Finished:
Deploying ORACLE_DB_RECREATE_TABLESPACE_AND_USERS_0_0_1.jar into server oracledbserver01.XE.sys.shapes_db
You can go to “Jobs / Previous Jobs” and you can download and view the log file of the complete deployment.
Configure a Schema and Insert Data
Now we have created the tablespaces (one for data and one for indexes) and the users (table owner and table user). We can now run a job which runs the database scripts. The scripts are run in order and are named in a way which specifies which connection to use to run the scripts in.
Let’s take a look at the scripts. Select “Environment -> Edit / Promote, then choose the project ORACLE_DB_CONFIGURE and select edit environment configuration. Then select Resource -> Files. Here is where you can upload or create your script library. The file names are important as they specify which order to run the scripts in and which connection to use to run the script as. Also you can notice that the scripts have data dictionary items in, which are substituted with actual environment values at deployment time.

ORACLE_DB_CONFIGURE Project Resources
We can now create package to deploy.
Create a Deployment Package – ORACLE_DB_CONFIGURE
Now the logical environment settings have been checked we need to create a deployment package from the contents of the project.
Go to “Resources / Software Management / Packages” then select the project ORACLE_DB_CONFIGURE. Now click “Add Package Wizard”. Enter the name ORACLE_DB_CONFIGURE_0_0_1 the select “Click to finish”, then click “Next”. Click “Create This Deployment Package” and click “Yes” to confirm. When the deployment package has been created you will see this message:
Success
The object: ORACLE_DB_CONFIGURE_0_0_1.jar was created.
Run a Job – Configure Schema and Create Data
Now start the install job. Go to “Job / New Job”. Select the project ORACLE_DB_CONFIGURE the open the server tree and select the DB we wish to deploy to (oracledbserver01.XE.demo_ref_owner .shapes_db), then click “Next”.
Select the version (which is the file you you created in the earlier step). Then select “Skip to finish” and then click “Next”. Click “Execute Request” then click “Yes” to confirm. The Oracle scripts will start to execute in the target server. You can click the “View Progress” button on the job and you should see the deployment log files.
In this job the following tasks are executed:
- Executes all the scripts in the scripts directories

Running Job - Oracle DB Configure
- Running Job – Job Finished: ORACLE_DB_CONFIGURE
When the job has finished you will see the text:
Job Finished:
Deploying ORACLE_DB_CONFIGURE_0_0_1.jar into server oracledbserver01.XE.demo_ref_owner.shapes_db
You can go to “Jobs / Previous Jobs” and you can download and view the log file of the complete deployment.
Conclusion
In this demonstration we have configured two RapidDeploy Oracle DB projects. The projects were executed onto the remote target using a remote agent. RapidDeploy connected to the agent then copied over the package, the orchestration XML definition and the log4j settings file. The remote agent then executed the orchestration on the target server.
The first project is a repeatable project that deletes and then recreates the users and tablespaces. The second project created the schema (using the user created in the first project) and then created some data.
This guide should hopefully introduce the reader to simply use RapidDeploy to connect to a target server and run Oracle DB orchestrations on the target. The projects and environment definitions can be cloned and easily updated to connect to your own target systems and Oracle instances. There are many other orchestration tasks that are not discussed in this guide which allows the reader to create custom tailor-made orchestrations.