sql: Introduce sql_db_name()