You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Duplicated license server entries after migrating to License Statistics v4.6.1 database

When updating to License Statistics v4.6.1, the database migration normally updates all details for license servers. However, if you see duplicated entries on the Dashboard for a license server after upgrading to v4.6.1, there was a problem migrating the license server to the v4.6.1 database. In this case, you will see the following warning message in the error log:

2012-01-30 08:00:00 Database update (version 52): Unable to migrate details of hostname license server (type license_server_type)! You may need to merge this license server manually by editing the existing license server in the License Servers page.

To resolve this problem, edit the original license server in License Statistics and merge it with the duplicated license server as described in "Merging server data" in Combining duplicate license servers under a single server.

Inability to update UsersCount table (duplicate entry error)

A bug introduced in an older version of License Statistics can result in the database index being prematurely exhausted if License Statistics is restarted too often. In such cases, there will be a problem updating the UsersCount table and you will see one or both of the following MySQL errors in the License Statistics log:

ERROR 1062 (23000) at line 1 in file: 'D:\X-Formation\License Statistics\mysql_x86\sql_query_35070.sql': Duplicate entry '65535' for key 'PRIMARY'!
[2013-03-31 01:40:03] WARNING: Unable to save concurrent hosts count to database!

FAIL: Unable to clear required tables!
MySQL error: ERROR 1062 (23000) at line 5 in file: 'D:\X-Formation\License Statistics\mysql_x86\sql_query_16.sql': Duplicate entry '65535' for key 'PRIMARY'

To resolve this problem, compact the indexes of the affected table by running the SQL commands detailed in the following steps.

  1. Shut down License Statistics.

  2. Backup your data for the UsersCount table using the following SQL command:
    SELECT Date, Total, DailyUsers, Hosts INTO OUTFILE 'userscount.dump' FROM UsersCount;
     
  3. After successful backup, truncate the data and reset the index:
    TRUNCATE UsersCount;

    ALTER TABLE UsersCount AUTO_INCREMENT = 1;


  4. Restore the data:
    LOAD DATA INFILE 'userscount.dump' INTO TABLE UsersCount (Date, Total, DailyUsers, Hosts);

  5. Restart License Statistics.

After performing these steps, the duplicate entry issues should be resolved.

  • No labels