Oracle DBMS_VECTOR_DATABASE
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai is now availble. If you haven't you downloaded already: Why?
Purpose Provides procedures and functions for vector cloud database service. This service uses a fixed simple schema and convenient way to use that schema. Creation, storage, indexing, search for vector data makes the core capabilities.
AUTHID CURRENT_USER
Constants
Name Data Type Value
 General
CONST_EXCEP_TABLE_DOES_NOT_EXIST NUMBER -942
CONST_EXCEP_TABLE_ALREADY_EXISTS NUMBER -955
CONST_EXCEP_INDEX_ALREADY_EXISTS NUMBER -955
CONST_EXCEP_INDEX_DOES_NOT_EXIST NUMBER -1418
CONST_EXCEP_MODEL_ALREADY_EXISTS NUMBER -40204
CONST_EXCEP_MODEL_DOES_NOT_EXIST NUMBER -40284
CONST_EXCEP_INVALID_EMBED_PARAMS NUMBER -57700
CONST_EXCEP_NO_CLAUSE_IN_QUEREY_BY NUMBER -57701
CONST_EXCEP_MULTIPLE_CLAUSES_IN_QUERY_BY NUMBER -57702
CONST_EXCEP_PARAMETER_NULL_OR_EMPTY NUMBER -57703
CONST_EXCEP_PARAMETER_INVALID_NAME NUMBER -57704
CONST_EXCEP_MODEL_NAME_ALREADY_EXISTS NUMBER -57705
CONST_EXCEP_METADATA_MISSING NUMBER -57706
CONST_EXCEP_FIELDS_MISSING NUMBER -57707
CONST_EXCEP_USER_SCHEMA_NOT_SAME NUMBER -57708
CONST_EXCEP_UNSUPPORTED_OPERATOR_VALUE NUMBER -57709
CONST_EXCEP_UNSUPPORTED_OPERATOR NUMBER -57710
CONST_EXCEP_EXCEED_MAX_FILTER_NESTING_DEPTH NUMBER -57711
CONST_EXCEP_FILTER_CHECK_BOOLEAN_VALUE NUMBER -57712
CONST_EXCEP_FILTER_CHECK_NOT_BOOLEAN_VALUE NUMBER -57713
CONST_EXCEP_ONE_KEY_ROOT_LEVEL NUMBER -57714
CONST_EXCEP_VALIDATION_ERROR NUMBER -57715
CONST_EXCEP_CLOUD_SERVICE_NOT_SET NUMBER -57716
CONST_EXCEP_ID_ALREADY_EXISTS_LOAD_VECTORS NUMBER -57717
CONST_EXCEP_INDEXING_MANUAL NUMBER -57718
CONST_EXCEP_INVALID_INDEXING_VALUE NUMBER -57719
CONST_EXCEP_INVALID_EMBED_PATH_DURING_UPSERT NUMBER -57720
CONST_EXCEP_BYOV_EMBED_PARAMS NUMBER -57721
CONST_EXCEP_INVALID_SEARCH_ID NUMBER -57722
CONST_EXCEP_NO_VECTOR_TO_SEARCH NUMBER -57723
Data Types -- Types for list_models_pipelined function

TYPE list_models_type IS RECORD (
model_name      VARCHAR2(256),
algorithm       VARCHAR2(256),
mining_function VARCHAR2(256),
creation_date   TIMESTAMP WITH TIME ZONE,
attributes      CLOB);

TYPE list_models_type_t IS TABLE OF list_models_type;

TYPE list_tables_type IS RECORD (
table_name        VARCHAR2(256),
description       VARCHAR2(4000),
auto_generate_id  NUMBER,
annotations       CLOB,
vector_type       VARCHAR2(256),
vector_table_type VARCHAR2(256),
embed_params      CLOB,
index_params      CLOB,
owner             VARCHAR2(256),
dense_idx_name    VARCHAR2(256),
status            VARCHAR2(256),
stats             CLOB,
created           TIMESTAMP WITH TIME ZONE,
updated           TIMESTAMP WITH TIME ZONE);

TYPE list_vector_tables_type IS TABLE OF list_tables_type;
Dependencies
ALL_ANNOTATIONS_USAGE DBMS_SQL JSON_ARRAY_T
ALL_INDEXES DBMS_STANDARD JSON_ELEMENT_T
ALL_MINING_MODELS DBMS_SYSTEM JSON_KEY_LIST
ALL_MINING_MODEL_ATTRIBUTES DBMS_SYS_ERROR JSON_OBJECT_T
ALL_OBJECTS DBMS_VECTOR JSON_SCALAR_T
DBMS_ASSERT DBMS_VECTOR_DATABASE_ADMIN PLITBLM
DBMS_JSON_SCHEMA DBMS_VECTOR_LIB USER_INDEXES
DBMS_LOB DUAL USER_TABLES
DBMS_OUTPUT    
Documented Yes
Exceptions Exceptions are declared above under CONSTANTS an instantiated using PRAGMA EXCEPTION_INIT
First Available 26ai
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(DEFAULT, NONE);
Security Model Owned by SYS with EXECUTE granted to PUBLIC.
Source {ORACLE_HOME}/rdbms/admin/dbmsvectordb.sql
Subprograms
 
