--- title: "getMaxCatalogNameLength 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.getMaxCatalogNameLength" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: 89c11327-eae1-4178-9e26-4b484d521c65 author: David-Engel ms.author: v-daenge --- # getMaxCatalogNameLength Method (SQLServerDatabaseMetaData) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Retrieves the maximum number of characters that this database allows in a catalog name. ## Syntax ``` public int getMaxCatalogNameLength() ``` ## Return Value An **int** that indicates the maximum number of characters allowed. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This getMaxCatalogNameLength method is specified by the getMaxCatalogNameLength 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)