Cannot open /home/db2topgdir/TABLEDESC, No such file or directory at ./deltocopy.pl line 234
sarathmv opened this issue · 7 comments
I tried to migrate the DB2 to Postgresql, at the time it shows error as Cannot open /home/db2topgdir/TABLEDESC, No such file or directory at ./deltocopy.pl line 234 while trying execute ./deltocopy.pl -d /home/db2topgdir/ | psql -U postgres -e --set=ON_ERROR_STOP=1 RBD
well, the TABLEDESC should have been created by the db2topg step. If you don't have a TABLEDESC, it means that either you didn't do this step, or the file is in another directory.
Thanks that was in another directory i just moved it into the same and now it is working.
Now if i run unsure.sql and error occurs
psql.bin:/home/db2topgdir/unsure.sql:32: ERROR: syntax error at or near "LANGUAGE"
LINE 1: CREATE OR REPLACE FUNCTION rmsvcchk_fn LANGUAGE plpgsql RETU...
^
psql.bin:/home/abc/db2topgdir/unsure.sql:32: STATEMENT: CREATE OR REPLACE FUNCTION rmsvcchk_fn LANGUAGE plpgsql RETURNS (trigger) AS
NEW AS N FOR EACH ROW MODE DB2SQL WHEN (LCASE(N.SVR_SERVERNAME) = (SELECT
LCASE(SVR_SERVERNAME) FROM RMSERVER WHERE LCASE(N.SVR_SERVERNAME) = LCASE(SVR_SERVERNAME)))
SIGNAL SQLSTATE '75000' ('Servername already exists')
;
Yes, that's the principle of the "unsure" file: there are statements that probably won't run in PostgreSQL.
To be honest, I didn't even try to run it once with stored procedures in it, these are too different between postgresql and db2.
IS there any issue happens if we not run that unsure.sql
The only issue is that the objects in this unsure file wont be migrated. The unsure file is produced so that you can inpect it, see if there are things you may want to try to migrate, and rewrite them yourself. The content cannot be re-written by db2topg (because of large differences in SQL or PL language mostly)
Yes i checked that in db2 and it was some different kind ok data all other data was restored.
OK thanks for the valuable information and also thanks for such a great script db2topg
I'm delighted it helped you.