Assert verifies that index exists with given name and for a specified table. Fail when index has not been found for a specified table.
Note:
- Supported in Oracle and SQL Server framework versions.
- Netezza does not support indexes at this time, however appliance does have _v_table_index system view that might allow users in the future to use this functionality (at list for system objects)
Arguments
-
v_IndexName – index name, Variable Character(255) in Oracle, SYSNAME in SQL Server
-
v_ObjectName – table or view name, Variable Character(255) in Oracle, SYSNAME in SQL Server
-
v_UserMessage – message to report when assertion fails, Variable Character(255) in Oracle, NVARCHAR(MAX) in SQL Server
Examples
Netezza
CALL DBTD_ASSERT_INDEX_EXISTS ('ix_Product_Name', 'Product', 'cannot find index');
Oracle
DBTD_ASSERT_INDEX_EXISTS ('ix_Product_Name', 'Product', 'cannot find index');
SQL Server
EXEC DBTD_ASSERT_INDEX_EXISTS 'ix_Product_Name', 'Product', 'cannot find index';
See Also