Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Problem with software table [closed]

Hi,

I contact you because I have a problem with the software tab on OCS.

The software's list is empty on OCS for lot of computers.

After diagnostic, the MAX(ID) from software table is 2147483647 and it is the max value of INT type.

The software table can't register anything new.

The MIN(ID) is 430426245

Total entries (select count) in the software table is : 28485014.

We can see that 28 485 014 < 2 147 483 647 and I don't understand why the auto increment didn't begin at 1.

Can someone help me to find a solution please ? Do you have already met this problem ?

My OCS version is 2.8.1 and the OS is Debian Buster (10).


Thanks in advance,

Kind Regards

closed with the note: Problem solved
in OCS Inventory NG server for Unix by (250 points)
closed by

2 Answers

0 votes
 
Best answer

The table 'software' start from OCS 2.8 (before the table is 'softwares' cf 7037.sql script).

If you start a NEW server with OCS 2.10, the field 'ID' of table 'software' is a 'bigint' field (not an 'int' field !).

BUT, if you upgrade you OCS server, the field 'ID' of table 'software' could be a 'int' field.

There is a problem between '7035.sql' and 'ocsbase_new.sql' : in '7035.sql' the type is 'int', and in 'ocsbase_new.sql' the type is 'bigint' ...

I suggest an sql cmd as 'alter table software modify ID bigint not null auto_increment;' ? (I strongly recommand to stop Apache before launching the sql !!)

EDIT : the script 7053.sql do the job :

ALTER TABLE software MODIFY COLUMN ID BIGINT(20) NOT NULL AUTO_INCREMENT;
ALTER TABLE software_link MODIFY COLUMN ID BIGINT(20) NOT NULL AUTO_INCREMENT;
ALTER TABLE software_categories_link MODIFY COLUMN ID BIGINT(20) NOT NULL AUTO_INCREMENT;

by (18.9k points)
edited by
0 votes
Hi Jacques,

Thanks for your answer, it's ok for me now.

After an inventory, the softwares appears correctly.

Kind Regards
by (250 points)
 
Powered by Question2Answer
...