Making bulk changes in CUCM can be done in 3 ways:

  1. bulk operations built into cucm – great but very limited
  2. import/export of tar file – all details – concise but requires change freeze
  3. 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”)

2 Thoughts on “sql: update line text label

  1. 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”)

  2. Jeff Levensailor on December 8, 2016 at 6:38 pm said:

    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 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation