In the Host parameter you need to specify all members of the MongoDB replica set using the following syntax host1[:port],host2[:port] . Then in the Advanced tab, you need to set to add a replicaSet parameter (e.g. replicaSet=my-replica-set)
Action: When running my package manually by VS it executes succesfully, but when I run it by SQL Agent job I get the following error message: Unable to connect to a member of the replica set matching Secondary Preferred Error Message: An error ...