Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

which table store the value of "OID" (every object's ID)

SOLVED
Go to solution
Highlighted
scstone
Occasional Contributor

which table store the value of "OID" (every object's ID)

I cann't found the table which store the value of "OID" within OVSD4.5 , such as "cha_oid" or "prj_oid" or "cod_oid" or "per_oid" etc.I think all objects's ID in OVSD are continuously, but there have any sequence or table which stored the current value of the ID? where is it?? :-(
7 REPLIES
Martin Westerve
Honored Contributor
Solution

Re: which table store the value of "OID" (every object's ID)

Hi,

I never heard that there is such a table, where this is stored. The only sequence table I know is ifc_sequences and there are the id's stored of the records of all entities.

Isn't it app. server intelligence who gives out the oid's??????

I like to know this also!!

Regards,

Martin
As finishing touch God created the Dutch
Frans_F
Honored Contributor

Re: which table store the value of "OID" (every object's ID)

It's a generated value that has no reference in a table. With that I mean it's not a sequence table. I cannot go to deeply in how it's done but the logic should take care of preventing double occurences. That's also why you cannot generate OID's yourself and update tables to make it work ;-) as you could theoratically do with normal ID's.

Rg,
Frans
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
scstone
Occasional Contributor

Re: which table store the value of "OID" (every object's ID)

Frans: I just want add records in my DB,but every table have the PK with the "OID" column, I think OVSD impoldered by one of DB design tools, because i used Powerdesign,It used "OID" as identify for new objects.But how to get the next value for new object in OVSD???
Martin: I retrieved every table before,include the ifc_sequences. I also think the "OID" is not computed by JAVA CLASS on app.server, because the "OID" column is displayed most table in OVSD DB,if it want compute the next value, app.server must select all of these tables to get the MAX value,then (the next "OID"=MAX value+1),but JDBC is so slow,select all table may be impossibility???

continue attention...
scstone
Occasional Contributor

Re: which table store the value of "OID" (every object's ID)

regard....
Frans_F
Honored Contributor

Re: which table store the value of "OID" (every object's ID)

One short comment what you are trying to do is not allowed (inserting records directly in the service desk DB that is).

The OID is generated by the service desk application.

The only way to enter records is to use data_exchange or sd_event or the normal UI or via the api.

Rg,
Frans
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Jasper Verweij
Honored Contributor

Re: which table store the value of "OID" (every object's ID)

Although I have to admit as well, inserting records directly in database isn't supported this issue has had my attention for a while as well.

The app server is responsible for generating the OID. The logic is in the JAVA layer. There are some curious things though on database level:
- HP adds hardcoded OID's during database upgrades, ITSM migration, etc.. SO there is a range of OID's, that hp knows that app server won't generate
- Not all OID are unique...there are several tables with OID=1...
- IFC_SYSTEM has a column called OIDHIGH.

You are my guest to use this info, but I would recommend you to not look any further, because you are really on the very, very unsupported highway.

Jasper
LawrenceP
Super Collector

Re: which table store the value of "OID" (every object's ID)

An OID is a 64 bits number in order to fit as a number in a database. The Java code generates the 64 bits number for a new OID as follows:

When a user logs in, the current value of IFC_SYSTEM.SYS_OIDHIGH is retrieved, and the value is raised by 1 in the database. After the user has retrieved a SYS_OIDHIGH value from the database the user can internally generate 65535 new OIDs. In the event the user generates more than 65535 new OIDs within one session, it will again retrieve a new SYS_OIDHIGH value from the database, etc. etc.

As said, an OID is 64 bits longs. The first 16 bits are equal to the value of IFC_SYSTEM.SYS_SITE. The next 32 bits are equal to the SYS_OIDHIGH the user retrieved. The last 16 bits starts with 0 within a user's session, and increments by 1 for each new OID.

Note: the IFC_SEQUENCES table is used to generate new Functional IDs. This is something else than OIDs.




Lawrence
//Add this to "OnDomLoad" event