Run Baseline on Local XE Database

Run Baseline on Local XE Database

Objectives

Import data from the latest dev database datadump into your local database.

Prerequisites

Local Oracle XE Database installed. Datapump utility installed (This comes with Oracle XE Database by default).

Instructions

Once per month on the 15th, you'll receive an email from oracle@fullcount.net containing that month's datadump zip file. Each month, we clear our local database and refresh it with the new data (along with any database schema changes). If you're setting up your developer station for the first time, ask another developer to forward you that email.

The local oracle database is primarily used for automated tests. The tests in some projects will add data to the local database, run tests, then remove the data.

TODO: explain where the datadump comes from (prod/test/dev, data obfuscation, why only one community)?

Initial Set-Up

  1. Open http://sourcecontrol.fullcount.net/repos/database/branches/developer_environ_build/devoloper_18c_environ_prereq.sql script. Change out <username> for your username (ex. junges). You may also need to change the version number if you used 21c. Run as system user.
    1. To establish the system user connection, set up a connection with the same fields as "system_localhost" but change the username from "system" to "sys". If you haven't done that already, here's what it looks like:
  2. Next, we'll run maven install on at-maven-plugins project on local machine.
    1. Open a new terminal and `cd` into `C:\java\codebase\internal\trunk\at-maven-plugins`
    2. Run the command `mvn clean install -DskipTests`
  3. Next, we'll create a windows environment variable named `sandbox` and set it to "development".
    1. In windows search start typing "environment" and click to launch "Edit the system environment variables - Control Panel"
    2. Near the bottom, click Environment variables
    3. Under System Variables, click New. Under Variable name, type "sandbox". Under Variable value, type "development". Click OK. Click OK again.

Each Deployment

Email Datapump File

  1. Download the baseline zip from the monthly email
  2. Extract the .zip file. Find the `baseline.dpdmp` file inside. Copy it into your local Oracle XE Database's dpdump directory. It may look something like:
    1. `C:\oraclexe\app\oracle\admin\XE\dpdump\{directory}\` or dpdump directory on XE installation if located in another directory.
    2. or
    3. `C:\app\{user}\product\{version}\admin\XE\dpdump\{directory}\`
    4. Where {directory} is a long hexidecimal string which looks like "689E3172449E4ED6B47D0F83419E259F". This directory is created after an attempted run of at-fullcount-model
  3. If not already done, copy datapump file to odbdev03 at /u01/app/oracle/admin/dev/dpdump/.
  4. Run update on at-fullcount-model. If scripts are still located in nextDeploy directory, go to step 5. Otherwise, go to step 6.
  5. Delete scripts from C:\java\codebase\at-fullcount-model\src\main\resources\sql\nextDeploy directory.
  6. Run a Maven Clean, then Install on the at-fullcount-model project to ensure the baseline runs.
  7. Commit deletion of nextDeploy scripts.

 


    • Related Articles

    • Create a Database Baseline

      Instructions Datapump Export File Log into odbprod03.fullcount.net as the oracle user. Run the baseline_expdp script. # /u01/app/oracle/admin/tools/db_mgmt/baseline/v2/baseline_expdp.sh The name of the zip file will include date that the zip file was ...
    • Run Remote Deployment Process - Java

      Remote Server Configuration This has already been completed for all existing remote servers. Java 1.8 installed Tomcat located at /srv/tomcat XE database installed and running with fc_obj_owner user Directory /home/deployment exists Database backup ...
    • Run A Maven Project

      Instructions Once you have run your project and you are satisfied with your test results, you will want to check in code to our repository. All of our code is stored in a central repository hosted in our data center. The subversion tool, Tortoise ...
    • Post Central Deployment Tasks

      Post Central Deployment Tasks Objectives Complete necessary post-deployment tasks Prerequisites Access to Redmine Access to production database Access to fcadmin Access to deployment test server Instructions Send release docs Release docs are located ...
    • Reset Database on Lab Remote Server Virtual Machines

      Reset Database on Lab Remote Server Virtual Machines Objectives Delete existing data in a database on a lab VM (i.e. drop all objects in application schema). Import data from a database backup/export on a lab VM. Prerequisites SSH access to a lab ...