If dbname not set then fall back to instance_name

Required for the API which calls dbname rather to get the connection
name rather than using instance_db