cancel
Showing results for 
Search instead for 
Did you mean: 

HANA table with "wrong number of partitions"

0 Kudos
105

Hello everyone,

I'm currently trying to do the prep steps before migrating our HANA system (rev 83) to the new Embedded Stats Service.

The first check involves running the following procedure:

CHECK_TABLE_CONSISTENCY ('CHECK','_SYS_STATISTICS',null)

The checks fail, stating that "_SYS_STATISTICS"."HOST_HEAP_ALLOCATORS" has the "Wrong number of partitions/replicates is stored in the NameServer".

Looking at the table runtime info, the system is expecting 2 partitions, but only the first (range to 2014/04/01) exists - the "Other" partition is missing.

I've tried running ALTER TABLE commands - both to try and merge partitions, and also to force the creation of the missing "other" partition, but they all fail, eg as follows:

I've also tried dropping the entire table (with a view to recreating it correctly), but this also fails because of an "invalid part id":

Does anyone know a way to repair the table so we can proceed with the migration?

Many thanks in advance.

Guy


Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi again, Anyone have any thoughts on this? Any tips much appreciated.

Thanks

lbreddemann
Active Contributor
0 Kudos

Apparently your statistics server tables got corrupted.

I recommend to reinitialize the statistics server to fix that.

- Lars

0 Kudos


Thanks for replying Lars.

Please could you give me an idea how to reinitialize the stats server?

I've tried restarting the service using SYSTEM STOP SERVICE 'hanaserver:30005' which hasn't fixed the table, but I guess reinitializing is something more significant.

cheers

Guy

lbreddemann
Active Contributor
0 Kudos
0 Kudos

Thanks Lars,

The reinitialization was successful but unfortunately it didn't correct our issue.

I suspect that rather than the Stats table itself being the problem, my problem is the meta info held in the system about this table (which incorrectly thinks the table has 2 partitions). I guess this doesn't get touched by the stats reinit.

Is there a way to refresh the information held about a table? I've tried the above CHECK procedure in REPAIR mode, but I still get the 5206 error and the issue isn't resolved.

thanks


lbreddemann
Active Contributor
0 Kudos

See... that's the problem with "support-via-forum"... it's difficult to get the full picture, so a lot of guessing around happens...

You might want to look into

SAP note 1977584 and the repairTopology.py script.

- Lars

0 Kudos

Hi Lars. Agreed. As HANA One customers we're not able to raise a customer message for this, so thanks for taking the time to help.

The repairTopology.py script doesn't find anything to repair unfortunately.

I may try bringing up a new instance and recovering from backup, but I suspect this will also recover the problematic stats table in its current status.

cheers