Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

CCM and SQL Queries

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
New Member

Re: CCM and SQL Queries

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

New Member

Re: CCM and SQL Queries

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.

New Member

Re: CCM and SQL Queries

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.

New Member

Re: CCM and SQL Queries

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.

Cisco Employee

Re: CCM and SQL Queries

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

121
Views
0
Helpful
5
Replies