Do you know where it is exactly failing (during extraction or during saving data to external DB)? Could you please compare the configuration of both working and non-working environment , also provide us log after enabling debug mode for below class.
Exactly what exception you are getting and how you have configured the external DB? Is it in database instance or prconfig.xml file? If it is from prconfig, could you please compare the prconfig configuration of both working and non-working scenario and check.