Ensign Ensign

How is the lhistoryid (primary key) for the amHistory table generated in Oracle?


I can't figure out where the amHistory.lhistoryid comes from.

I read on this forum that the "AM" sequence is used for all primary key generation. I read elsewhere on this forum that the "lastid" table is used.

The highest lhistoryid value in our amHistory table is 771636110.

No sequence in our database has a value that high, nor does the "lastid" table. So I am completely at a loss as to where these values are generated.

We are using HP Asset Manager 9.62, if that helps.


3 Replies
Fleet Admiral Fleet Admiral
Fleet Admiral

All AM table primary keys come from one source at the DBMS level.  I never had to worry about this, so even if there is something AM specific, then you will want to contact MicroFocus directly.  The AM sequence is used in conjunction with 'Counters (amCounter)' table records to read and increment the numeric values.  If I am not mistaken, the lastid is used in the demo.

Ensign Ensign

None of the sequences in the database are high enough. The highest lhistoryid is nine digits, and we haven't found any number in any sequence, lastid, or amCounter (which I hadn't previously been aware of, thanks for that!) with that many digits.

Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Following hints might help:

- Table: IndependentLastId (because LastId table is only for the universal AM ids generator; IndependentLastId table was added to hold IDs which increment rapidly and have nothing to do with AM core business important tables - those satellite tables IDs were polluting/incrementing the global one uselessly - that was sometimes leading to IDs exhaustion)

- Stored Proc: UP_GETINDEPID (which replace UP_GETID when dealing with satellite tables)

- One can guess than amHistory is considered a satellite table

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.