cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
287
Views
0
Helpful
5
Replies

CCM and SQL Queries

SEAN NILSEN
Level 4
Level 4

Does anybody have the SQL structure for updating the device.xml field through Enterprise Mananger?

I have a bunch (all 200) phones to update the speaker phone field on, and am looking to do it quickly but can't seem to match the <speakerphone> tag in my SQL query.

My structure looks like:

Select *

FROM dbo.Device

WHERE (xml LIKE '<disableSpeaker>false')

Any ideas?

5 Replies 5

gstegmann
Level 1
Level 1

hi there .

what exactly are you talking about ? do you want to update all fields 'xml' in the table 'device' from false to true ?

then this is the QUERY :

update device set xml=true where xml=false

BE CAREFULL : this updates ALL rows that have xml set to false, not just the phones. if you have further questions, feel free to email me.

greetings, gerhard

Hmmm I'd be very careful here, I dont think Cisco approve of "raw" updates to CM using the SQL Enterprise manager, if it goes wrong Im certain they wont support it.

Cisco also does not currently provide a tool for Bulk Updates of users. So we in the field managing hordes of phones are left to our own devices. Being an 'old time' Access guy, I know enough about query structure to NOT be dangerous in the E.M., although I am not sure why my query is not returning a correct response.

Thanks for your concern regarding my potential support issues.

Thanks. What I am specifically trying to do at the moment is run a Select query to just pull the rows of the table where the XML field, which contains more than just a true/false value, there are several XML tags in that field.

I am familiar with the "update" command structure and what you have there will not work for this field. I am trying to return all rows where the value begins with: false

and was trying to use the query in the original post to parse the list to only those records where the speakerPhone value in the XML field a)exists b)is currently false.

I want to succesfully run a SELECT query before I even begin considering running any kind of UPDATE.

If I understand what you are trying to do correctly the first query you typed was almost correct. try:

select * from device where xml like 'false%'

You just left out the %.

Hope this helps,

-Mckee

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: