Making bulk changes in CUCM can be done in 3 ways:
- bulk operations built into cucm – great but very limited
- import/export of tar file – all details – concise but requires change freeze
- sql operations – sometimes the best option
The following example I needed to update each line text label to add “Agent” to the beginning. Built in operations would only allow me to change the label all together, not append text. Import / Export would work fine, but for 10,000 phones this would take a full day to process. In this case SQL was my best option. The query below matches the line and updates the label. I used excel and the concatenate function to pump out all of the required operations.
run sql update devicenumplanmap set (label) = (‘Agent – 1112001’) where fknumplan = (select pkid from numplan where dnorpattern = “1112001”)
Wouldn’t this be a one to one operation and not really automatic? You are still doing it ext by ext. Is there a way to wildcard that? For example …
run sql update devicenumplanmap set (label) = (‘Agent – 1112XXX’) where fknumplan = (select pkid from numplan where dnorpattern = “1112XXX”)
There probably is a wildcard or regular expression but I used excel to generate each sql command and pasted about 100 at a time. Please share if you figure out a more efficient way. I’m not the strongest programmer, but it’s all about hacking things to save time 🙂