--- title: "getMaxIndexLength Method (SQLServerDatabaseMetaData) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerDatabaseMetaData.getMaxIndexLength" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 7c85d021-d466-4732-85f9-53903d297041 author: David-Engel ms.author: v-daenge --- # getMaxIndexLength Method (SQLServerDatabaseMetaData) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Retrieves the maximum number of bytes that this database allows for an index, including all of the parts of the index. ## Syntax ``` public int getMaxIndexLength() ``` ## Return Value An **int** that indicates the maximum number of bytes allowed. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This getMaxIndexLength method is specified by the getMaxIndexLength method in the java.sql.DatabaseMetaData interface. ## See Also [SQLServerDatabaseMetaData Methods](../../../connect/jdbc/reference/sqlserverdatabasemetadata-methods.md) [SQLServerDatabaseMetaData Members](../../../connect/jdbc/reference/sqlserverdatabasemetadata-members.md) [SQLServerDatabaseMetaData Class](../../../connect/jdbc/reference/sqlserverdatabasemetadata-class.md)