Cannot issue the PACK command on a database while its objects have open cursors (Error 1566)

Close all database tables before issuing the PACK command.