Can I put one stream data into two persistence provider as replica?
i would like to stream data into two persistence data storage (one for master, one for backup or testing)
Can I ?
Solved! Go to Solution.
If you create a new Stream then it will be associated with one persistence provider only. So ideally you will be able to insert data into one DB. Alternatively, if you want stream data replication into another DB, you can consider another approach like maybe using a scheduler that runs every day and picks up everyday data from your main Stream(DB) and then put it into another DB(using DB thing). Or else if you have another ThingWorx test server where you want to bring this Stream then you can use ThingWorx Data export/import functionality to have another replication in a separate server. One more way could be to have this procedure (to replicate the data into another schema/DB) in DB itself and you can trigger that from DB thing. There can be different approaches according to the use case.
If you create a new Stream then it will be associated with one persistence provider only. So ideally you will be able to insert data into one DB. Alternatively, if you want stream data replication into another DB, you can consider another approach like maybe using a scheduler that runs every day and picks up everyday data from your main Stream(DB) and then put it into another DB(using DB thing). Or else if you have another ThingWorx test server where you want to bring this Stream then you can use ThingWorx Data export/import functionality to have another replication in a separate server. One more way could be to have this procedure (to replicate the data into another schema/DB) in DB itself and you can trigger that from DB thing. There can be different approaches according to the use case.
Just my 2 cents to add to @mnarang 's answer.
For making a copy of the stream for the testing purposes and for the purposes of backup in terms of recovering after an accidental / caused by malware change or deletion of the data in the production server, the approach @mnarang suggests fits great.
If you need a backup /replica to increase the system availability (i.e. for the case when the server with Thingworx malfunctions), you'd need to configure Thingworx and / or the database you're using to work in a High Availability environment.