Procedure will check if index exists in the database and will attempt to drop the index.
Arguments
-
v_Index_Name – Name of the index, SYSNAME.
-
v_Object_Name – Name of the Table or view to whom this index belongs Name, SYSNAME.
Note:
Supported in SQL Server versions at this time.
Netezza does not support Indexes as concept at this point;
In the Oracle version of the framework, as work around, please use ‘WHENEVER SQLERROR CONTINUE’ command where needed;
Examples
SQL Server
EXEC DBTD_DROP_INDEX_IF_EXISTS
'IX_DBTD_TMP_INDEXTABLE_Name',
'DBTD_TMP_INDEXTABLE';
EXEC DBTD_DROP_INDEX_IF_EXISTS
'IX_DBTD_TMP_INDEXTABLE_Name',
'MyServer.MyDatabase.MySchema.DBTD_TMP_INDEXTABLE';
See Also