keeps / dbptk-developer

DBPTK Developer - library and command-line tool for execution of database preservation actions
http://www.database-preservation.com
GNU Lesser General Public License v3.0
43 stars 19 forks source link

Problem with duplicate column name #389

Open BorisDomajnko opened 5 years ago

BorisDomajnko commented 5 years ago

Description: Cannot restore database: ERROR: column "OB_ID" specified more than once Call getNextException to see other errors in the batch.

If I check the initial dbptk-report-20170126124051360.txt for creation with older DBPTK, I see:

- Type conversion in import module: in `RPE.UL_.OB_ID` (format: schema.table.column) has original type `NUMBER(3,0)` and was converted to the standard type `DECIMAL(3)`
   . . .
- Type conversion in import module: in `RPE.UL_.OB_ID` (format: schema.table.column) has original type `NUMBER(3,0)` and was converted to the standard type `DECIMAL(3)`

And db creation log dbptk-app.log.txt with 2.4.0:

 CREATE TABLE "RPE"."UL_" (
  . . .
 "OB_ID" numeric(3) NOT NULL,
 . . . 
 "OB_ID" numeric(3) NOT NULL,
 . . . 

 was aborted: ERROR: column "OB_ID" specified more than once  Call getNextException to see other errors in the batch.

Is it possible to have columns with duplicate names? Is the problem in old siard package or in export into database? Regards, Boris

hmiguim commented 4 years ago

Hi Boris,

Each table has a set of columns, and the column name must be unique.

Please, report which databases (import and export) you used for this example or provide both logs.

BorisDomajnko commented 4 years ago

Hi, I will try to contact the producer who made this package. regards, Boris

V V tor., 10. sep. 2019 ob 18:46 je oseba Miguel Guimarães < notifications@github.com> napisala:

Hi Boris,

Each table has a set of columns, and the column name must be unique.

Please, report which databases (import and export) you used for this example or provide both logs.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keeps/db-preservation-toolkit/issues/389?email_source=notifications&email_token=AEGAIVOHVFY4C3FNPB4V7MLQI7FP5A5CNFSM4ITRPBK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6LYKBQ#issuecomment-530023686, or mute the thread https://github.com/notifications/unsubscribe-auth/AEGAIVOKKAVZZO3PVSLWMWLQI7FP5ANCNFSM4ITRPBKQ .

luis100 commented 4 years ago

@BorisDomajnko any update on this?

BorisDomajnko commented 4 years ago

I am sorry, but the creator has not responded yet. I will contact them again. Kind regards.

BorisDomajnko commented 4 years ago

Finally I got the response from the creator. They have used the latest DBPTK now. java -jar "-Dfile.encoding=UTF-8" dbptk-app-2.6.1.jar migrate --import oracle --import-server-name=10.5.76.26 --import-instance="testb.gurs.sigov.si" --import-port-number=1521 --import-username=rpe --import-password=*** --import-accept-license --export siard-2 --export-file=outRPE_UL.siard -etf rpe_tables.txt dbptk-app.log.txt rpe_tables.txt