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

# createBaseline

> Creates a baseline of the given schema name. A file artifact is created which references a set of DDL in the DDL Repository. This file is then used by

Creates a baseline of the given schema name.

A file artifact is created which references a set of DDL in the DDL Repository. This file is then used by the [synchronize](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-database-plugin-guide/synchronize.md) operation to update the DDL of a target database to the version specified by the build operation's `Revert to Baseline ID` value.

Specifying a previous `Revert to Baseline ID` value will create an artifact that when deployed will bring the target database DDL to that baseline.

Leaving   `Revert to Baseline ID` blank will create an artifact that when deployed will bring the target database DDL to the current DDL of the Source Database.

> [!NOTE]
>
> `Revert to Baseline ID` supports Full Deployments, not Package-Based Deployments.

Supported object types are:

* Package

* Package Body

* Type

* Type Body

* Function

* Trigger

* Procedure

* Table

* Index

* View

* Constraint

* Sequence

* Private Synonym

* Materialized view

* Materialized view log

* Grants on supported objects

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle Database URL</td><td>`FDORA_URL`</td><td>Yes</td><td>The JDBC URL for the target Oracle database.This should be a complete JDBC URL (e.g. `jdbc:oracle:thin:@localhost:1521:xe`)\
\
Connecting to Oracle Autonomous DatabaseYou will need client credential zip file (wallet) to connect with Oracle Autonomous Database on Oracle cloud. You can download wallet zip file from Oracle Cloud, you will need admin userid and password to perform this download. See [Download Client Credentials (Wallets)](https://docs.oracle.com/en-us/iaas/autonomous-database/doc/download-client-credentials.html) for more details on how to download wallet file.<ul><li>**Since FlexDeploy 9.0.0.9 with Oracle Wallet Credential Type :** Instead of maintaining the wallet zip file under the file system, you can now store the wallet zip as an Oracle Credential Type in FlexDeploy. This allows for secure storage and use of the wallet.<ul><li>Use the URL syntax in the following format: `jdbc:oracle:thin:@service_low?TNS_ADMIN={{FDORACLE_WALLET_FILE}}` is replaced with the temporary wallet folder path during execution. Once execution is completed, the temporary file is cleaned up automatically.</li></ul></li><li>**Before FlexDeploy 9.0.0.9**<ul><li>You must make sure that only authorized users have access to these wallet files. Unzip the client credentials zip file (**wallet\_*****databasename*****.zip**) on FlexDeploy server and/or endpoint where it will be used. For example, /home/flexdeploy/.wallets/\<**wallet\_*****databasename***> is folder where specific wallet file was unzipped. Make sure to secure this folder to FlexDeploy and/or Endpoint user, so that it is not readable by all users.</li><li>We recommend using Oracle Wallet Credential Type for better security and easier management of Wallet usage.</li><li>**Database URL Syntax **: jdbc:oracle:thin:@service\_high?TNS\_ADMIN=/home/flexdeploy/.wallets/\<**wallet\_*****databasename***><ul><li>service\_high is one of the entries in the tnsnames.ora file where client credentials zip file was unzipped. See [Predefined Database Service Names for Autonomous Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/connect-predefined-generic.html) for details on services.</li><li>TNS\_ADMIN value in URL points to the location of the **unzipped client credentials zip file**.</li></ul></li><li>**Database URL Long Connection String Format Syntax **: `jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=<hostname>))(connect_data=(service_name=<serice_name>))(security=(ssl_server_cert_dn="CN=<hostname>,OU=Oracle BMCS US,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))`<ul><li>Examples for the same can be found [here](https://www.oracle.com/database/technologies/java-connectivity-to-atp.html).</li></ul></li></ul></li></ul>If using the Oracle Database Plugin with ADW or 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.**</td></tr><tr><td>Oracle Wallet File</td><td>`FDORACLE_WALLET_FILE`</td><td>No</td><td>**Since 9.0.0.9** - Provide the Oracle Wallet file, see[Credential Type - Oracle Wallet](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-users-guide/administration/credentials/credential-types/credential-type-oracle-wallet.md) for more details.</td></tr><tr><td>Oracle Database User</td><td>`FDORA_USER`</td><td>Yes</td><td>The username that will be used to connect to the target Oracle Database.NOTE\*\*\* If the project property `FDORA_SCHEMA_NAME is not set, then this becomes``the schema that is baselined.`</td></tr><tr><td>Oracle Database Password</td><td>`FDORA_PASSWORD`</td><td>Yes</td><td>The password for Oracle Database User.</td></tr><tr><td>Target JDBC Driver Path.</td><td>`FDORA_DRIVER_PATH`</td><td>Yes</td><td>Path containing JDBC driver for target database connection.</td></tr><tr><td>DDL Repo JDBC Driver Path</td><td>`FDORA_DDL_DRIVER_PATH`</td><td>Yes</td><td>Path containing JDBC driver for DDL repository database connection.</td></tr><tr><td>DDL Repository URL</td><td>`FDORA_DDL_URL`</td><td>Yes</td><td>The JDBC URL for the DDL repository.This should be a complete JDBC URL (e.g. `jdbc:oracle:thin:@localhost:1521:xe`)if we use Oracle wallet Credential ,then Url would be like this\
`jdbc:oracle:thin:@Service_low?TNS_ADMIN=${{FDORACLE_DDL_WALLET_FILE}}`</td></tr><tr><td>DDL Oracle Wallet File</td><td>`FDORACLE_DDL_WALLET_FILE`</td><td>No</td><td>**Since 9.0.0.9** - Provide the DDl Repository Oracle Wallet file, see[Credential Type - Oracle Wallet](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-users-guide/administration/credentials/credential-types/credential-type-oracle-wallet.md) for more details.</td></tr><tr><td>DDL Repository User</td><td>`FDORA_DDL_USER`</td><td>Yes</td><td>The userid used to connect to the DDL repository.</td></tr><tr><td>DDL Repository Password</td><td>`FDORA_DDL_PASSWORD`</td><td>Yes</td><td>The password for the DDL repository userid.</td></tr></tbody></table>

# Project Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle Database Schema Name(s)</td><td>`FDORA_SCHEMA_NAME`</td><td>Yes</td><td>Comma-separated list of schemas controlled by this project.Leave this parameter blank if you want to have schema name different across environments.  The plugin will then use the FDORA\_USER Target parameter as the schema name for the baseline.</td></tr><tr><td>Oracle Object Types</td><td>`FDORA_OBJECT_TYPES`</td><td>Yes</td><td>The Oracle object types which are being managed in package-based projects.By default, all object types are selected.This could be used in combination with security options so that certain user groups are unable to build and deploy tables or other objects.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Column Drop Action</td><td>`FDORA_COL_DROP_ACTION`</td><td>No</td><td>Determines what action to take for "dropping" columns.Can be set to `SET UNUSED` or `DROP`.Defaults to `SET UNUSED`.</td></tr><tr><td>Revert to Baseline ID</td><td>`FDORA_REVERT_TO_BASELINE_ID`</td><td>No</td><td>Numeric ID of the baseline to revert an environment to.Leave blank to create a new baseline.</td></tr><tr><td>Table Renames</td><td>`FDORA_TABLE_RENAMES`</td><td>No\
</td><td>Table rename string. The format is `NEW_OWNER.NEW_TABLE_NAME=OLD_OWNER.OLD_TABLE_NAME`Multiple table renames can be listed by comma separating them on the input.</td></tr><tr><td>Index Renames</td><td>`FDORA_INDEX_RENAMES`</td><td>No\
</td><td>Index rename string. The format is `NEW_OWNER.NEW_INDEX_NAME=OLD_OWNER.OLD_INDEX_NAME`Multiple index renames can be listed by comma separating them on the input.</td></tr><tr><td>Column Renames</td><td>`FDORA_COLUMN_RENAMES`</td><td>No\
</td><td>Column rename string. The format is `NEW_OWNER.NEW_TABLE_NAME.NEW_COLUMN_NAME=OLD_OWNER.OLD_TABLE_NAME.OLD_COLUMN_NAME`Multiple column renames can be listed by comma separating them on the input.</td></tr><tr><td>Trigger Renames</td><td>`FDORA_TRIGGER_RENAMES`</td><td>No</td><td>Trigger rename string. The format is `NEW_OWNER.NEW_TRIGGER_NAME=OLD_OWNER.OLD_TRIGGER_NAME`Multiple trigger renames can be listed by comma separating them on the input.</td></tr><tr><td>Constraint Renames</td><td>`FDORA_CONSTRAINT_RENAMES`</td><td>No\
</td><td>Constraint rename string. The format is `NEW_OWNER.NEW_TABLE_NAME.NEW_CONSTRAINT_NAME=OLD_OWNER.OLD_TABLE_NAME.OLD_CONSTRAINT_NAME`Multiple constraint renames can be listed by comma separating them on the input.</td></tr><tr><td>Synonym Renames</td><td>`FDORA_SYNONYM_RENAMES`</td><td>No</td><td>Synonym rename string. The format is `NEW_OWNER.NEW_SYNONYM_NAME=OLD_OWNER.OLD_SYNONYM_NAME`Multiple synonym renames can be listed by comma separating them on the input.</td></tr><tr><td>Sequence Renames</td><td>`FDORA_SEQUENCE_RENAMES`</td><td>No</td><td>Sequence rename string. The format is `NEW_OWNER.NEW_SEQUENCE_NAME=OLD_OWNER.OLD_SEQUENCE_NAME`Multiple sequence renames can be listed by comma separating them on the input.</td></tr><tr><td>View Renames</td><td>`FDORA_VIEW_RENAMES`</td><td>No</td><td>View rename string. The format is `NEW_OWNER.NEW_VIEW_NAME=OLD_OWNER.OLD_VIEW_NAME`Multiple view renames can be listed by comma separating them on the input.</td></tr><tr><td>Include Tablespaces</td><td>`FDORA_TABLESPACE_FLG`</td><td>No</td><td>Setting this to true causes create statements to include tablespace information where appropriate.  This adds the tablespace clause to all creates. Defaults to false.  Requires segments attributes to be enabled also.</td></tr><tr><td>Include Segment attributes</td><td>`FDORA_SEGMENT_ATTRIBUTES_FLG`</td><td>No</td><td>Setting this to true causes create statements to include tablespace segment attribute information where appropriate.  Defaults to false.</td></tr><tr><td>Include Storage</td><td>`FDORA_STORAGE_FLG`</td><td>No</td><td>Setting this to true causes create statements to include storage information where appropriate.  This adds the STOREAGE clause with its values on all creates. Defaults to false.    Requires segments attributes to be enabled also. </td></tr></tbody></table>

# Outputs

<table><colgroup><col /><col /><col /></colgroup><tbody><tr><th>**Output Name**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>`FDORA_OUT_BASELINE_ID`</td><td>No</td><td>Outputs the BaseLine ID which was built.</td></tr><tr><td>`FDORA_OUT_BL_TABLE_COUNT`</td><td>No</td><td>Count of tables stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_INDEX_COUNT`</td><td>No</td><td>Count of indexes stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_CONSTRAINT_COUNT`</td><td>No</td><td>Count of constraints stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_SEQUENCE_COUNT`</td><td>No</td><td>Count of sequences stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_PROCEDURES_COUNT`</td><td>No</td><td>Count of procedures stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_VIEWS_COUNT`</td><td>No</td><td>Count of views stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_SYNONYMS_COUNT`</td><td>No</td><td>Count of synonyms stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_MVIEW_COUNT`</td><td>No</td><td>Count of materialized views stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_MVIEW_LOG_COUNT`</td><td>No</td><td>Count of materialized view logs stored in the baseline.</td></tr><tr><td>`FDORA_OUT_BL_PRIVILEGES_COUNT`</td><td>No</td><td>Count of privileges stored in the baseline.</td></tr></tbody></table>

# Artifacts

This operation produces artifacts that will be stored in the artifacts repository. This artifact is an empty file whose name is used to select a revision from the DDL Repository. 

# Endpoint Selection

This operation will select all available endpoints associated to the Target.

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

# Special Considerations

For renames, the `old_owner` must be the same as the `new_owner`.

For user defined type objects, special consideration should be given to implementing the force option on the type.  In a scenario where a type is dependent on another type, there are scenarios where creating the child type with the force will make the deployment to future environments easier.

Example:

In this case, the type XX\_WS\_INPUT\_T is a child of the type XX\_WS\_INPUT\_TBL.  By creating it with the force in the **build** database, the plugin will automatically carry that option forward:

create or replace TYPE XX\_WS\_INPUT\_T FORCE AS OBJECT (\
TABLE\_NAME VARCHAR2( 30 )\
,COLUMN\_NAME VARCHAR2( 30 )\
,IN\_VALUE VARCHAR2( 250 )\
);

create or replace TYPE XX\_WS\_INPUT\_TBL AS TABLE OF XX\_WS\_INPUT\_T;

Future changes to the XX\_WS\_INPUT\_T type (like adding a column) will then flow through the plugin without issue because it will be recreated using the force option.  Without the force option, the plugin would fail with the error message:

ORA-02303: cannot drop or replace a type with type or table dependents

Please note, the use of the force option will cause the parent type and any dependent type will be invalid and will require a recompile.  This can complete in FlexDeploy by using the compile\_invalid plugin operation in the workflow.

For types that are used within physical CREATE TABLE definitions, the use of the FORCE option is NOT recommended.  It should only be used in scenario where the type is used within PL/SQL code.
