Grab database name dynamically