FlexDeploy - Oracle Database Plugin Guide
The Oracle database plugin uses two operations to synchronize the database structures within a schema. Â In the source or build environment, the user has the option to either use the recreatedb operation to drop and recreate the database objects based on a supplied SQL/DDL file. The second option is to make the changes in the build database using a tool like SQL Developer or SQL plus. The createBaseline operation is used by the build process in FlexDeploy to store this version of the schema in a DDL repository. During the deployment, the sync operation will then compare this baseline to the existing baseline in that environment. Â The compare generates the creates, drops, or alters that are necessary to make the target database structures look like the source database structures. Additional operations are available to recompile invalid objects, refresh materialized view, or drop unused columns. These operations can optionally be included in the defined workflow.
The plugin respects table locks, so if a table has locks disabled, the operations will not be able to delete them or modify them. This is a precaution against user error. If you wish to drop or change them, please enable locks first.
DDL Repository
The baselines are stored in a DDL repository.  You must create the DDL Repository schema by downloading and executing the following sql script.
If you have an older version of the schemas installed, the 4.0 to 4.0.3 schema changes file is also available and allows user to upgrade to the latest version.
Supported Versions
- Oracle Database 11.2 (Express, Standard, and Enterprise Edition)
- Oracle Database 12.1 (Standard, and Enterprise Edition)
Features delivered by Oracle in 12.1 (like invisible columns) are not currently supported by the plugin.
 Â
Key Features
- Manage deployments of entire schema(s).
- Manage partial deployment of objects in a schema(s).
- Supports a wide range of object types.
- Source changes from an SCM or "Build Database".
- Ability to sync a schema from different starting points.
- Manage object renames.
- Ability to simulate deployments so that generated DDL can be reviewed ahead of time.
- Grants are managed with each object.
- Constraints are managed with each Table and View object.
 Â
User Permission Requirements
The users specified in FDORA_USER
and FDORA_DDL_USER
require these permissions:
- GRANTÂ EXECUTE on dbms_crypto to <YOUR USER NAME>;
- GRANT "SELECT_CATALOG_ROLE" TOÂ <YOUR USER NAME>;
- GRANT SELECT ANY DICTIONARY TOÂ <YOUR USER NAME>;
- Create Permissions for the schemas to be syncedÂ
 Â
Supported Oracle Object Types
- Sequence
- Table
- Index
- Constraints
- View
- Synonym
- Function
- Trigger
- Type
- Type Body
- Package
- Package Body
- Procedure
- Columns
- Index
- Columns
Grants are also carried forward with the objects
Requirements
The plugin requires that constraints and indexes share the same name.
 Plugin Operations
- compileInvalid
- createBaseline
- dropUnusedColumns
- recreateBuildDB
- refreshMView
- synchronize
- Appendix - Setting up an SSH tunnel to a remote database
- Supported and Unsupported Table and Index options
- style