Cisco Support Community
Community Member

AXL execute SQL update

Is there a way to fire off an update query like:

Update devices set description = 'A' where description = 'B'

I get a "no update permission" error.

Yes, this a bad idea for many reasons, but I'm not willing to let that stop me, at least in this lab/test scenario...


Re: AXL execute SQL update

you probably don't have correct credentials,

have you tried through CLI?

(and tried using device instead of devices (the s)

admin:run sql update device set description='test' where description='SEP00xxxxxxxxxx'

Rows: 1

Re: AXL execute SQL update

Hmm... could be a bug since it's supposed to tell you that the table devices does not exist.

And there are no different levels of axl access.. if your user has axl access (and thus can send sql queries for instance) the update commands must work (unless you try to do something that would violate the db constraints.. in that case you'll get an error from the database layer telling you what you're trying to do is not permitted).

Community Member

Re: AXL execute SQL update

Thanks for the response Stephan and s. Sorry - the original post had a typo. I was using the proper table name.

I didn't realize that there was a command line option. I've been avoiding the command line because I don't know too much about it. The command line option worked:

admin:run sql update device set description= "Test" where name="SEP000000032081"

Rows: 1


Of course this morning, I get something totally different from AXL (but these are the actual reuest and response envelopes):

sent:" xmlns:xsi="" xmlns:xsd="">

update device set description= 'Test' where name='SEP001BD458B533'




Method only for queries">


Method only for queries


Community Member

Re: AXL execute SQL update

Hmmm…. The plot thickens. I received an eval phone that I was trying to set up. I was trying to update the tkModel field to the appropriate value so that the phone registration would not be rejected. Apparently update permissions are set on a field by field basis - unless I am missing some referential integrity issue here.

SO, this query works:

admin:run sql update Device set Description="Wes 7 9 2 5" where name = "SEP002290EA9F61"

Rows: 1

But this one does not work:

admin:run sql update Device set tkModel=484 where name = "SEP002290EA9F61"

No UPDATE permission.

Ironically, when I look at the type model table, there is an entry, but it's obviously "turned off". Guess I'll have to try and track down a patch or see what I need to turn it on!

admin:run sql select * from TypeProduct where enum=371

enum name moniker tkmodel maxports showindropdown devicenameformat isinstalleddefault devicenamestring

==== ========== ================== ======= ======== ============== ================================= ================== ================

371 Cisco 7925 PRODUCT_CISCO_7925 484 0 f ([sS][eE][pP]|BAT)[0-9a-fA-F]{12} f SEP[mac]


Re: AXL execute SQL update

in axl you need to use executeSQLUpdate (insted of Query)

and you can never change the model of a phone, you need to delete it, and recreate it with the correct type


Community Member

Re: AXL execute SQL update

Ahhh - it was the executeSQLUpdate that was throwing me...

Re: AXL execute SQL update

hmm... the error is still weird though.. axl is supposed to tell you that you cannot make updates with executeSQLQuery... at least I recall it telling me so.

CreatePlease to create content