Category Archives: OCS Inventory NG

OCS Inventory NG – usefull SQL scripts

Most important tables:
accountinfo – main table witch contain ID of device
[HARDWARE_ID] [TAG] [fields_4] [fields_5] [fields_6]…

hardware – OS info.
[ID] [DEVICEID] [NAME] [WORKGROUP] [USERDOMAIN] [OSNAME] [OSVERSION] [OSCOMMENTS] [PROCESSORT] [] ……

bios – hardware info.
[HARDWARE_ID] [] [] [] [] [] [] [] …….

itmgmt_comments – commants, very usefull

Notes: It is possible to create Your own fields, for example Inventory number assigned inside company for every device. In this case fields_4. Those fields are created in accountinfo table.
Continue reading

OCS Inventory – checking database size

SELECT
TABLE_NAME AS `Table`,
ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
FROM
information_schema.TABLES
WHERE
TABLE_SCHEMA = "ocsdb"
ORDER BY
(DATA_LENGTH + INDEX_LENGTH)
DESC;

With installed plugins: eventlogs, gpresult, officepack, services, sharedFolders, uptime, winusers and 900 reporting clients (agents) database size is something about 350 MB.