Only set the SQL Server DB name when executing a query

Setting the DB name in the connection options will cause `create` actions to fail and likely also cause problems with `delete` actions.

So let's only set the database name when executing a `query` action.