Disassociates or removes an index file for a database table.
Syntax
sp_RemoveIndexFile(
TableName,CHARACTER,200,
IndexFileName,CHARACTER,200,
DeleteFile,LOGICAL )
Parameters
TableName (I) |
Name of the table to disassociate the index file. |
IndexFileName (I) |
Base name of the index file not including any directory path. This value should match the index file name from the system.IndexFiles table. |
DeleteFile (I) |
If true, the index will be physically deleted through the operating system. |
Special Return Codes
AE_INVALID_OBJECT_NAME |
The table specified by TableName or the index file specified by the IndexFileName cannot be located in the data dictionary. |
AE_PERMISSION_DENIED |
The current connected user does not have permission to ALTER the table. |
Remarks
sp_RemoveIndexFile disassociates or removes an index file associated with a database table. The procedure does not open the table so it is useful for deleting corrupted index file and rebuilding the index from scratch. If the index file is in use by other user, it will not be physically deleted. The DROP INDEX statement is a safer alternative to this procedure.
Example
EXECUTE PROCEDURE sp_RemoveIndexFile(
‘Customer Information’,
‘InvoiceDate.ntx’,
True );
See Also