Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Managed Instance
Returns the database name specified by the user in the database connection string. This database is specified by using the sqlcmd-d option (USE database). It can also be specified with the Open Database Connectivity (ODBC) data source expression (initial catalog =databasename).
This database is different from the default user database.
Transact-SQL syntax conventions
ORIGINAL_DB_NAME ()
If the initial database isn't specified, the function returns an empty string.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today