3.4 Managing MLE Environments

MLE environments are schema objects that can be managed in the database. In the SQL Developer extension for VS Code, you can create, edit and delete MLE environments.

For more information about MLE, see Introduction to Oracle Database Multilingual Engine in the Oracle Database JavaScript Developer's Guide.

The actions available to you are:

3.4.1 Create an MLE Environment

To create an MLE environment:

  1. In the Connections panel, for a specific connection, click the + icon in the MLE Environments node and then click Create.

    The Create pane appears.
  2. In the MLE Environment Name field, enter a name for the environment.

    The SQL pane displays the DDL code for the new MLE environment.

  3. Click Apply.

    An empty MLE environment is created and appears in the Connections panel under MLE Environments.

3.4.1.1 Example for Create an MLE Environment

This example demonstrates the creation of myfactorialenv MLE environment and how to import the factorial_mod JavaScript module into this environment.

  1. In the Connections panel, right-click MLE Environments and then click Create.

    The Create panel appears.

  2. In the MLE Environment Name field, enter a name for the environment, myfactorialenv.

    The SQL pane displays the DDL code for the new MLE environment.

  3. Click Apply.

    An empty myfactorialenv environment is created and appears in the left pane under MLE Environments.

  4. In the Connections panel, expand MLE Environments, right-click myfactorialenv and click Add Imports.

    The Add Imports pane appears.

  5. In Module Name field, select the module (factorial_mod) to import.
  6. In Import Name field, enter a name for your import.
  7. Click Apply.

    To view the imported module, in the Connections panel, right click myfactorialenv and select Open. Three tabs are displayed for the MLE environment: Errors, Grants and SQL.

    The imported module appears in the Imports panel.

3.4.2 Import a Module to an MLE Environment

To import a module for a selected MLE environment:

  1. In the Connections panel, right-click the MLE environment name and select Add Imports.

    The Add Imports panel appears.

  2. In the Module Name field, a list of the modules that you have created or have been granted access to appears in the list. Select a module from the list.
  3. Enter an Import Name for the module.
  4. Click Apply.

3.4.3 Compile an MLE Environment

To compile an MLE environment, in the Connections panel, right-click the selected environment name and select Compile.

To compile all MLE environments for a connection, in the Connections panel, right-click MLE environments and select Compile All.

To compile all invalid MLE environments, in the Connections panel, right-click MLE environments and select Compile All Invalid.

3.4.4 Delete an MLE Environment

To delete an MLE environment:

  1. In the Connections panel, right-click the selected MLE environment and select Drop.

    The Drop panel appears.

  2. Click Apply.