Assuming your agent handler can connect to the ePO DB using the same connection information as your ePO server you can resolve this by taking the db.properties file from your ePO server (which presumably has the correct information) and replacing it on the AH.
The db.properties file on the ePO server can be found here: <ePO Install directory>\server\conf\orion\db.properties
You can replace it on the AH here: <Agent Handler Install directory>\DB\db.properties
That should work fine so-long as the agent handler can connect to the DB using the same information ePO uses. For example if DNS on the AH does not resolve the correct IP address for the SQL server then you would have to edit the db.properties file and supply an IP address in the "servername field" that the AH can use to route to the SQL server.