Проблема с firebird 1.5. backup

Здесь обсуждаются различные программы, компьютеры, ноутбуки, операционные системы, связь, компьютерные сети, модемы, смартфоны, сотовые телефоны, цифровое и IP-телевидение и т.д.

Модераторы: Aneta, ru

Ответить
Аватара пользователя
ru
забанен
Сообщения: 6937
Зарегистрирован: 23 июн 2006 08:42

Проблема с firebird 1.5. backup

Сообщение ru » 02 фев 2010 13:48

Добрый день. Знаю, что в Тобольске многие используют вышеуказанный сервер баз данных в работе, потому может кто сталкивался. Возникла не совсем понятная мне проблема:
1) с помощью gbak делаю резервную копию базы данных
2) восстанавливаю базу из резервной копии и во время восстановления мне выдает:

Код: Выделить всё

gbak: ERROR: unsuccessful metadata update
gbak: ERROR:     key size exceeds implementation restriction for index "REESTRS_
IDX2"
gbak: Exiting before completion due to errors
При этом база нормально регистрируется в IB Expert и (вроде бы) все данные на месте. При этом физический размер базы вместо 94 мб становится 52 мб (это вроде тоже нормально в связи с тем, что gbak жмет данные)

Версии ПО:
Firebird 2.0 на Linux RHEL 4.0
gbak от FireBird 1.5 из WindowsXP по сети

Аватара пользователя
ru
забанен
Сообщения: 6937
Зарегистрирован: 23 июн 2006 08:42

Re: Проблема с firebird 1.5. backup

Сообщение ru » 02 фев 2010 14:15

Да здравствует великий google!
Нашел решение тут: http://edn.embarcadero.com/article/25723
Abstract: This error indicates that the key size for the specified index is larger than the maximum (255) value allowed.

Problem:
When restoring a database gbak reports the error:

gbak: creating indexes
gbak: ERROR: unsuccessful metadata update
gbak: ERROR: key size exceeds implementation restriction for index "TABLE1_INDEX"
gbak: Exiting before completion due to errors


Solution:
The information in this article applies to:
* InterBase all versions

InterBase indexes have a limitation that the maximum key size be 255 bytes.
This error indicates that the key size for the specified index is larger than the
maximum value allowed.

One way to get into this situation is with updates to the system tables. If the column
length is expanded due to directly updating the system tables, this error could arise
on restore.

When the index was created the key size was under the maximum allowed
size. When the system tables were updated and the column length expanded
the new key size was larger than the maximum size allowed.

The workaround is to identify the problem index and:
1) delete the index if updated column length(s) are required
2) reduce column length(s) so that the key size is under the maximum


************
Example
************

This is an example of how to get into this situation.

1) create a table with a varchar(40) column
2) create an index on the varchar column
3) Update the system tables and change the length of the varchar
field to 300.
4) Backup the database
5) Restore the database

Gbak will report the error "key size exceeds implementation restriction ..." on the restore.

This error can be resolved in one of two ways:
1) delete the index on the varchar column
2) reduce the size of the varchar column so that the key size is below the
maximum size allowed.

Аватара пользователя
ru
забанен
Сообщения: 6937
Зарегистрирован: 23 июн 2006 08:42

Re: Проблема с firebird 1.5. backup

Сообщение ru » 11 фев 2010 10:07

кстати, проблема решилась еще проще - использовал gbak от версии FireBird 2.0

Ответить