Can we put only of the running Oracle instances in one server to SDT?
We have servers where there are multiple DBs hosted. Not all of them undergo the maintenance window at the same time. So the DB team would like to have the option of putting only the required DB instance to SDT.
usnishguha
Posted 3 years ago·Last reply 3 years ago
5 comments
LM User
·3 years agoAh, so you want to cascade SDT from one instance on one device, to another instance on the same device under a different datasource?
That could be done too, but would need to be done programmatically.
Mike Moniz
·3 years agoAh, not that I know of for particular instances. Something like that might be best to do using the API. I’ve seen setups where companies have created special bulk-sdt scripts for these cases.
Like what Stuart mentions above.
LM User
·3 years agoYeah, you can do that. You’d have to select each instance and define the SDT there though. Just click on the instance then go to the SDT tab.
If you want to manage it programmatically, you can use the API/SDK. Just do a post to /sdt/sdts with payload like this:
Trick is getting the dataSourceInstanceId. But if you find out the datasource ID by doing a GET on:
/setting/datasources?filter=name:\”The_DS_Short_Name_Not_displayName\”&fields=id,name,displayName
You can also get this from the URL once you’re looking at the DS on the settings page.
Now you have the DS ID. Then you can do a GET on:
/device/devices/{deviceId}/instances?filter=dataSourceId:”{DS_ID}”&size=1000&fields=id,name,displayName
From that response, use the id in your post to /sdt/sdts.
Mike Moniz
·3 years agoYou can set SDT at almost any level in the resource or website tree. I’m not sure what specific check you are using, but click on the specific DB entry in the left tree on the resources page, then click on the SDT tab and add an SDT that will only apply to that entry.