diff --git a/pldm.hpp b/pldm.hpp
index 5d093a1..641153f 100644
--- a/pldm.hpp
+++ b/pldm.hpp
@@ -1,8 +1,10 @@
 #pragma once
+
 #include "occ_events.hpp"
 #include "occ_status.hpp"
 #include "utils.hpp"
 
+#include <libpldm/instance-id.h>
 #include <libpldm/pldm.h>
 
 #include <sdbusplus/bus/match.hpp>
@@ -44,7 +46,7 @@
 {
   public:
     Interface() = delete;
-    ~Interface() = default;
+    //~Interface() = default;
     Interface(const Interface&) = delete;
     Interface& operator=(const Interface&) = delete;
     Interface(Interface&&) = delete;
@@ -80,7 +82,22 @@
         pldmRspTimer(
             sdeventplus::utility::Timer<sdeventplus::ClockId::Monotonic>(
                 sdpEvent, std::bind(&Interface::pldmRspExpired, this)))
-    {}
+    {
+        int rc = pldm_instance_db_init_default(&pldmInstanceIdDb);
+        if (rc)
+        {
+            throw std::system_category().default_error_condition(rc);
+        }
+    }
+
+    ~Interface()
+    {
+        int rc = pldm_instance_db_destroy(pldmInstanceIdDb);
+        if (rc)
+        {
+            std::cout << "pldm_instance_db_destroy failed, rc =" << rc << "\n";
+        }
+    }
 
     /** @brief Fetch the state sensor PDRs and populate the cache with
      *         sensorId to OCC/SBE instance mapping information and the sensor
@@ -149,6 +166,10 @@
     void setTraceThrottle(const bool throttle);
 
   private:
+    /** @brief PLDM instance ID database object used to get instance IDs
+     */
+    pldm_instance_db* pldmInstanceIdDb = nullptr;
+
     /** @brief PLDM instance number used in PLDM requests
      */
     std::optional<uint8_t> pldmInstanceID;
@@ -303,12 +324,15 @@
         return (occInstanceToEffecter.empty() ? false : true);
     }
 
-    /** @brief Query PLDM for the MCTP requester instance id
+    /** @brief Get a PLDM requester instance id
      *
      * @return true if the id was found and false if not
      */
     bool getPldmInstanceId();
 
+    /** @brief Free PLDM requester instance id */
+    void freePldmInstanceId();
+
     /** @brief Encode a GetStateSensor command into a PLDM request
      *  @param[in] instance - OCC instance number
      *  @param[in] sensorId - OCC Active sensor ID number
