> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 ha

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 recreateBuildDB 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.

If using the Oracle Database Plugin with ADW/ATP databases, use the \_low connection. The \_medium and \_high connections can sometimes throw error **ORA-12839: cannot modify an object in parallel after modifying it**

# DDL Repository

The baselines are stored in a DDL repository. You must create the DDL Repository schema, see install and update scripts at [![](https://flexagon.atlassian.net/wiki/download/thumbnails/10926953762/ddlrepository.zip?version=1\&modificationDate=1724704727264\&cacheVersion=1\&api=v2\&viewType=fileMacro)](attachments/10926953762/10926953778.zip) . DDL repository needs to be created in FDDB schema, script provided does not create FDDB schema, you may do that per your company standards. If you are upgrading from version prior to 5.1.07, then run *upgrade/v4.6.0.3-to-5.1.0.7/migration.sql* to upgrade your repository schema. Then, run upgrade/5.1.0.7-to-5.2.3.1/migration.sql and upgrade/5.2.3.1-to-5.4.0.4/migration.sql.  If you were already at a version higher then 5.1.0.7, then only the second migration.sql needs to be executed.  If you are creating DDL repository schema, then just run *install/DDLRepositoryCreateScript.sql*.

> [!TIP]
>
> DDL repository can be created on any Oracle database, i.e. it does not need to be in source and/or target database.

# Supported Versions

* Oracle Database 11.2, 18c, 21c (Express, Standard, and Enterprise Edition)

* Oracle Database 12.1, 19c (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 package-based 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>;

* grant READ on sys.dba\_transformations to \<YOUR USER NAME>;

* grant READ on sys.dba\_objects to \<YOUR USER NAME>;

* grant READ on sys.dba\_queues to \<YOUR USER NAME>;

* grant READ on sys.dba\_queue\_tables to \<YOUR USER NAME>;

* grant READ on sys.dba\_synonyms to \<YOUR USER NAME>;

* grant READ on sys.dba\_indexes to \<YOUR USER NAME>;

* grant READ on sys.dba\_cons\_columns to \<YOUR USER NAME>;

* grant READ on sys.dba\_nested\_tables to \<YOUR USER NAME>;

* grant READ on sys.dba\_all\_tables to \<YOUR USER NAME>;

* grant READ on sys.dba\_tab\_privs to \<YOUR USER NAME>;

* grant READ on sys.dba\_scheduler\_jobs to \<YOUR USER NAME>;

* grant READ on sys.dba\_scheduler\_programs to \<YOUR USER NAME>;

* grant READ on sys.dba\_scheduler\_schedules to \<YOUR USER NAME>;

* grant READ on sys.dba\_mview\_logs to \<YOUR USER NAME>;

* grant READ on sys.dba\_procedures to \<YOUR USER NAME>;

* grant READ on sys.dba\_aq\_agents to \<YOUR USER NAME>;

* grant READ on sys.dba\_queue\_publishers to \<YOUR USER NAME>;

* grant READ on sys.dba\_queue\_schedules to \<YOUR USER NAME>;

* grant READ on sys.dba\_queue\_subscribers to \<YOUR USER NAME>;

* grant READ on sys.dba\_queue\_tables to \<YOUR USER NAME>;

* grant READ on sys.dba\_dependencies to \<YOUR USER NAME>;

* grant READ on sys.dba\_sequences to \<YOUR USER NAME>;

* grant READ on sys.dba\_source to \<YOUR USER NAME>;

* grant READ on sys.dba\_triggers to \<YOUR USER NAME>;

* grant READ on sys.dba\_views to \<YOUR USER NAME>;

* grant READ on sys.dba\_roles to \<YOUR USER NAME>;

* grant READ on sys.dba\_users to \<YOUR USER NAME>;

* **FDORA\_USER needs Create and alter Permissions for the schemas being synced. Using the schema owner as FDORA\_USER may be the easiest solution, and is needed if triggers don’t have schema-qualified table references.**

# Supported Oracle Object Types

* Sequence

* Table

* Index

* Constraints

* View

* Synonym

* Function

* Trigger

* Type

* Type Body

* Package

* Package Body

* Procedure

* Columns

* Index

> [!NOTE]
>
> 1. Grants are also carried forward with the objects.
>
> 2. The plugin requires that constraints and indexes share the same name.

# Plugin Operations

* [compileInvalid](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/compileinvalid.md)
* [createBaseline](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/createbaseline.md)
* [dropUnusedColumns](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/dropunusedcolumns.md)
* [recreateBuildDB](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/recreatebuilddb.md)
* [refreshMView](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/refreshmview.md)
* [synchronize](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/synchronize.md)

# Appendix

* [Setting up an SSH tunnel to a remote database](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/appendix-setting-up-an-ssh-tunnel-to-a-remote-database.md)

* [Supported and Unsupported Table and Index options](https://docs.flexagon.com/flexdeploy-9-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/supported-and-unsupported-table-and-index-options.md)
