20.4 Administrative and Query APIs

Administrative clients and content providers are expected to register content stores with the DBFS Content API. Additionally, administrative clients are expected to mount stores into the top-level namespace of their choice.

The registration and unregistration of a store is separated from the mount and unmount of a store because it is possible for the same store to be mounted multiple times at different mount points (and this is under client control).

See Also:

Oracle Database PL/SQL Packages and Types Reference for the summary of DBMS_DBFS_CONTENT package methods

20.4.1 Registering a Content Store

You can register a new store that is backed by a provider that uses the provider_package procedure as the store service provider.

The method of registration conforms to the DBMS_DBFS_CONTENT_SPI package signature.

  • Use the REGISTERSTORE() procedure.

This method is designed for use by service providers after they have created a new store. Store names must be unique.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the REGISTERSTORE() method

20.4.2 Unregistering a Content Store

You can unregister a previously registered store, which invalidates all mount points associated with it.

Once the store is unregistered, access to the store and its mount points is no longer guaranteed, although a consistent read may provide a temporary illusion of continued access.

  • Use the UNREGISTERSTORE() procedure.

If the ignore_unknown argument is true, attempts to unregister unknown stores do not raise an exception.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the UNREGISTERSTORE() method

20.4.3 Mounting a Registered Store

You can mount a registered store and bind it to the mount point.

  • Use the MOUNTSTORE()procedure.

After you mount the store, access to the path names in the form /store_mount/xyz is redirected to store_name and its content provider.

Store mount points must be unique, and a syntactically valid path name component (that is, a name_t with no embedded /).

If you do not specify a mount point and therefore, it is null, the DBFS Content API attempts to use the store name itself as the mount point name (subject to the uniqueness and syntactic constraints).

The same store can be mounted multiple times, obviously at different mount points.

You can use mount properties to specify the DBFS Content API execution environment, that is, the default values of the principal, owner, ACL, and asof, for a particular mount point. You can also use mount properties to specify a read-only store.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the MOUNTSTORE() method

20.4.4 Unmounting a Previously Mounted Store

You can unmount a previously mounted store, either by name or by mount point.

Attempting to unmount a store by name unmounts all mount points associated with the store.

  • Use the UNMOUNTSTORE() procedure.

Once unmounted, access to the store or mount-point is no longer guaranteed to work although a consistent read may provide a temporary illusion of continued access. If the ignore_unknown argument is true, attempts to unmount unknown stores does not raise an exception.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the UNMOUNTSTORE method

20.4.5 Listing all Available Stores and Their Features

You can list all the available stores.

The store_mount field of the returned records is set to null because mount points are separate from stores themselves.

  • Use the LISTSTORES() function.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the LISTSTORES Function

20.4.6 Listing all Available Mount Points

You can list all available mount points, their backing stores, and the store features.

A single mount returns a single row, with the store_mount field set to null.

  • Use the LISTMOUNTS() function.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the LISTMOUNTS() method

20.4.7 Looking Up Specific Stores and Their Features

You can look up the path name, store name, or mount point of a store.

  • Use GETSTOREBYXXX() or GETFEATUREBYXXX() functions.

See Also:

Oracle Database PL/SQL Packages and Types Reference for details of the DBMS_DBFS_CONTENT methods