--- title: "getDatabaseName Method (SQLServerDataSource) | 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: - "SQLServerDataSource.getDatabaseName" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: cffa1602-c045-4e61-abb6-442ade28dbf6 author: David-Engel ms.author: v-daenge --- # getDatabaseName Method (SQLServerDataSource) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Returns the database name. ## Syntax ``` public java.lang.String getDatabaseName() ``` ## Return Value A **String** that contains the database name or null if no value is set. ## See Also [SQLServerDataSource Members](../../../connect/jdbc/reference/sqlserverdatasource-members.md) [SQLServerDataSource Class](../../../connect/jdbc/reference/sqlserverdatasource-class.md)