I can recommend you take a look at KepServerEX Configuration API. Basically, it gives you complete remote management and configuration control over all your KEPServerEX instances. In your case, you can dynamically generate tags through a simple RESTful API call at the device level after reading required information (e.g. tag name, tag address, tag datatype) from your database.
Please refer to this guide for more information in order to enable and test Configuration API.
I also copied the following piece of code from Kepware's sample project to give you an idea:
function createTag(inputServer, inputChannel, inputDevice, inputTag, inputTagAddr) {
console.log("Creating " + inputTag + " with address " + inputTagAddr);
$.ajax({
type: 'POST',
url: 'http://' + inputServer + '/config/v1/project/channels/' + inputChannel + '/devices/' + inputDevice + '/tags',
data: '{"common.ALLTYPES_NAME":"' + inputTag + '","servermain.TAG_ADDRESS":"' + inputTagAddr + '","servermain.TAG_DATA_TYPE":' + inputTagType + '}',
contentType: 'application/json',
xhrFields: {
withCredentials: false
},
headers: {
'Authorization': 'Basic ' + encodeAuth
},
success: function(JSON, status, xhr) {
console.log(inputTag + " created under " + inputDevice);
},
error: function(JSON, status, xhr) {
console.log("Creation of " + inputTag + " failed!");
}
});
}