# CDB operational data not getting persisted

**URL:** <https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239>\
**Category:** CDB and CDB API\
**Created:** [October 9, 2015, 1:17pm UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239 "2015-10-09T13:17:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunmu](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@arunmu](https://dmap-community.ductus.global/u/arunmu)\
**Post date:** [October 9, 2015, 1:17pm UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239/1 "2015-10-09T13:17:21Z")

</div>

Hello Folks,  
I am storing an operational data in CDB which I want to be persisted so that it can be reused across confd reboots. I have followed the steps as described in the user guide, which being:

1. cdb\_start\_session(sock, CDB\_OPERATIONAL)
2. cdb\_set\_namespace
3. Bunch of CONFD\_SET\_TAG calls
4. cdb\_end\_session

Also, I have annotated the yang file with ‘tailf:cdb-oper’ and ‘tailf:persistent true’. Still, the operational data does not get persisted.  
I have verified that the operational data does get updated by reading back the value after updating it, only thing is that it is not persisted. I starts again with the default value configured in the yang.

Any hints ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [October 9, 2015, 7:39pm UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239/2 "2015-10-09T19:39:00Z")

</div>

Should work. Have you enabled the operational data store in the ConfD configuration file? E.g. “confd.conf”.

You can use $CONFD\_DIR/examples.confd/cdb\_oper/loadhist as a reference for using CDB for persistent storage of operational data.

From the UG:

> /confdConfig/cdb/operational/enabled (xs:boolean) [false]  
> Whether to enable storage of operational data in CDB.

---

<div class="post-metadata">

**Author:** ![arunmu](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@arunmu](https://dmap-community.ductus.global/u/arunmu)\
**Post date:** [October 10, 2015, 10:52am UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239/3 "2015-10-10T10:52:54Z")

</div>

Yeah, operational DB is enabled.

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [October 10, 2015, 11:32am UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239/4 "2015-10-10T11:32:56Z")

</div>

Great, then I suggest you compare with the $CONFD\_DIR/examples.confd/cdb\_oper/loadhist example, check what the issue might be, or post your related YANG and c-code so we can take a look at it.

---

<div class="post-metadata">

**Author:** ![arunmu](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@arunmu](https://dmap-community.ductus.global/u/arunmu)\
**Post date:** [October 19, 2015, 3:22am UTC](https://dmap-community.ductus.global/t/cdb-operational-data-not-getting-persisted/239/5 "2015-10-19T03:22:16Z")

</div>

I had followed the example as it is. But currently I dont have this requirement, so I have stopped working on it.  
Thanks for your help.