CREATE_INDEX (new 26ai)
Creates a vector index on the specified vector table column dbms_vector_database.create_index(
table_name   IN VARCHAR2,
index_params IN JSON     DEFAULT NULL,
debug_flags  IN JSON     DEFAULT NULL,
request_id   IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
CREATE_VECTOR_TABLE (new 26ai)
Creates a "bring-your-own-vector" (BYOV) table with optional metadata and index dbms_vector_database.create_vector_table(
table_name       IN VARCHAR2,
description      IN VARCHAR2 DEFAULT NULL,
auto_generate_id IN BOOLEAN  DEFAULT FALSE,
annotations      IN JSON     DEFAULT NULL,
vector_type      IN VARCHAR2 DEFAULT 'dense',
index_params     IN JSON     DEFAULT NULL,
debug_flags      IN JSON     DEFAULT NULL,
request_id       IN VARCHAR2 DEFAULT NULL)
return CLOB;
TBD
 
CREATE_VECTOR_TABLE_FOR_MODEL (new 26ai)
Creates a new "model-integrated" vector table with optional metadata and index dbms_vector_database.create_vector_table_for_model(
table_name       IN VARCHAR2,
description      IN VARCHAR2 DEFAULT NULL,
auto_generate_id IN BOOLEAN  DEFAULT FALSE,
annotations      IN JSON     DEFAULT NULL,
embed_params     IN JSON,
index_params     IN JSON     DEFAULT NULL,
debug_flags      IN JSON     DEFAULT NULL,
request_id       IN VARCHAR2 DEFAULT NULL)
return CLOB;
TBD
 
DELETE_VECTORS (new 26ai)
Deletes vectors from the specified vector table

Overload 1
dbms_vector_database.delete_vectors(
table_name  IN  VARCHAR2,
ids         IN  JSON,
debug_flags IN  JSON     DEFAULT NULL,
request_id  IN  VARCHAR2 DEFAULT NULL,
output      OUT CLOB);
TBD
Overload 2 dbms_vector_database.delete_vectors(
table_name  IN VARCHAR2,
ids         IN JSON,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
DESCRIBE_MODEL (new 26ai)
Retrieves detailed information about a specific mining model, including its name, algorithm, mining function, creation date, and a list of attributes with details such as attribute name, type, data type, length, and vector info. Returns the information as a JSON object dbms_vector_database.describe_model(
model_name  IN VARCHAR2,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
DESCRIBE_VECTOR_TABLE (new 26ai)
Retrieves metadata for a vector table in the current schema (integrated model) dbms_vector_database.describe_vector_table(
table_name  IN VARCHAR2,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
DROP_INDEX (new 26ai)
Undocumented

Overload 1
dbms_vector_database.drop_index(
table_name  IN  VARCHAR2,
debug_flags IN  JSON     DEFAULT NULL,
request_id  IN  VARCHAR2 DEFAULT NULL,
output      OUT CLOB);
TBD
Overload 2 dbms_vector_database.drop_index(
table_name  IN VARCHAR2,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
DROP_MODEL (new 26ai)
Drops a machine learning or ONNX model from the database environment. After execution, the model and its associated metadata are removed, and a JSON confirmation message is returned dbms_vector_database.drop_model(
model_name  IN VARCHAR2,
debug_flags IN          JSON DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
DROP_VECTOR_TABLE (new 26ai)
Drops a specified vector table and all its associated vector indexes for the integrated model

Overload 1
dbms_vector_database.drop_vector_table(
table_name  IN  VARCHAR2,
debug_flags IN  JSON     DEFAULT NULL,
request_id  IN  VARCHAR2 DEFAULT NULL,
output      OUT CLOB);
TBD
Overload 2 dbms_vector_database.drop_vector_table(
table_name  IN VARCHAR2,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
GENERATE_EMBEDDING (new 26ai)
Generates vector embeddings for a list of input texts using the specified model dbms_vector_database.generate_embedding(
model_name  IN VARCHAR2,
inputs      IN sys.JSON_ARRAY_T,
debug_flags IN JSON              DEFAULT NULL,
request_id  IN VARCHAR2          DEFAULT NULL)
RETURN CLOB;
TBD
 
INDEX_BUILD_STATUS (new 26ai)
Retrieves the current build/rebuild status of the VECTOR index associated with the specified vector table dbms_vector_database.index_build_status(
table_name  IN VARCHAR2,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
LIST_MODELS (new 26ai)
Retrieves all mining models available in the database along with their attributes dbms_vector_database.list_models(
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
LIST_MODELS_PIPELINED (new 26ai)
Retrieves all mining models available in the database along with their attributes dbms_vector_database.list_models_pipelined RETURN list_models_type_t PIPELINED;
TBD
 
LIST_VECTORS (new 26ai)
Retrieves a list of vectors and associated metadata from a specified vector table dbms_vector_database.list_vectors(
table_name  IN VARCHAR2,
ids         IN JSON     DEFAULT NULL,
limit       IN NUMBER   DEFAULT 15,
offset      IN NUMBER   DEFAULT NULL,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
LIST_VECTOR_TABLES (new 26ai)
Retrieves metadata for all vector tables in the current schema (integrated model) dbms_vector_database.list_vector_tables(
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
LIST_VECTOR_TABLES_PIPELINED (new 26ai)
Retrieves metadata for all vector tables in the current schema (integrated model) dbms_vector_database.list_vector_tables_pipelined
RETURN list_vector_tables_type PIPELINED;
TBD
 
LOAD_MODEL (new 26ai)
Loads a machine learning or ONNX model from a specified URL into the database environment dbms_vector_database.load_model(
model_name   IN VARCHAR2,
url          IN VARCHAR2,
model_params IN JSON     DEFAULT NULL,
debug_flags  IN JSON     DEFAULT NULL,
request_id   IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
LOAD_VECTORS (new 26ai)
Loads vector data from a CSV file stored in cloud storage into a database vector table. Depending on the vector_table_type, it may also generate embeddings for the loaded data using a specified model

Overload 1
dbms_vector_database.load_vectors(
table_name  IN VARCHAR2,
url         IN VARCHAR2,
params      IN JSON     DEFAULT NULL,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL,
output OUT CLOB);
TBD
Overload 2 dbms_vector_database.load_vectors(
table_name  IN VARCHAR2,
url         IN VARCHAR2,
params      IN JSON     DEFAULT NULL,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
PRETTY_PRINT (new 26ai)
Pretty prints any JSON string in a CLOB variable dbms_vector_database.pretty_print(input_clob IN CLOB);
TBD
 
REBUILD_INDEX (new 26ai)
Rebuilds the dense vector index for a specified vector table

Overload 1
dbms_vector_database.rebuild_index(
table_name   IN  VARCHAR2,
index_params IN  JSON     DEFAULT NULL,
debug_flags  IN  JSON     DEFAULT NULL,
request_id   IN  VARCHAR2 DEFAULT NULL,
output       OUT CLOB);
TBD
Overload 2 dbms_vector_database.rebuild_index(
table_name   IN VARCHAR2,
index_params IN JSON     DEFAULT NULL,
debug_flags  IN JSON     DEFAULT NULL,
request_id   IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
RERANK (new 26ai)
Reranks a list of documents against a given query using the specified model dbms_vector_database.rerank(
model_name   IN VARCHAR2,
query        IN VARCHAR2,
documents    IN JSON,
model_params IN JSON     DEFAULT NULL,
debug_flags  IN JSON     DEFAULT NULL,
request_id   IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
SEARCH (new 26ai)
Provides flexible semantic, vector search capabilities over a vector table dbms_vector_database.search(
table_name       IN VARCHAR2,
query_by         IN JSON,
filters          IN JSON     DEFAULT NULL,
top_k            IN NUMBER,
include_vectors  IN BOOLEAN  DEFAULT FALSE,
output_selector  IN JSON     DEFAULT NULL,
advanced_options IN JSON     DEFAULT NULL,
debug_flags      IN JSON     DEFAULT NULL,
request_id       IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
SUMMAARY (new 26ai)
Undocumented dbms_vector_database.summary(
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD
 
UPDATE_VECTOR_TABLE_ANNOTATION (new 26ai)
Updates metadata annotations, description, status, and statistics for an existing integrated model vector table. This function validates that the table exists in the current schema and in the vector database metadata before applying updates

Overload 1
dbms_vector_database.update_vector_table_annotation(
table_name  IN  VARCHAR2,
description IN  VARCHAR2 DEFAULT NULL,
annotations IN  JSON     DEFAULT NULL,
status      IN  VARCHAR2 DEFAULT NULL,
stats       IN  JSON     DEFAULT NULL,
debug_flags IN  JSON     DEFAULT NULL,
request_id  IN  VARCHAR2 DEFAULT NULL,
output      OUT CLOB);
TBD
Overload 2 dbms_vector_database.update_vector_table_annotation(
table_name  IN VARCHAR2,
description IN VARCHAR2 DEFAULT NULL,
annotations IN JSON     DEFAULT NULL,
status      IN VARCHAR2 DEFAULT NULL,
stats       IN JSON     DEFAULT NULL,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB);
TBD
 
UPSERT_VECTORS (new 26ai)
Performs an upsert (insert or update) of vectors into a specified vector table

Overload 1
dbms_vector_database.upsert_vectors(
table_name  IN  VARCHAR2,
vectors     IN  JSON,
debug_flags IN  JSON     DEFAULT NULL,
request_id  IN  VARCHAR2 DEFAULT NULL,
output      OUT CLOB);
TBD
Overload 2 dbms_vector_database.upsert_vectors(
table_name  IN VARCHAR2,
vectors     IN JSON,
debug_flags IN JSON     DEFAULT NULL,
request_id  IN VARCHAR2 DEFAULT NULL)
RETURN CLOB;
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_HYBRID_VECTOR
DBMS_SEARCH
DBMS_SEARCH_DEF
DBMS_SYS_SQL
DBMS_VECTOR_CHAIN
DBMS_VECTOR_INTERNAL
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved