Showing results for 
Search instead for 
Did you mean: 

CM DB device.datetimeinserted contains nothing

Hello community,

I've got problem while sql querying Cm database.

Should datetimeinserted field of device table return timestamp of when phone profile has been created?

I'm getting just empty string, while values of other fields in this table returned successfully.

UCM 10.5

Everyone's tags (5)

Re: CM DB device.datetimeinserted contains nothing


that's correct, datetimeinserted field shows the time when device inserted.

See the information below the field name in CUCM SQL Dictionary

I have already performed some tests with sql query on cucm 10.5 and 8.6.

Like you, I get NULL in datetimeinserted but maybe Cisco just give us the option to change this value over insert/update SQL queries.

I performed SQL update on device specific and the field changed

run sql update device set datetimeinserted="131101" where pkid='f514f548-9bc4-3dd7-0cef-1222c3996d4c'

pkid                                                                        name                                            datetimeinserted

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

f514f548-9bc4-3dd7-0cef-1222c3996d4c             AXL 7861 Phone Template         131101

Cisco Employee

Re: CM DB device.datetimeinserted contains nothing

It's possible (maybe even likely?) that the datetimeinserted field was defined at some point in the DB historically but never actually used by the CUCM code implementation, or its function was removed...if it's not getting written, then the assumption is somewhat necessarily that this is by design.

To some extent, apps dealing with accessing the raw SQL data must face the sometimes unexplained quirks of the system...I.e. engineering would likely not contemplate a bug report or enhancement request to start populating this field purely for 3rd party app convenience...

Unfortunately, I'm not aware of another way of getting such timestamp info.  About the only suggestion would be to consider the 'Change Notification' system, whereby the app could become aware of CRUD operations on DB items (like devices) in semi-real-time, and assign its own internal time-stamp...

Cisco DevNet: Administrative XML (AXL) - AXL Developer Guide v11.0

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards