5.7. Экспорт LONG RAW #
ora2pgpro не может экспортировать данные столбцов типа LONG RAW. Библиотека OCI не может экспортировать и всегда возвращает одну и ту же запись. Чтобы экспортировать такие данные, преобразуйте поле в BLOB путём создания временной таблицы до миграции данных.
SQL> DESC TEST_LONGRAW Name NULL ? Type -------------------- -------- ---------------------------- ID NUMBER C1 LONG RAW
Например, таблицу Oracle выше нужно перенести в таблицу с BLOB следующим образом:
CREATE TABLE test_blob (id NUMBER, c1 BLOB);
А затем копировать данные с помощью такого запроса INSERT:
INSERT INTO test_blob SELECT id, to_lob(c1) FROM test_longraw;
Затем нужно исключить изначальную таблицу из экспорта (см. EXCLUDE) и переименовать новую временную таблицу "на лету" при помощи директивы REPLACE_TABLES.
5.7. Exporting LONG RAW #
If you still have columns defined as LONG RAW, ora2pgpro will not be able to export this kind of data. The OCI library fails to export them and always returns the same first record. To be able to export the data you need to transform the field as BLOB by creating a temporary table before migrating data.
SQL> DESC TEST_LONGRAW Name NULL ? Type -------------------- -------- ---------------------------- ID NUMBER C1 LONG RAW
For example, the above Oracle table needs to be "translated" into a table using BLOB as follows:
CREATE TABLE test_blob (id NUMBER, c1 BLOB);
And then copy the data with the following INSERT query:
INSERT INTO test_blob SELECT id, to_lob(c1) FROM test_longraw;
Then you just have to exclude the original table from the export (see EXCLUDE directive) and to rename the new temporary table onthe fly using the REPLACE_TABLES configuration directive.