string public \Bitrix\Main\DB\Connection::getDbName( );
This non-static method returns database name.
No parameters